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

Unknown field "_service" on type "Query". #946

Closed
rkudryashov opened this issue Jun 9, 2022 · 2 comments
Closed

Unknown field "_service" on type "Query". #946

rkudryashov opened this issue Jun 9, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@rkudryashov
Copy link

rkudryashov commented Jun 9, 2022

After update to latest 4-th version, it seems that enable_federation method (https://github.com/rkudryashov/graphql-rust-demo/blob/master/auth-service/src/lib.rs#L54) doesn't force generation of _service entry point. This is needed for services that don't have Federation stuff/distributed types, but nevertheless are used as downstream service behind Federation gateway.

Expected Behavior

{
  _service {
    sdl
  }
}

Returns SDL

Actual Behavior

Request above returns:

{
  "data": null,
  "errors": [
    {
      "message": "Unknown field \"_service\" on type \"Query\".",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ]
    }
  ]
}
@rkudryashov rkudryashov added the bug Something isn't working label Jun 9, 2022
@KevinXdefi
Copy link

KevinXdefi commented Jun 9, 2022

Any idea how to solve this ?

EDIT: found a workaround, you have to declare at least one entity in your query

@sunli829
Copy link
Collaborator

Thank you @rkudryashov , I have fixed it. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants