This repository was archived by the owner on Dec 25, 2022. It is now read-only.
This repository was archived by the owner on Dec 25, 2022. It is now read-only.
How does it discover individual objects? #40
Open
Description
Hello... Thanks for making this package, it's really useful. I was looking at the code and was wondering how does it discover individual objects given an endpoint?
Suppose there are these two books that the API publishes data on,
https://api.example.com/json/books/1
https://api.example.com/json/books/2
Given a configuration,
{
resolve: 'gatsby-source-custom-api',
options: {
url: 'https://api.example.com/json',
imageKeys: ['images'],
rootKey: 'books',
schemas: {
book: `
id: Int
title: String
isbn: String
`,
},
},
}
How does it discover the two objects? I wasn't able to make it out from the codebase. If you think this might be also useful for others, maybe it can be added in the documentation. If I'm able to understand it, I'll contribute a PR. Thanks.
Metadata
Metadata
Assignees
Labels
No labels