apollox
v0.2.12
Published
MobX graphql client
Downloads
5
Readme
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.