Skip to content

Custom apollo link to parse custom enums, for apollo rest links

License

Notifications You must be signed in to change notification settings

inhibitor1217/apollo-link-enums

Repository files navigation

apollo-link-enums

This is a custom apollo link, inspired by apollo-link-scalars.

Why should we use this?

GraphQL enums are designed to be known both to client and server. Once we define an enum at the schema, client and server can communicate wihtout concerning the programmer what the actual value of enum is.

However, apollo-link-rest allows an Apollo Client to communicate with server which is not aware of GraphQL or the schema. The client defines the schema in this case. The server can express enums in its own convention, hence the client is required to parse and convert the enums into a form compatible with Apollo Client. By default, the serialized value of the enum should be equal to its definition. This library allows to configure how the client would parse the enums.

About

Custom apollo link to parse custom enums, for apollo rest links

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published