PR-780243: adding only one source of truth.

This commit is contained in:
2023-03-06 22:19:22 +00:00
parent d65cbe8b37
commit 4881de8667
12 changed files with 56 additions and 24 deletions

View File

@ -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 = {

View File

@ -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

View File

@ -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

View File

@ -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}) => {

View File

@ -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,

View File

@ -1,4 +1,4 @@
import server from '../../index';
import server from '@src';
import supertest from 'supertest';
describe('global server tests', () => {
let request;