I’m having trouble getting my Airtable connection to appear in the GraphQL explorer. I installed the necessary plugin using yarn and configured my gatsby-config.js file properly, but the data source isn’t showing up.
I’ve already tried clearing the Gatsby cache and restarting the development server with elevated permissions, but allAirtable still doesn’t appear in GraphiQL. Any ideas what might be causing this issue?
Restart your dev server after setting up the env vars - Gatsby doesn’t always pick up environment file changes without a full restart. Also double-check your base permissions in Airtable’s API docs, not just account settings.
Check if your plugin version matches your Gatsby version. I hit this same issue with gatsby-source-airtable and Gatsby v4 - had to downgrade the plugin to fix it. The mapping config can also fail silently. Try dropping the mapping: {photo: 'fileNode'} line first and see if the basic connection works in GraphiQL. Add the file mapping back once you know the data source shows up. The plugin sometimes won’t initialize when mapping points to fields that don’t exist or aren’t accessible.
make sure your env vars are set up right. try console.logging the API key in gatsby-config to see if it’s undefined. also, check if there’s data in the Airtable base/table you’re targeting.
Check if your environment variables are actually loading in the environment you’re running. I had this exact problem - my .env file wasn’t being read because I had the wrong NODE_ENV set. Your dotenv config looks fine, but try hardcoding the values temporarily to see if that’s it. Also, that concurrency setting tripped me up - remove that line completely or set it to 1. Airtable’s rate limiting makes the plugin fail silently during development, especially with lots of records. You can increase concurrency once it’s working.
Check your Airtable permissions first. I’ve seen this exact issue when the API key doesn’t have read access to the base you’re querying.
Go to your account settings and make sure the API key has permissions for that base. Also verify the base ID is correct - should start with “app” plus a string of characters.
Table names trip people up too. They’re case sensitive and need to match exactly what’s in Airtable. If your table is “portfolio” (lowercase) but your config says “Portfolio”, it won’t work.
Try gatsby clean && gatsby develop instead of just clearing cache. Sometimes the .cache folder gets corrupted and a full clean fixes it.