react-graphql-api v0.0.10
Introduction
This repository holds the mobile version of CashiaApp.
Setup
General
- Follow the setup guide here.
- Install dependencies with
yarn
. - Fill in your
.env
var file as shown in.env.example
. Refer to this section for more info. - Start the metro bundler server with
yarn start
. - Run the app:
yarn android
oryarn ios
.
Development
GraphQL
We have our schema as a submodule
residing at graphql/schema
.
Put your fragments and operations at graphql/fragments
and
graphql/operations
respectively. The convention is to call the fragment files
the same as the type the fragment is on, while calling the fragment itself
typeFields
in camelCase
. For operations, try to separate mutations and
queries where possible, calling the operations either the same name as the
query/mutation or in the case where multiple queries are made - something that
represents the screen where this is made. All file names should be in
camelCase
as well.
To generate types for your code, you'll need to setup the submodule with
git submodule init
and git submodule update
, running yarn generate
after
that.
If you're using VSCode installing a language server extension for it is advised.