Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodlenet
MoodleNet Frontend
Commits
7b9329f0
Commit
7b9329f0
authored
Jun 01, 2020
by
aleclofabbro
Browse files
Merge branch 'refactor/apollo_client_use_gql_generated_fragment_matcher' into develop
parents
9e57a310
cef62516
Changes
3
Hide whitespace changes
Inline
Side-by-side
codegen.yml
View file @
7b9329f0
...
...
@@ -4,19 +4,16 @@ overwrite: true
watch
:
false
hooks
:
afterStart
:
-
node codegencleanup
onWatchTriggered
:
-
node codegencleanup
-
node codegencleanup
generates
:
src/graphql/schema.generated.json
:
plugins
:
-
introspection
src/graphql/types.generated.ts
:
plugins
:
-
typescript
-
fragment-matcher
-
typescript-resolvers
src/graphql/schema.generated.json
:
plugins
:
-
introspection
src/graphql/
:
preset
:
near-operation-file
presetConfig
:
...
...
src/apollo/client.tsx
View file @
7b9329f0
...
...
@@ -32,13 +32,12 @@ import {
import
{
getOpType
}
from
'
../util/apollo/operation
'
;
import
{
KVStore
}
from
'
../util/keyvaluestore/types
'
;
import
{
createUploadLink
}
from
'
./uploadLink.js
'
;
cons
t
introspectionQueryResultData
=
require
(
'
../fragmentTypes.json
'
)
;
impor
t
introspectionQueryResultData
from
'
graphql/types.generated
'
;
export
type
MutationName
=
keyof
RootMutationType
;
export
type
QueryName
=
keyof
RootQueryType
;
export
type
OperationName
=
QueryName
|
MutationName
;
// const { meQuery } = require('../../../graphql/me.graphql');
interface
Cfg
{
localKVStore
:
KVStore
;
appLinks
:
ApolloLink
[];
...
...
tsconfig.json
View file @
7b9329f0
{
"compilerOptions"
:
{
"resolveJsonModule"
:
true
,
"outDir"
:
"build/dist"
,
"module"
:
"esnext"
,
"target"
:
"es5"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment