js-composedb icon indicating copy to clipboard operation
js-composedb copied to clipboard

It doesn't work when start the local server with GraphiQL using the runtime composite

Open dugubuyan opened this issue 3 years ago • 2 comments

Error happened after I have done everything just as the doc(https://composedb.js.org/docs/0.3.x/first-composite) said.there is an error like this below: Cannot use GraphQLScalarType "String" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.

dugubuyan avatar Oct 19 '22 03:10 dugubuyan

I'm having the same issue

simonas-notcat avatar Oct 19 '22 11:10 simonas-notcat

Solved this by running composedb with pnpm dlx

pnpm dlx @composedb/cli graphql:server --ceramic-url=http://localhost:7007 --graphiql --port=5001 runtime-composite.json

simonas-notcat avatar Oct 19 '22 14:10 simonas-notcat