aerogear / offix

GraphQL Offline Client and Server
https://offix.dev
Apache License 2.0
758 stars 45 forks source link

Ability to integrate with graphql-dotnet server ? #65

Closed Hasan-git closed 5 years ago

wtrocki commented 5 years ago

We are backend agnostic so as long we are using js on client side most of the functionalities will work. The conflict part has server side implementation is optional - to detect conflict but we can explain approaches here so you could replicate this in dotnet server with no issues.

jalchr commented 5 years ago

We are looking forward to see how could this be done in dotnet. Could you provide a sample code or a blog post or provide some guidelines ?

wtrocki commented 5 years ago

Yes. Server side will be really simple and we have PR opened that will describe that currently.

TL;DR it will require you to return specific graphql error on conflict containing server and client data. I would be cool to add that package here as well as contribution once we done it and test it

however conflict part is not required to start using offline client. Without server conflicts will not be detected but everything else will work nicely

wtrocki commented 5 years ago

Mentioned PR: https://github.com/aerogear/offix/pull/54

Hasan-git commented 5 years ago

In-progress

wtrocki commented 5 years ago

My recomendation will be to create separate folder with the readme and call it something like dotnet server.

wtrocki commented 5 years ago

The documentation contains the specification of how conflict can be implemented: https://offix.dev/#/ref-conflict-server?id=conflict-resolution-specification-for-other-languages

Implementation is very simple - we just need error on conflict and developers should be able to implement this easily outside node.js

FYI @ccfoley Conflict server will work with other middleware languages like java.