Closed jansenignacio closed 8 years ago
I agree. It would be nice to support graphql-js's SchemaTypes - definitely something I would like to introduce in future.
I've been thinking more about this, and I'm doubting the necessity of this. Modelizr is a client targeted library and in my opinion it should have models that are not glued to the server-side GraphQL schemas.
@jansenignacio Could you perhaps describe a use case that this could make sense?
@julienvincent can you think of a case when you wouldn't want the client to be 'glued' to the server.
Yes, most of the time the client does not want to / is not authorized to view all of the fields available on a schema.
Authorization is a server-side concern. What is the problem with having a full type specification when you only need 80%.
@julienvincent after using GraphQL a bit more, I've also come to the same conclusion as you. The use case I had thought of is not really valid.
@jansenignacio Thanks for your input - you might also be interested in looking at the rewrite for v1. Creating a model is now much less verbose and hopefully makes this library more user friendly.
It would be great if you didn't have to recreate your entire graphql schema to follow Modelizr's syntax. If there was some way to hook modelizr into the existing graphql schema, it would make this library much more user-friendly.