GraphQL API in multi tenant setup? #11599
Unanswered
Josef-Reichardt
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to use the GraphQL API in a Payload CMS with multi tenant setup (
@payloadcms/plugin-multi-tenant)?At the moment I have a strange behaviour.
returns
{ "data": { "MediaCollections": { "docs": [ { "key": "Homepage" } ] } } }But
with params
{ "page": 0 }returns[ { "message": "Cannot use GraphQLScalarType \"Int\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results." } ]But
pnpm why graphqldoesn't show different graphql versions:Because I already used the GraphQL API in the past without the
@payloadcms/plugin-multi-tenant, I assume that this is the relevant difference between my two projects.I have also not found any information about using the GraphQL API in combination with the multi tenant plugin, so I wanted to ask if it is supported. Or maybe someone has any other hint for me if I'm doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions