AndreasFaust / gatsby-source-custom-api

Source data from any API and transform it to (File-)Nodes.
52 stars 25 forks source link

Getting only first element from array #15

Open pwozniak1986 opened 3 years ago

pwozniak1986 commented 3 years ago

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.

AndreasFaust commented 3 years ago

Could you provide a codesandbox for testing? Otherwise it’s hard to figure out, what’s wrong.