Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Initial GraphQL setup #53

Merged
merged 48 commits into from
Feb 1, 2019

Conversation

pelle
Copy link
Contributor

@pelle pelle commented Dec 24, 2018

This sets up Apollo Client, React and the first iteration of a graphql schema.

  • Sets up initial schema in root.ts
  • Wires up apollo-link-schema in Apollo Client
  • Wraps ApolloProvider and ReduxProvider for interop
  • adds basic Identity queries for querying redux state for me (currentIdentity), accounts etc
  • connects sql query functions from lib/sagas/databaseSaga to schema
  • Wired up unused Accounts with graphql and listed it under more for testing the setup

With this setup it should be easy to wire in the sql work from @simonas-notcat into the graphql schema.

pelle and others added 7 commits December 20, 2018 10:41
* Make auto test work with typescript

* Business logic for migrations

* Overall migrations saga code

* Make sure migrations stop after a failure

* Implemented IdentityManagerChangeOwner

Warning: This has only been tested in unit tests.

* backup migration reducer actions

* Implement proper deletion

* Cleanup missing seed

* Run cleanup as first step of PreHd migration

* UpdatePreHDRootToHD migration

* Create new seed before calling addowner

* Update uPort Registry with new details

* Fix tests for persona

* Saving work

* Improving logic of Migration screen

* Improved Pending Migration checks

* Fix updateIdentity reducer

* Add Rouven Simulator

* Fix failures

* missed error

* Always use root

* Fix identity reset for HD

* Complain if hdroot address is not the same as device address

* Fetch FuelToken properly

* Remove logging

* Always "complete" process even if failed

* Improve Migration Screen

* Full Identity Migration works and extra checks are included

* removed a few log statements

* Better handling of odd transaction mining failures

* Remove SIMULATE_ROUVEN feature

* Fix error props & add debug info to Device

* Update nonce during migration

* Use resolve nonce for signing tx

* Update tests

* Update snapshots

* Add unsigned tx to system messages
release-v405 v405
@pelle pelle changed the base branch from develop to feature/sqlite-support December 24, 2018 00:12
@jasheal
Copy link

jasheal commented Jan 12, 2019

I think we will need mutations too if we are to use graphql as our proxy to SQLite. Eg. We would have a createClaimMutation and signClaimMutation. Essentially all our create actions like create identity, writing to BC all should be mutations. The nice thing about mutations is that the callback can be configured to refetch the resource and cache it. We can also do optimistic cache updates so the ui updates immediately and only changes if there’s a conflict.

@jasheal
Copy link

jasheal commented Jan 12, 2019

@simonas-notcat @mi-xu @pelle

Another thing to consider for scalability (to cloud) is to have 2 graohQL proxy layers similar to how Prisma works. We have a database proxy that maps exactly to the database. The types describe the database 1:1 and then we have a application layer with app specific logic that sends its queries and mutations to the root database later. We can then just simply move the database layer to the cloud when the time comes.

@mirceanis mirceanis force-pushed the feature/#162827978/graphql branch from ebc83e3 to c6c26b1 Compare February 1, 2019 11:21
@simonas-notcat simonas-notcat merged commit 374dd50 into feature/sqlite-support Feb 1, 2019
@mirceanis mirceanis deleted the feature/#162827978/graphql branch January 22, 2020 11:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants