Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison with graphql-typed-client ? #209

Closed
redbar0n opened this issue Sep 2, 2021 · 3 comments
Closed

Comparison with graphql-typed-client ? #209

redbar0n opened this issue Sep 2, 2021 · 3 comments

Comments

@redbar0n
Copy link

redbar0n commented Sep 2, 2021

Reiterated comment from @benny-medflyt over at: helios1138/graphql-typed-client#40

graphql-typed-client seems like a library that is similar to this one.

What advantages does this library have over graphql-typed-client?

zeus seems to have solved some issues that graphql-typed-client has (above link has the relevant issues, for those interested).

On the other hand, graphql-typed-client seems have "custom scalar type mapping" feature which zeus seems to be lacking (?).

I don't mean any disrespect, I am evaluating libraries trying to decide which to use and wondering what advantages these have relative to each other. Has anyone done a comparison?

@aexol
Copy link
Collaborator

aexol commented Sep 5, 2021

Propose something for custom scalar type. Right now on backend resolverFor, I don't want to force for scalar type mapping as this would fire a scalar resolver function on every request. On the front end, you can pass scalars as variables.

Can you suggest how you would like it to look on the front end client?

@redbar0n
Copy link
Author

redbar0n commented Sep 5, 2021

Frankly, I haven't got a good enough grasp of custom scalar type mapping to tell. The examples there might give some ideas on how it could look on the client. I'm mostly just looking to understand the similarities and differences between the two libraries.

@aexol
Copy link
Collaborator

aexol commented Sep 6, 2021

Meh it requires configuration. I would rather do smth like:

Gql.query({
    someDateScalar:true
},{
  scalars:{
    Date: (q:unknown) => new Date(String(q))
  }
})

@aexol aexol closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants