Closed dOrgJelli closed 4 years ago
Merging #12 into master will increase coverage by
0.67%
. The diff coverage is97.18%
.
@@ Coverage Diff @@
## master #12 +/- ##
==========================================
+ Coverage 97% 97.68% +0.67%
==========================================
Files 14 14
Lines 234 259 +25
Branches 35 42 +7
==========================================
+ Hits 227 253 +26
+ Misses 3 1 -2
- Partials 4 5 +1
Impacted Files | Coverage Δ | |
---|---|---|
packages/mutations/src/mutationState/index.ts | 100% <ø> (+6.06%) |
:arrow_up: |
packages/mutations/src/utils/schema.ts | 100% <ø> (ø) |
:arrow_up: |
packages/mutations/src/utils/async.ts | 100% <100%> (ø) |
:arrow_up: |
...utations-apollo-react/src/__tests__/utils/index.ts | 100% <100%> (ø) |
:arrow_up: |
packages/mutations-apollo-react/src/index.ts | 96.42% <100%> (+2.31%) |
:arrow_up: |
packages/mutations/src/index.ts | 93.33% <94.11%> (-1.91%) |
:arrow_down: |
.../mutations/src/executors/mutation/localResolver.ts | 97.56% <97.43%> (+4.22%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f0f500c...64b9075. Read the comment docs.
Actually, I'm going to rebase this before merging, to clean up the commit messages.
Closes https://github.com/graphprotocol/mutations/issues/11
Changes to note:
schema: string
as part of the default object.@graphprotocol/mutations
because we need to create a "remote query executor" whencontext.client
isn't present. The imports required are:data
result handling for multiple mutation execution has been implemented. The naming convention is the same as the mutation state. See the test atmutations.test.ts
line #160 for an example of this.createMutationsLink(...)
has been moved to@graphprotocol/mutations-apollo-react
Externalities
graph-cli
will need to be updated to (1) check for theschema
property in the default export, (2) verify it'stypeof
string, and (3) try tobuildSchema
to verify it's valid and has all the correct resolvers defined.schema.graphql
file, as a string, into Javascript should be created for developers. In order to do this a developer would either have to modify webpack/babel, or create adeclare module '*.graphql' { ... }
in Typescript, letting tsc know that the file being imported should be treated as a string.