Closed madshall closed 3 months ago
Consider using @no-co/graphql.web if this is all client side usage. This is what URQL uses under the covers.
@marceloFerreira90 please take a look
The reason for the peerDependency of GraphQL is the use of TypedDocumentNode. The approach to fix this will be to replicate the way it was implemented in graphQL as it only has a dependency on DocumentNode which is available on @no-co/graphql.web
It could be a good issue for that package too.
As discussed:
TypedDocumentNode
in our code, it's just an interface
Package
graphql-hooks
Environment
graphql-hooks
version: latestDescription
The latest version has a peer dependency on
graphql
package which is 40kb gzipped. It's 7 times this package's size. So in order to use this lightweight package we need to install 40kb additional dependencies. This destroys the whole idea of it.Suggested solution (optional)
Make
graphql
an optional dependency or remove the feature that requires it.