Skip to content

GraphQL: Only returns one item? #373

Answered by fergcb
bmwoodside asked this question in Q&A
Discussion options

You must be logged in to vote

You need the equipments if you want to fetch a list of items! All the plural root fields are collections, and all the singular fields are individual documents.

Try this:

query Equipment {
  equipments {
    index
    name
    desc
    weight
  }
} 

There's a "GraphQL Fundamentals" tutorial in our new docs if you want a quick primer on GraphQL: https://5e-bits.github.io/docs/docs/tutorials/beginner/graphql

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bmwoodside
Comment options

Answer selected by bmwoodside
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants