apollo-rs
apollo-rs copied to clipboard
Panic when compiling Sandbox's introspection result
Description
When creating a compiler using the operation body within an Apollo Router plugin, I get a panic on introspection requests from Apollo Sandbox.
Steps to reproduce
Failing test: https://github.com/apollographql/apollo-rs/pull/279
Expected result
The operation is successfully compiled.
Actual result
Router logs:
2022-08-15T20:40:57.157611Z ERROR request{method=POST uri=/ version=HTTP/1.1 otel.kind=server otel.status_code=}: apollo_router::executable: panicked at 'Internal error, cycle detected:
DatabaseKeyIndex { group_index: 0, query_index: 8, key_index: 0 }
DatabaseKeyIndex { group_index: 0, query_index: 23, key_index: 1 }
', /Users/lenny/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.16.1/src/lib.rs:490:48
Environment
- Crate version: [email protected], [email protected]
I started commenting out things until it worked. It seems like this is just a nested fragment issue. This operation triggers the same result:
query IntrospectionQuery {
foo {
...Bar
}
}
fragment Bar on Foo {
baz {
...Quux
}
}
fragment Quux on Baz {
id
}
ah perfect! love a good reproduceable example. a fix is incoming