Commit cef62516 authored by aleclofabbro's avatar aleclofabbro

GQL code generator also generates a fragment matcher, let apollo client use...

GQL code generator also generates a fragment matcher, let apollo client use that instead of the build/start script one . a step toward rewrite|simplification of build scripts
parent 9e57a310
......@@ -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:
......
......@@ -32,13 +32,12 @@ import {
import { getOpType } from '../util/apollo/operation';
import { KVStore } from '../util/keyvaluestore/types';
import { createUploadLink } from './uploadLink.js';
const introspectionQueryResultData = require('../fragmentTypes.json');
import 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[];
......
{
"compilerOptions": {
"resolveJsonModule": true,
"outDir": "build/dist",
"module": "esnext",
"target": "es5",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment