This repository was archived by the owner on Apr 17, 2023. It is now read-only.
Description Hey all. We started talking about this issue over on discord:
https://discord.com/channels/632220458137419776/632220563540017153/879799832452161587
I attempted to add and use a custom directive in my data modal schema as part of a query:
directive @withCustom on FIELD_DEFINITION
type Response {
custom: String @withCustom
}
type Query {
getCustom: Response
}
The schema and graphback code were generated correctly. But at runtime buildGraphbackAPI is throwing the following error:
app | /usr/src/app/node_modules/graphql/error/syntaxError.js:15
app | return new _GraphQLError.GraphQLError("Syntax Error: ".concat(description), undefined, source, [position]);
app | ^
app | GraphQLError: Syntax Error: Expected Name, found Int "0".
app | at syntaxError (/usr/src/app/node_modules/graphql/error/syntaxError.js:15:10)
app | at Parser.expectToken (/usr/src/app/node_modules/graphql/language/parser.js:1423:40)
app | at Parser.parseName (/usr/src/app/node_modules/graphql/language/parser.js:92:22)
app | at Parser.parseDirective (/usr/src/app/node_modules/graphql/language/parser.js:619:18)
app | at Parser.parseDirectives (/usr/src/app/node_modules/graphql/language/parser.js:604:28)
app | at Parser.parseFieldDefinition (/usr/src/app/node_modules/graphql/language/parser.js:873:27)
app | at Parser.optionalMany (/usr/src/app/node_modules/graphql/language/parser.js:1516:28)
app | at Parser.parseFieldsDefinition (/usr/src/app/node_modules/graphql/language/parser.js:858:17)
app | at Parser.parseObjectTypeDefinition (/usr/src/app/node_modules/graphql/language/parser.js:806:23)
app | at Parser.parseTypeSystemDefinition (/usr/src/app/node_modules/graphql/language/parser.js:702:23)
I'm using:
"graphback": "1.1.0",
"graphql": "15.3.0"
"apollo-server-express": "2.25.1"
Any help or advice would be appreciated. Thanks!
Reactions are currently unavailable
Hey all. We started talking about this issue over on discord:
https://discord.com/channels/632220458137419776/632220563540017153/879799832452161587
I attempted to add and use a custom directive in my data modal schema as part of a query:
The schema and graphback code were generated correctly. But at runtime
buildGraphbackAPIis throwing the following error:I'm using:
Any help or advice would be appreciated. Thanks!