How can I implement a schema that supports something like this: http://graphql.org/learn/queries/#directives
When I use $ before a parameter, I get a parsing error
GraphQLError: Syntax Error: Expected Name, found $
"
/Users/pradipeyoggi/Apps/zestygrid/node_modules/graphql/language/parser.js:1299
throw (0, _error.syntaxError)(lexer.source, token.start, 'Expected ' + kind + ', found ' + (0, _lexer.getTokenDesc)(token));
^
GraphQLError: Syntax Error: Expected Name, found $
at syntaxError (/Users/pradipeyoggi/Apps/zestygrid/node_modules/graphql/error/syntaxError.js:24:10)
at expect (/Users/pradipeyoggi/Apps/zestygrid/node_modules/graphql/language/parser.js:1299:32)
at parseName (/Users/pradipeyoggi/Apps/zestygrid/node_modules/graphql/language/parser.js:92:15)
at parseInputValueDef (/Users/pradipeyoggi/Apps/zestygrid/node_modules/graphql/language/parser.js:842:14)
"
I have tried straight graphql.js and graphql-tools. I get an error with both when I have a $ in my schema. What am I missing?
It would help if there is a reference implementation or a sample available on how to implement directives (not custom directives, just the standard ones if $variable @include or if $variable @skip).