mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2025-06-20 04:48:24 -06:00
PR-780243: adding only one source of truth.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import { getTest, addText } from '../../controllers/controllerGraphQL';
|
||||
import { getTest, addText } from '@controllerGraphQL';
|
||||
|
||||
// A map of functions which return data for the schema.
|
||||
const resolvers = {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { makeExecutableSchema } from '@graphql-tools/schema';
|
||||
import resolvers from'../resolvers';
|
||||
import resolvers from'@GraphQL/resolvers';
|
||||
import Test from './Test.gql';
|
||||
|
||||
// The GraphQL schema
|
||||
|
@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
import express from 'express'; //express
|
||||
import { graphqlHTTP } from 'express-graphql';
|
||||
import { config } from '../../config';
|
||||
import schema from './schema';
|
||||
import { config } from '@config';
|
||||
import schema from '@GraphQL/schema';
|
||||
|
||||
const server = express.Router();//Router de Express
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import { getTestModel, addTextModel } from '../../models';
|
||||
import { getTestModel, addTextModel } from '@models';
|
||||
|
||||
// eslint-disable-next-line
|
||||
export const getTest = async ({rootValue, args, context}) => {
|
||||
|
@ -6,11 +6,11 @@ import cors from 'cors';
|
||||
import cookieParser from 'cookie-parser';
|
||||
import { useServer } from 'graphql-ws/lib/use/ws';
|
||||
import { execute, subscribe } from 'graphql';
|
||||
import GraphQLserver from './GraphQL/server';// Server of GraphQL,
|
||||
import GraphQLserver from '@GraphQL/server';// Server of GraphQL,
|
||||
import expressPlayground from 'graphql-playground-middleware-express';
|
||||
import schema from './GraphQL/schema';
|
||||
import { config } from '../config';
|
||||
import apiRouter from './routes';
|
||||
import schema from '@GraphQL/schema';
|
||||
import { config } from '@config';
|
||||
import apiRouter from '@routes';
|
||||
|
||||
const app = express(), //creating app
|
||||
whitelist = config.WHITELIST_URLS,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import server from '../../index';
|
||||
import server from '@src';
|
||||
import supertest from 'supertest';
|
||||
describe('global server tests', () => {
|
||||
let request;
|
||||
|
Reference in New Issue
Block a user