mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
Add integration tests!
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
import { getGraphQLProjectConfig } from "graphql-config";
|
||||
import { addResolveFunctionsToSchema, IResolvers } from "graphql-tools";
|
||||
|
||||
export default function loadSchema(projectName: string, resolvers: IResolvers) {
|
||||
// Load the configuration from the provided `.graphqlconfig` file.
|
||||
const config = getGraphQLProjectConfig(__dirname, projectName);
|
||||
|
||||
// Get the GraphQLSchema from the configuration.
|
||||
const schema = config.getSchema();
|
||||
|
||||
// Attach the resolvers to the schema.
|
||||
addResolveFunctionsToSchema({ schema, resolvers });
|
||||
|
||||
return schema;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import loadSchema from "talk-server/graph/common/schema";
|
||||
import { loadSchema } from "talk-common/graphql";
|
||||
import resolvers from "talk-server/graph/management/resolvers";
|
||||
|
||||
export default function getManagementSchema() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import loadSchema from "talk-server/graph/common/schema";
|
||||
import { loadSchema } from "talk-common/graphql";
|
||||
import resolvers from "talk-server/graph/tenant/resolvers";
|
||||
|
||||
export default function getTenantSchema() {
|
||||
|
||||
Reference in New Issue
Block a user