mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
fixed graphql docs, added graphql tutorial
This commit is contained in:
+5
-1
@@ -1,5 +1,6 @@
|
||||
const {
|
||||
makeExecutableSchema,
|
||||
addResolveFunctionsToSchema,
|
||||
addSchemaLevelResolveFunction,
|
||||
} = require('graphql-tools');
|
||||
const debug = require('debug')('talk:graph:schema');
|
||||
@@ -10,7 +11,10 @@ const plugins = require('../services/plugins');
|
||||
const resolvers = require('./resolvers');
|
||||
const typeDefs = require('./typeDefs');
|
||||
|
||||
const schema = makeExecutableSchema({ typeDefs, resolvers });
|
||||
const schema = makeExecutableSchema({ typeDefs });
|
||||
|
||||
// Add the resolvers to the schema
|
||||
addResolveFunctionsToSchema(schema, resolvers);
|
||||
|
||||
// Plugin to the schema level resolvers to provide an before/after hook.
|
||||
decorateWithHooks(schema, plugins.get('server', 'hooks'));
|
||||
|
||||
+1
-5
@@ -1,10 +1,6 @@
|
||||
// TODO: Adjust `RootQuery.asset(id: ID, url: String)` to instead be
|
||||
// `RootQuery.asset(id: ID, url: String!)` because we'll always need the url, if
|
||||
// this change is done now everything will likely break on the front end.
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { mergeStrings } = require('gql-merge');
|
||||
const { mergeStrings } = require('@coralproject/gql-merge');
|
||||
const debug = require('debug')('talk:graph:typeDefs');
|
||||
const plugins = require('../services/plugins');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user