Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected Name, found String #219

Open
DanielSWolf opened this issue Sep 10, 2020 · 2 comments
Open

Expected Name, found String #219

DanielSWolf opened this issue Sep 10, 2020 · 2 comments

Comments

@DanielSWolf
Copy link

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.

@sirtopp
Copy link

sirtopp commented Oct 27, 2020

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

@gmullerb
Copy link

gmullerb commented Jun 1, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants