I am trying to build payload using the generated Dockerfile by the
create-payload-app
script. It tries to build application using the build script which generates a bundle folder that is including multiple versions of GraphQL as shown with this error:
Error: Cannot use GraphQLScalarType "DateTime" from another module or realm.
But fixing it by forcing the latest version of graphql with a resolution block in package.json breaks the admin interface as they are expected older versions.
"resolutions": {
"graphql": "16.6.0",
"**/graphql": "16.6.0"
},
So what versions should satisfy both, server and admin interface?
Hey @jayzai , I'm taking a look into this now. Let me try to recreate.
I'm not able to recreate this. Which template did you choose? Did you perform any modifications?
There is a related thread on github,
https://github.com/payloadcms/payload/discussions/1856about this problem while using npm. What package manager are you using?
We're going to look into this more today.
I
wasable to recreate the graphql error from the steps in the thread on github ^
That should give us more to look into.
Interesting, @jayzai does your Dockerfile contain npm commands or yarn commands? (This is generated by create-payload-app based upon what you have installed on your machine)
Hello, got almost this problem today, Error: Expected DateTime to be a GraphQL nullable type.
Using PNPM, working in build in local, but crash in railway ,,,
The worse thing is i don't even use GraphQL, it would be really great to dissociate GraphQL and import it as a subpackage for people wanting to use it
We definitely have had this conversation and have plans to abstract out certain pieces from the core of Payload if it makes sense.
In the meantime, you could disable graphql by putting this in your config
graph: {
disable: true
}
My bad didn’t saw this configuration option, thank you ! But yeah it would be great to have it only if wanted 🙏