Closed wtrocki closed 4 years ago
can you pls elaborate the issue
Generated schema contains some extra scalars. They should not be there. example https://github.com/aerogear/ionic-showcase/blob/master/server/src/schema/schema.graphql#L23
To replicate issue we need to add offix plugin that is using some helpers for schema
const orderedTypes = schemaTypes.filter((schemaType: GraphQLObjectType) => {
if (isQueryType(schema, schemaType)) {
return false;
}
if (isSubscriptionType(schema, schemaType)) {
return false;
}
if (isMutationType(schema, schemaType)) {
return false;
}
return schemaType.astNode !== undefined;
}).sort((type1: GraphQLObjectType, type2: GraphQLObjectType) => {
return type1.astNode?.loc?.start - type2.astNode?.loc?.start
})
I think i we need to add another filter here for the default scalar types (Int and String)
We need to filter out Integer, String scalars from result schema. Implementation we use now is here https://github.com/aerogear/graphback/blob/master/packages/graphback-codegen-schema/src/writer/schemaPrinter.ts