Closed steelbridge-io closed 2 years ago
Edit: It seems I cannot read.
Could you please drop a copy of your gatsby-config.js file here. I think I may know what the problem is.
@steelbridge-io what version of WPGraphQL for Gravity Forms are you using?
v0.10.0 was a major update that restructured many parts of the schema (e.g. WpGravityFormsForm
became WpGfForm
) that at first glance dont seem to be compatible with this plugin.
(@robmarshall my react skills arent the best, but I'd love to help with the upgrade however I can. Feel free to reach out on the WPGraphQL slack).
@justlevine I'm running v1.6.12 WPGraphQL. I can see how the schema is different than what I find in documentation. Maybe downgrade to an earlier release?
Edit: It seems I cannot read.
Could you please drop a copy of your gatsby-config.js file here. I think I may know what the problem is.
Hi @robmarshall
Here's a copy of my Gatsby-config.js
process.traceDeprecation = true; module.exports = { siteMetadata: { title:
The Trinity Guide - Gatsby Template, description:
A Gatsby driven theme for The Trinity Guide., author:
Chris Parsons, }, plugins: [
gatsby-plugin-react-helmet,
gatsby-plugin-image, { resolve:
gatsby-source-wordpress, options: { url:
https://headless.thetrinityguide.com/graphql, includedRoutes: [ "**/*/*/categories", "**/*/*/posts", "**/*/*/pages", "**/*/*/media", "**/*/*/tags", "**/*/*/taxonomies", "**/*/*/users", "**/*/*/menus", "**/*/*/menu-locations", ], excludedRoutes: [], // use a custom normalizer which is applied after the built-in ones. normalizer: function({ entities }) { return entities }, }, }, { resolve:
gatsby-source-filesystem, options: { name:
images, path:
${__dirname}/src/images, }, },
gatsby-plugin-sharp,
gatsby-transformer-sharp, { resolve:
gatsby-plugin-manifest, options: { name:
gatsby-starter-default, short_name:
starter, start_url:
/, background_color:
#663399, theme_color:
#663399, display:
minimal-ui, icon:
src/images/ttg-gatsby-icon.png, // This path is relative to the root of the site. }, },
gatsby-plugin-gatsby-cloud // this (optional) plugin enables Progressive Web App + Offline functionality // To learn more, visit: https://gatsby.dev/offline //
gatsby-plugin-offline, ], };
@steelbridge-io You will also need to include the plugin within Gatsby config. This is what imports the fragments for GraphQl to use. See here for an example of the config: https://github.com/robmarshall/gatsby-plugin-gravity-forms#how-to-use And here for a full step by step with a bit more explaination: https://thoughtsandstuff.com/blog/headless-wordpress-gravity-forms-with-gatsby-step-by-step-tutorial/
Thanks @robmarshall ... I went and ran everything per your instructions. Even cloned the repo in the tutorial. Same error.
Here's from https://github.com/robmarshall/gatsby-gravity-form-example
`There was an error in your GraphQL query:
Unknown type "WpGravityFormsForm".
GraphQL request:2:33 1 | 2 | fragment GravityFormFields on WpGravityFormsForm { | ^ 3 | formId
File: src/components/form.js:11:33 ` Wonder if it the version of node 16.9.0 ?
Anyway, seems like a really cool plugin. I just can't figure out where I'm failing.
@steelbridge-io
Can you confirm that the WordPress plugin WPGraphQL for Gravity Forms is below 0.10.10.
Not WPGrapgQl
. The specific plugin WPGraphQL for Gravity Forms
Hello,
I am experiencing an issue where the graphiql queries and not matching what is in the localhost:8000/__graphiql
Trying on a plain defualt Gatsby install.
There was an error in your GraphQL query:
Unknown type "WpGravityFormsForm".
Here's my package.json
Note: the gatsby-plugin-gravity-forms plugin isn't in the list because build doesn't finish? I can see it's missing. Been trying to get this to work for awhile. New to Gatsby and headless WP.
thanks for any help.