apollox
TypeScript icon, indicating that this package has built-in type declarations

0.2.12 • Public • Published

apollox

MobX graphql client

Commands:

apollox generate:queries url

Creates src/graphql/generated-qql directory containing all the mutations, queries and subscriptions which exist on the server. It skips those that already exist in the client project. Schema is automatically pulled from the server before code is autogenerated.T This should be run everytime you want to integrate with a new query or mutation.

apollox generate:everything url

Executes download:schema, generate:types and generate:store. This should be run everytime you change a query or query definition changes on the server.

apollox download:schema url

Downloads graphql schema to schema.json file using https://www.npmjs.com/package/apollo

apollox generate:types

Creates typescript types for all queries inside the project against schema.json schema. Queries must be written inside *queries.ts files using gql literal and exported as variables.

apollox generate:store

Generates src/graphql/graphql-store.ts MobX store containing all the queries and mutations.

Readme

Keywords

none

Package Sidebar

Install

npm i apollox

Weekly Downloads

0

Version

0.2.12

License

ISC

Unpacked Size

48.6 kB

Total Files

35

Last publish

Collaborators

  • ikatun