nautilus / gateway

A federated api gateway for graphql services. https://gateway.nautilus.dev/
MIT License
397 stars 49 forks source link

Fix non-deterministic introspection ordering, visible in playground #167

Closed JohnStarich closed 2 years ago

JohnStarich commented 2 years ago

This is a little thing, but it bugged me a bit 😉

Fixes an issue where the order of the introspection results would flip around. Here's a screencap of running the example services with gateway:

https://user-images.githubusercontent.com/1009441/174460992-0ce3d04d-d4e3-4a49-83b4-44eaee13acfd.mov

Now it's nice and static!

Note: This bumped the gqlparser lib, which includes some additional validation now. We may need to do a minor version bump.

AlecAivazis commented 2 years ago

Reading you comment further, I think I originally missed where you said we might need a version bump. Can you explain why in more details?

JohnStarich commented 2 years ago

For sure. So the gqlparser is doing additional validation now. So whenever we parse an incoming request and whatnot, it is a little more strict on checking the directives.

Technically it's "more correct", but it may break some gateway users that have invalid schemas.

JohnStarich commented 2 years ago

@AlecAivazis Do you think ^ this requires a minor version bump? After further thought, updating a dependency probably shouldn't qualify as a breaking change in general.