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

Failed to update schema. error=Redefining the schema is not allowed. #27

Open
guicostaarantes opened this issue May 9, 2023 · 2 comments · Fixed by jgautheron/graphgate#1
Labels
bug Something isn't working

Comments

@guicostaarantes
Copy link

guicostaarantes commented May 9, 2023

If my understanding is correct, this error is being thrown here because my subgraphs are using a recent version of async-graphql that supports Federation v2, thus their SDLs have a extension for the schema (as they should based on this code).

Expected Behavior

Supergraph should accept SDLs following Apollo Federation v2.

Actual Behavior

Server returns all requests with {"data": null,"errors": [{"message": "Not ready."}]} and logs ERROR Failed to update schema. error=Redefining the schema is not allowed.

Steps to Reproduce the Problem

  1. Clone the repo.
  2. Run docker build -t graphgate-with-examples -f Dockerfile-standalone-demo .. I was getting errors so had to change versions of rust and ubuntu to latest.
  3. Run docker run --name graphgate-issue-27 -d -p 8000:8000 -p 8001:8001 -p 8002:8002 -p 8003:8003 graphgate-with-examples.
  4. Notice that the supergraph runs as expected. Also notice that running query{_service {sdl}} against the individual subgraphs does NOT return extend schema @link...
  5. Run docker stop graphgate-issue-27 && docker rm graphgate-issue-27
  6. Open Cargo.toml and change versions of async-graphql and async-graphql-warp to 5.0.8.
  7. Run docker build -t graphgate-with-examples -f Dockerfile-standalone-demo ..
  8. Run docker run --name graphgate-issue-27 -d -p 8000:8000 -p 8001:8001 -p 8002:8002 -p 8003:8003 graphgate-with-examples.
  9. Notice that the supergraph doesn't work. Also notice that running query{_service {sdl}} against the individual subgraphs returns extend schema @link... (which I think is causing the issue)
  10. Run docker stop graphgate-issue-27 && docker rm graphgate-issue-27 to clean up

Specifications

  • Version: 0.5.1
  • Platform: Mac
  • Subsystem: idk
@guicostaarantes guicostaarantes added the bug Something isn't working label May 9, 2023
@guicostaarantes
Copy link
Author

I was able to fix the behavior by just erasing this line of code, but I understand that a more robust fix may be needed to correctly compose the schema.

@humb1t
Copy link

humb1t commented Oct 23, 2023

@guicostaarantes I merged a good fix from @jgautheron into my fork https://gitlab.com/oss47/graphgate - if you are interested, we can use and maintain it together.

It's also available in docker registry: registry.gitlab.com/oss47/graphgate

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

Successfully merging a pull request may close this issue.

2 participants