graphdoc icon indicating copy to clipboard operation
graphdoc copied to clipboard

Expected Name, found String

Open DanielSWolf opened this issue 5 years ago • 2 comments

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.

DanielSWolf avatar Sep 10 '20 13:09 DanielSWolf

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...

sirtopp avatar Oct 27 '20 14:10 sirtopp

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`.

gmullerb avatar Jun 01 '21 17:06 gmullerb