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

GraphQL format issue? #687

Closed
ChrisNolan opened this issue Sep 18, 2024 · 2 comments · Fixed by #698
Closed

GraphQL format issue? #687

ChrisNolan opened this issue Sep 18, 2024 · 2 comments · Fixed by #698

Comments

@ChrisNolan
Copy link
Contributor

Describe the bug
reviewing the logs on production system after updating to the 2024.6.1 release I'm seeing

karrio.api        | GraphQL request:2:3
karrio.api        | 1 | {
karrio.api        | 2 |   organization {
karrio.api        |   |   ^
karrio.api        | 3 |     id
karrio.api        | Cannot query field 'organizations' on type 'Query'.
karrio.api        |
karrio.api        | GraphQL request:5:3
karrio.api        | 4 |   }
karrio.api        | 5 |   organizations {
karrio.api        |   |   ^
karrio.api        | 6 |     id
karrio.api        |
Cannot query field 'organization' on type 'Query'.

so, badly formatted GQL somewhere? Looks to be both the ORG_DATA_QUERY in main.ts and the GET_ORGANIZATIONS query in the queries.ts types.

Looking again... the first one has 'organization' and says it can't find 'organizations'. The second one says 'organizations' and can't find 'organization' -- so maybe they are just swapped accidentally?

To Reproduce

start up the server, check the logs
docker logs karrio.api

Expected behavior

I'm not sure what those queries are there for, but I wouldn't expect them to be erroring?

@addshore
Copy link

I also just experienced this while looking at the docker setup for the first time in a fresh clone of the repo.

karrio.api        | Cannot query field 'organization' on type 'Query'.
karrio.api        |
karrio.api        | GraphQL request:2:3
karrio.api        | 1 | {
karrio.api        | 2 |   organization {
karrio.api        |   |   ^
karrio.api        | 3 |     id
karrio.api        | Cannot query field 'organizations' on type 'Query'.
karrio.api        |
karrio.api        | GraphQL request:5:3
karrio.api        | 4 |   }
karrio.api        | 5 |   organizations {
karrio.api        |   |   ^
karrio.api        | 6 |     id
karrio.api        | Cannot query field 'organization' on type 'Query'.

etc.

@danh91
Copy link
Member

danh91 commented Sep 21, 2024

I believe, I have an idea where the issue come from. It is not a format issue but a missing check for multi-org support.

Basically organization and organizations are queries that are not available in the OSS build. I am might be missing a check somewhere for MULTI_ORGANIZATION feature flag to prevent that query on the dashboard .

Will address it as part of the next patch

@danh91 danh91 linked a pull request Sep 28, 2024 that will close this issue
9 tasks
@danh91 danh91 mentioned this issue Sep 28, 2024
9 tasks
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

Successfully merging a pull request may close this issue.

3 participants