code: public boolean isPossibleType(GraphQLType abstractType, GraphQLObjectType concreteType) {
          if (abstractType instanceof GraphQLInterfaceType) {
              return getImplementations((GraphQLInterfaceType) abstractType).stream()
                      .map(GraphQLType::getName)
                      .anyMatch(name -> concreteType.getName().equals(name));
          } else if (abstractType instanceof GraphQLUnionType) {
              return ((GraphQLUnionType) abstractType).getTypes().stream()
                      .map(GraphQLType::getName)
                      .anyMatch(name -> concreteType.getName().equals(name));
          }
  
          return assertShouldNeverHappen("Unsupported abstract type %s. Abstract types supported are Union and Interface.", abstractType.getName());
      }
docs: Returns true if a specified concrete type is a possible type of a provided abstract type.
  If the provided abstract type is:
  - an interface, it checks whether the concrete type is one of its implementations.
  - a union, it checks whether the concrete type is one of its possible types.
  
  @param abstractType abstract type either interface or union
  @param concreteType concrete type
  
  @return true if possible type, false otherwise.