Skip to content
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

Bug: Error in your GraphQL query due to example page query #44

Closed
arturhenryy opened this issue Jul 25, 2019 · 4 comments
Closed

Bug: Error in your GraphQL query due to example page query #44

arturhenryy opened this issue Jul 25, 2019 · 4 comments

Comments

@arturhenryy
Copy link

arturhenryy commented Jul 25, 2019

I get the following error:

There was an error in your GraphQL query:

Error: RelayParser: Encountered duplicate defintitions for one or more documents: each document must have a unique name. Duplicated documents:

  • SiteTitleQuery

the mentioned query is used duplicated in the gatsby v1 example and gatsby v2 example in the layouts/index.js

/node_modules/gatsby-plugin-mailchimp/examples/gatsby-v1/src/layouts/index.js
during yarn dev and build

@arturhenryy
Copy link
Author

https://stackoverflow.com/questions/55381810/why-is-it-not-possible-to-have-the-same-name-of-two-staticquery-elements-on-two/55394443

using the useStaticQuery hook or ommiting the name of the query should fix this problem

@benjaminhoffman
Copy link
Owner

are you still on gatsby v1? is it possible to upgrade to gatsby v2? if so, then you can use the v2 version of this plugin.

if not, then you (or me) needs to open a PR and merge the equivalent to this PR but for the gatsby-v1 branch: #40

i can do it this weekend if you're unavailable

@arturhenryy
Copy link
Author

no i am at v2 but it was related to this issue here
gatsbyjs/gatsby#15344

so i fixed it by updating your plugin. thanks for the help though. have a nice weekend!

@Allegra9
Copy link

fixed by updating to "gatsby-plugin-mailchimp": "^5.1.2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants