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

Add introspection support to backend #3

Open
rafalp opened this issue Apr 20, 2023 · 0 comments
Open

Add introspection support to backend #3

rafalp opened this issue Apr 20, 2023 · 0 comments
Labels
roadmap Something that's going to happen

Comments

@rafalp
Copy link
Owner

rafalp commented Apr 20, 2023

tRPC has no schema or introspection capability, but we could let devs opt in to one.

Introspection query

Backend class could accept introspection option that if set, would add introspection query to the server, eg:

trpc_backend = Backend(..., introspection="introspection")

Running "introspection" against the server would then return a JSON (in unknown format) with list of public mutations/queries and types

Introspection method

Backend class could have introspection() method returning datastruct with information about possible mutations, queries and their types. Out of the box there wouldn't be anything else going on with this structure, but it would be useful for tooling developers to write codegens or custom "API contents" page.

@rafalp rafalp added the roadmap Something that's going to happen label Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
roadmap Something that's going to happen
Projects
None yet
Development

No branches or pull requests

1 participant