gatsby-source-custom-api
gatsby-source-custom-api copied to clipboard
Getting only first element from array
trafficstars
With the data simillar to the one from manual:
const exampleDataFromApi = [ { url: "post-1", author: "John doe" }, { url: "post-2", author: "Jane Doe" } ];
and following schema:
schemas: { posts: url: String author: String }
with a following query:
query MyQuery { posts { url author } }
I'm getting only the first element not the whole array.
Could you provide a codesandbox for testing? Otherwise it’s hard to figure out, what’s wrong.