Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
roadmap Something that's going to happen
Projects
None yet
Development

No branches or pull requests

1 participant