I'm running Local by FlyWheel and there is no schema available in the explorer under /___graphql.
The only error I'm getting in the console is:
Uncaught (in promise) TypeError: Cannot read property 'enableRefresh' of undefined
at app.js?79533e86a2470d8aa270:13
Using the 2 included plugins in the starter instead of the git versions (and upgraded wp-gatsby under plugin admin).
I get a few dev warnings as well:
warn Warning: Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property
An update: I'm able to access the schema in GraphQL playground but the default http://localhost:8000/___graphql schema is not working.
Last bit of info that might be useful. I added this to my package.json file. Still no schema coming through but it does work in the stand alone GraphQL Playground App so it's definitely an issue on the GraphiQL side of things. Not sure if it's related to this project or not but it's the only project I'm using this plugin on.
"develop": "GATSBY_GRAPHQL_IDE=playground gatsby develop",
Console errors when trying to access the Schema. Docs in GraphQL Playground works fine.
SyntaxError: Syntax Error: Expected Name, found } (134:1)
132 | input WpContentNodeToEditLastConnectionEdgeFilterInput {
133 |
> 134 | }
| ^
135 |
136 | input WpUserFilterInput {
137 |
at t.start.line (parser-graphql.js:1)
at Object.parse (parser-graphql.js:1)
at Object.parse (standalone.js:13721)
at Hs (standalone.js:17145)
at Ws (standalone.js:17381)
at formatWithCursor (standalone.js:17397)
at standalone.js:32917
at Object.format (standalone.js:32926)
at Object.t.prettify (utils.ts:22)
at Object.l [as getSDL] (createSDL.ts:94)
es @ react-dom.production.min.js:209
react-dom.production.min.js:123 Uncaught SyntaxError: Syntax Error: Expected Name, found } (134:1)
132 | input WpContentNodeToEditLastConnectionEdgeFilterInput {
133 |
> 134 | }
| ^
135 |
136 | input WpUserFilterInput {
137 |
at t.start.line (parser-graphql.js:1)
at Object.parse (parser-graphql.js:1)
at Object.parse (standalone.js:13721)
at Hs (standalone.js:17145)
at Ws (standalone.js:17381)
at formatWithCursor (standalone.js:17397)
at standalone.js:32917
at Object.format (standalone.js:32926)
at Object.t.prettify (utils.ts:22)
at Object.l [as getSDL] (createSDL.ts:94)
Adding to this, noticed this exact same issue as well but did not look further into it.
I get the same
warn Warning: Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property
The warn Warning: Empty string transition configs (e.g., { on: { '': ... }}) for transient transitions are deprecated. Specify the transition in the{ always: ... }property warning was fixed in a recent version of Gatsby core and is unrelated to this issue. Update to latest Gatsby core for a fix there :)
I'm able to reproduce the schema issue locally. I'm debugging now and I'll keep yall updated on what I find.
Thanks for opening this issue!
So this is either a Gatsby core bug or a GraphQL playground bug. Essentially what happens is Gatsby generates a filter input for the WpContentNode type so that you can filter for nodes that have a specific user that last edited that node. That's great and works well. For example this works:
{
allWpContentNode(filter: {lastEditedBy: {node:{id: {eq: "dXNlcjox"}}}}) {
nodes {
... on WpPage {
lastEditedBy {
node {
id
}
}
}
}
}
}
The problem here is that the input type WpContentNodeToEditLastConnectionEdgeFilterInput has no fields. GraphQL playground builds the SDL for the schema and that produces:
input WpContentNodeToEditLastConnectionEdgeFilterInput {
}
Now since there are no fields, GraphQL playground errors because it's GraphQL parser doesn't like this. I think this is actually invalid SDL so the error is valid but I have no idea wether it's Gatsby, GraphQL Playground, or the GraphQL parser that gql playground is using which is causing this error.
In any case this isn't a bug with this plugin as these types are automatically generated by Gatsby core when nodes are created. I'm going to close this but I would encourage you to open this issue in the Gatsby core repo and reference this thread.
Thanks again!
I'm running Local by FlyWheel and there is no schema available in the explorer under /___graphql.
The only error I'm getting in the console is:
Uncaught (in promise) TypeError: Cannot read property 'enableRefresh' of undefined at app.js?79533e86a2470d8aa270:13Using the 2 included plugins in the starter instead of the git versions (and upgraded wp-gatsby under plugin admin).
I get a few dev warnings as well:
warn Warning: Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property
I know this Issue is closed, however updating my Gatsby version to latest fixed this for me. @kalebheitzman
That's great to hear, thanks for the update @lqze !
So the starter listed in the tutorial had Gatsby set to a an older version of Gatsby. I see it's updated over in the repo. I updated mine to the latest version of Gatsby and everything is working fine. Is it best practice to set a specific version of Gatsby vs specifying a minimum version of Gatsby? Thanks for all the helpful info!
@kalebheitzman minimum version is definitely better practise. I think it was an oversight on my part where I accidentally set a specific version but it should be fixed now 馃憤
Most helpful comment
I know this Issue is closed, however updating my Gatsby version to latest fixed this for me. @kalebheitzman