Skip to content

Commit

Permalink
added support for interface types in generateQuery
Browse files Browse the repository at this point in the history
Closes #2131
  • Loading branch information
imolorhe committed Mar 3, 2023
1 parent 8205a91 commit 861ff36
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -10,6 +10,7 @@ import {
GraphQLInputObjectType,
GraphQLInputType,
GraphQLInt,
GraphQLInterfaceType,
GraphQLObjectType,
GraphQLSchema,
GraphQLString,
Expand Down Expand Up @@ -146,7 +147,12 @@ export const buildSelectionSet = (
}
const namedType = getNamedType(type);

if (!(namedType instanceof GraphQLObjectType)) {
if (
!(
namedType instanceof GraphQLObjectType ||
namedType instanceof GraphQLInterfaceType
)
) {
return { selectionSet, metas: setMetas };
}

Expand Down

0 comments on commit 861ff36

Please sign in to comment.