Skip to content

Extract possibleTypes for interface types in buildClientSchema #3803

@IanChen83

Description

@IanChen83

The IntrospectionInterfaceType includes the possibleTypes field, but when we call buildClientSchema with the introspection result provided, the possibleType is not used

function buildInterfaceDef(
interfaceIntrospection: IntrospectionInterfaceType,
): GraphQLInterfaceType {
return new GraphQLInterfaceType({
name: interfaceIntrospection.name,
description: interfaceIntrospection.description,
interfaces: () => buildImplementationsList(interfaceIntrospection),
fields: () => buildFieldDefMap(interfaceIntrospection),
});
}
.

This information, however, is useful for static analysis that doesn't require an executable schema. Does it make sense to provide isTypeOf during buildClientSchema for interface types ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions