graphql-client
graphql-client copied to clipboard
Object => Query support
Any plans to have Object => Query support?
class hero {
string id;
}
client.executeQuery(new Hero {
id = "1"
});
In fact, we have plans for even a "better" thing.
Something like the way people access data from a DbContext but in GraphQL, using LINQ, Select, Where, etc...
@Disturbing
Where I work we created a query builder that wraps this library. Its basically like LINQ but for GraphQL queries. Check it out here: https://github.com/Revmaker/Getit
Hey, @odannyc really interested in this. Would you like to do somehow a merge or let me copy some of the code from Getit?
@deinok
I asked my team and we are interested in merging as long as we get a mention back to Carlabs. Let me know of the process you had in mind.
@odannyc Seems like licences are compatible, I suppose that a mention in the README.md is okey (Logo, WP link and GitHub link).
About the process: v2.0.0 is currently blocked by https://github.com/graphql-dotnet/graphql-client/issues/25 and small API change in GraphQL.Common (To support other thing than JSON)
After the unblock of v2.0.0, we are going to implement a caching and batching systems. That should be v2.1.0
And if everything goes okey, at v2.2.0 we are gona do the merge with your team.
My general idea is to give two options. A really dynamical option (Getit way) and a more compile time option (Something like what is doing EntityFramework exposing things as IQueryables). Nvm, I have to take a closer look to Getit
So, if you accept, we can close this issue, and move the conversation to a newer one dedicated to the merge :)
@deinok - Yeah sounds good! If you have any questions or need help understanding Getit let me know and I can help out.
I'm also working on a similar project. It features building query strings using an expression-based approach (similar to Linq), and provides a Relay client extension.
Seems like a lot of us are working on this. I created PR #93 that follows EF Core's model. (I came and looked at the issues afterward.)
A different take on this: https://github.com/graphql-dotnet/graphql-client/pull/111