@forivall/apollo-link-enums
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

@forivall/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.

Readme

Keywords

none

Package Sidebar

Install

npm i @forivall/apollo-link-enums

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

155 kB

Total Files

71

Last publish

Collaborators

  • forivall