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

resolving introspection queries #469

Closed
yanns opened this issue Mar 6, 2023 · 9 comments
Closed

resolving introspection queries #469

yanns opened this issue Mar 6, 2023 · 9 comments
Assignees
Milestone

Comments

@yanns
Copy link
Contributor

yanns commented Mar 6, 2023

When having an ApolloCompiler with a schema, would it be possible to resolve an introspection query?
The ApolloCompiler has all information needed, no?

Is this is possible, is it a feature we should add to apollo-compiler? Or maybe to another crate using apollo-compiler?

@yanns yanns added the triage label Mar 6, 2023
@erikwrede
Copy link
Contributor

erikwrede commented Mar 6, 2023

@yanns In case the apollo team plans to push this back to the execution implementation (see Roadmap), I'd be interested in collaborating on that since my in-development python binding library could also make use of this. ☺️

@lrlna
Copy link
Member

lrlna commented Mar 6, 2023

@yanns @erikwrede this is indeed scheduled to be implemented along with execution. It's a bit further down the immediate roadmap, and I am not entirely certain of the direction of our design (to the point where we don't even have an issue to track execution yet). I'll keep this issue open for introspection-specific resolving.

@zackangelo
Copy link
Contributor

@yanns not sure what exactly your needs are but I started working on an executor on top of apollo-rs a few days ago that's capable of resolving introspection queries enough to power a graphiql UI: https://github.com/zackangelo/phoebus/tree/main/examples/http-axum

It's a bit messy and still missing some pretty big areas of the spec, though. Hope it helps.

@lrlna lrlna added this to the execution milestone Mar 31, 2023
@SimonSapin
Copy link
Contributor

#645 has a draft implementation of introspection and execution.

At first, execution will likely be a private implementation detail of introspection. There is a large design space full of tradeoffs around how an execution engine (provided by a library) can interface with field resolvers (provided by library users), so this would need discussion with actual would-be users before we commit to a public API.

@yanns
Copy link
Contributor Author

yanns commented Oct 6, 2023

congrats for the first PR!
If you need feedback about some API, I'd be happy to test it with our use-cases.

@SimonSapin
Copy link
Contributor

Yes, feedback as PR comments would be very welcome. Thanks!

tests/doc_example.rs in the PR shows an example of expected usage, to get you started.

@yanns
Copy link
Contributor Author

yanns commented Oct 16, 2023

I've tried to use it, but I first need to update other dependencies, and I have some issues I've put on discord:

I don't know if it's interesting for you, or just noise :D

@SimonSapin
Copy link
Contributor

SimonSapin commented Oct 17, 2023

Yes these are relevant but we’re not really on Discord for this project, please file future issues on GitHub instead. I’ve created a Discord account to read these and filed #702 and #703.

As to #645, it’s based on apollo-compiler 1.0 so yes you’ll likely need to start by using that version. It also provides an AST which may replace the need to use apollo-parser directly even if you need low-level to manipulation of syntax elements. If you don’t, hopefully apollo_compiler::Schema and apollo_compiler::ExecutableDocument together should cover your needs. All three have Display and .to_string(), replacing the need for apollo-encoder.

@abernix abernix removed the triage label Dec 11, 2023
@SimonSapin
Copy link
Contributor

Fixed in #758

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants