-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add support for querying multiple databases available to the Integration #3
Add support for querying multiple databases available to the Integration #3
Comments
I'm playing around with a fix on this issue for my own purposes but went ahead and tagged the issue in my PR on my fork (figured I'd spend the time writing out a future PR now). I'll comment back when I'm finished tinkering with it if you're interested in taking a look. |
Thank you, I'm excited to see it! If you have any questions, don't hesitate to reach out. |
Instead of modifying the plugin to take in multiple database IDs, another approach might be to use multiple plugins in module.exports = {
plugins: [
{
resolve: "gatsby-source-graphql",
options: {
typeName: "SWAPI",
...
},
},
{
resolve: "gatsby-source-graphql",
options: {
typeName: "GitHub",
...
},
}
],
} I tried this approach with this plugin and it seems to be fetching both results. In order to make this work, I think you'd only need a parameter that lets you specify the query node name for the result. Currently, it's set to |
Thanks @LandonSchropp. That was indeed the simplest solution 👍. |
Currently, a
databaseId
option is required.gatsby-source-notion-api
only allows fetching data from the database provided via that option. Technically, it is possible for a Notion integration to have access to multiple databases. In this case, you could choose which pages to pull from which database.The text was updated successfully, but these errors were encountered: