Expected Name, found String
I've got a GraphQL schema file that starts like this:
type Address {
"""Primary key generated by table sequence"""
id: ID!
"""Sync status of the entity"""
syncStatus: String!
...
To generate documentation, I ran graphdoc -s schema.graphql -o schema-doc.
I received this output:
✗ Syntax Error GraphQL (2:3) Expected Name, found String
1: type Address {
2: """Primary key generated by table sequence"""
^
3: id: ID!
It seems to me that graphdoc is having trouble parsing the string descriptions in the schema.
I have the same issue. It seemed to me that GraphDoc's purpose was to read the comments and provide a nice static documentation. How would it do that without reading docstrings? Beats me...
This is a duplicated issue 64.
A workaround for this issue is to tie the required graphql version in the transitive dependency using resolutions field of package.json file . This is described in How to configure graphdoc, as well some online examples are provided, for npm and yarn`.