graphql icon indicating copy to clipboard operation
graphql copied to clipboard

hello all, how can I fetch schema(sdl) at runtime

Open younfor opened this issue 2 years ago • 1 comments

because my data schema is dynamic and change at runtime, I can`t just define my sdl during program initialization. is extension a way to solve it ?

younfor avatar Jun 29 '22 14:06 younfor

on the client side or server side?

Client Side there is an introspection query that is typically used and included in most client libraries (not sure how up to date this gist is https://gist.github.com/craigbeck/b90915d49fda19d5b2b17ead14dcd6da)

For server side dynamic rebuilding you need to write some code to do that or use something like https://github.com/bhoriuchi/graphql-go-tools#example

bhoriuchi avatar Jul 29 '22 14:07 bhoriuchi