diff --git a/src/graphQLSortType.ts b/src/graphQLSortType.ts index 6e2eee8..169238f 100644 --- a/src/graphQLSortType.ts +++ b/src/graphQLSortType.ts @@ -1,4 +1,4 @@ -import { GraphQLInputObjectType, GraphQLEnumType, GraphQLNonNull, GraphQLObjectType, GraphQLInputType, GraphQLType, isLeafType, GraphQLInterfaceType } from 'graphql'; +import { GraphQLInputObjectType, GraphQLEnumType, GraphQLNonNull, GraphQLObjectType, GraphQLInputType, GraphQLType, isLeafType, GraphQLInterfaceType,GraphQLList } from 'graphql'; import { cache, setSuffix, getUnresolvedFieldsTypes, typesCache, FieldMap, GraphQLFieldsType } from './common'; export const FICTIVE_SORT = "_FICTIVE_SORT"; @@ -17,6 +17,10 @@ function getGraphQLSortTypeObject(type: GraphQLType, ...excludedFields): GraphQL type instanceof GraphQLInterfaceType) { return getGraphQLSortType(type, ...excludedFields); } + + if(type instanceof GraphQLList) { + return GraphQLSortType; + } return undefined; }