gqlify
gqlify copied to clipboard
Datamodel types without scalar fields break GQLify generation
Describe the bug When creating a data model type without any scalar fields (ie. only relation fields), code generation breaks.
To Reproduce Steps to reproduce the behavior:
- Create a data model type without scalar fields, eg:
type Foo {
bar: Bar
}
- Run generator
- See error
return new _GraphQLError.GraphQLError(
^
Syntax Error: Expected Name, found }
GraphQL request (1:37)
1: input UserSubscriptionsCreateInput {}
Expected behavior No error when running the generation.
Desktop
- OS:
OS X - OS version:
10.14.3 Beta (18D32a) - GQLify package versions:
@gqlify/firestore: 3.1.0,@gqlify/server: 3.1.2,
Additional context This is exactly the same issue that is happening with Prisma on this issue, so I'm kinda copy/pasting it here.