Fork me on GitHub
#graphql
<
2017-11-10
>
souenzzo03:11:58

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?

souenzzo03:11:07

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

hlship16:11:29

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.

hlship16:11:52

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!

souenzzo23:11:15

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?

hlship23:11:57

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

hlship23:11:22

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.