Fork me on GitHub

If I'm writing my graphql schema in EDN, how do the JS guy, that will use Apollo client or something like will parse it?


Introspection is enough to get a "full" js experiente? Like type error's at build time?


Depends on the client. We've done nothing to GraphiQL for example, it gets all information via introspection and doesn't know / can't tell if the source information was Lacinia and EDN or the JavaScript RI.


But it sounds like you're expecting something to write client-side JavaScript classes for you? That's pretty much the opposite of what GraphQL is all about!


I researched a little bit about, I do not know if I understood everything right. As far as I understand, JS clients will have to reimplement a schema compatible with the server. Right?


GraphiQL builds a model internally that reflects the schema on the server; it uses GraphQL introspection queries to populate that model.


But your GraphQL queries will just get JSON, and that JSON is immediately queryable. There's no pressing need for UI code to manipulate it just to present it to the user. In fact, part of GraphQL is to make it easier for the client to request just the server-side data it needs, and in the format thats most convenient to the client side logic.