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

Error: Schema must contain uniquely named types but contains multiple types named "DateTime". #15

Closed
matthewtgilbride opened this issue Jul 10, 2020 · 5 comments

Comments

@matthewtgilbride
Copy link

matthewtgilbride commented Jul 10, 2020

Hello,

I suspect this is an issue only when one is starting with an empty prismic repository. I found this issue on the original repo: birkir#121, but the solution there was to create some custom type, and some content, and then the issue is resolved.

That is not the case for me...I created a repo called "empty-repo" and reproduced the problem. Then I added a custom type and some content, but still see the error.

I forked the official sample project and added a commit to demonstrate: https://github.com/matthewtgilbride/gatsby-blog

If you try and run yarn and then yarn start you will see the issue.

Thanks!

@matthewtgilbride
Copy link
Author

I was able to fix this in my project by installing gatsby-source-graphql v2.6.2 and adding a resolution in my package.json

"resolutions": {
    "gatsby-source-graphql": "^2.6.2"
}

Additionally, I was able to clone this repo and bump the version, after which all tests passed. Happy to create a PR but I don't have access.

@MarcMcIntosh
Copy link

Hi @matthewtgilbride

Thanks for pointing that out, the version bump will need to be done on this repo https://github.com/prismicio/gatsby-source-graphql-universal

Additionally, I was able to clone this repo and bump the version, after which all tests passed. Happy to create a PR but I don't have access

You don't have access?

https://github.com/prismicio/gatsby-source-graphql-universal

@MarcMcIntosh
Copy link

MarcMcIntosh commented Jul 16, 2020

@matthewtgilbride did you publish any content?

You could use the theme command and skip adding the types and content :)
https://intercom.help/prismicio/en/articles/2933292-sample-blog-with-api-based-cms-gatsby-js

@MarcMcIntosh
Copy link

Update to prismicio/gatsbu-source-prismic-graphql has been published :)

@matthewtgilbride
Copy link
Author

Thanks :)

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

2 participants