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

Relay API has does not work with allow-list #10091

Open
thewillhuang opened this issue Jan 8, 2024 · 0 comments
Open

Relay API has does not work with allow-list #10091

thewillhuang opened this issue Jan 8, 2024 · 0 comments
Labels
c/relay Related to GraphQL Relay c/server Related to server k/bug Something isn't working v2

Comments

@thewillhuang
Copy link

thewillhuang commented Jan 8, 2024

Version Information

Server Version: 2.36.1
CLI Version (for CLI related issue): 2.36.1

Environment

OSS

What is the current behaviour?

when you try to add an relay query, it says query not found

What is the expected behaviour?

adds the relay connection as an allowed query

How to reproduce the issue?

  1. turn on relay
  2. turn on allow list
  3. add query -> get error

Screenshots or Screencast

response from metadata endpoint

{
    "error": "cannot continue due to newly found inconsistent metadata",
    "path": "$.args[0].args",
    "code": "unexpected",
    "internal": [
        {
            "definition": {
                "name": "MyQuery",
                "query": "query MyQuery {\n  xyz_connection {\n    edges {\n      node {\n        id\n      }\n    }\n  }\n}"
            },
            "name": "query_collections MyQuery in allowed-queries",
            "reason": "Inconsistent object: In query collection \"allowed-queries\" the query \"MyQuery\" is invalid with the following error(s): \"$.xyz_connection: field 'xyz_connection' not found in object 'query_root'\". This query is in allowlist.",
            "type": "query_collections"
        }
    ]
}

Please provide any traces or logs that could help here.

see above

Any possible solutions/workarounds you're aware of?

don't use relay if you want allow list

Keywords

relay graphql API does not work with allow list

@thewillhuang thewillhuang added the k/bug Something isn't working label Jan 8, 2024
@rakeshkky rakeshkky added c/server Related to server v2 labels Jan 11, 2024
@manasag manasag added the c/relay Related to GraphQL Relay label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/relay Related to GraphQL Relay c/server Related to server k/bug Something isn't working v2
Projects
None yet
Development

No branches or pull requests

4 participants
@manasag @thewillhuang @rakeshkky and others