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

Getting error on setting up: Cannot read property 'name' of undefined #43

Open
rohit12sh opened this issue Oct 18, 2021 · 2 comments
Open

Comments

@rohit12sh
Copy link

rohit12sh commented Oct 18, 2021

npx dociql -d gql-doc.yml

Error: Cannot read property 'name' of undefined

gql-doc.yml content:

# To fetch schema from
introspection: http://127.0.0.1:4000/graphql

# servers: # same format as for OpenAPI Specification
#   - url: https://dev-server.com
#     description: Dev
#   - url: https://prod-server.com
#     description: Prod
#     ...

info: # same format as for OpenAPI Specification
  title: Your API Title
  description: Markdown enabled description of your api.

  # define your domains by providing a set of usecases
domains:
  - name: Top Level Menu Section # Name of the domain
    description: Description # Description of the domain
    usecases:
      - name: Fetch 'Some' field # Operation name
        description: Markdown enabled description for operation # Opearation description
        query: query.some # Query example - fetching single field
        select: field1 field2 # select only specific sub fields. By default - all are selected
        expand: field3(sub1, sub2, sub3),field4 # go deep by expanding specific fields.
      - name: Invoke Mutation # Mutation
        description: Markdown enabled description for operation
        query: mutation.mutateSome # Mutation example - invoke mutation

@rohit12sh rohit12sh changed the title Getting error on setting up Getting error on setting up: Cannot read property 'map' of undefined Oct 18, 2021
@rohit12sh rohit12sh changed the title Getting error on setting up: Cannot read property 'map' of undefined Getting error on setting up: Cannot read property 'name' of undefined Oct 18, 2021
@Ludo978
Copy link

Ludo978 commented Oct 18, 2021

It's because you left the sample queries. Put your queries in the "usecases" subsection and retry it should work.

@ahmadalfy
Copy link

It's because you left the sample queries. Put your queries in the "usecases" subsection and retry it should work.

I thought it was going to generate the docs automatically and I didn't have to provide each use case

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