You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import 'reflect-metadata';
import http from 'node:http';
import { ApolloServer } from '@apollo/server';
import { expressMiddleware } from '@apollo/server/express4';
import { ApolloServerPluginDrainHttpServer } from '@apollo/server/plugin/drainHttpServer';
import cors from 'cors';
import express, { type NextFunction, type Request, type Response } from 'express';
import graphqlUploadExpress from 'graphql-upload/graphqlUploadExpress.mjs';
import { config } from './config/config.js';
// import { graphqlQueryComplexity } from './graphql/lib/graphqlQueryComplexity.lib.js';
import { typegraphqlSchema } from './graphql/typegraphqlSchema.js';
import { restRouter } from './rest/routes/route.js';
async function main() {
try {
const port = config.app.APP_PORT;
const app = express();
const http_server = http.createServer(app);
import type { GraphQLRequest } from '@apollo/server';
import type { DocumentNode } from 'graphql';
import { fieldExtensionsEstimator, getComplexity, simpleEstimator } from 'graphql-query-complexity';
import { config } from '../../config/config.js';
import { typegraphqlSchema } from '../typegraphqlSchema.js';
import 'reflect-metadata';
import http from 'node:http';
import { ApolloServer } from '@apollo/server';
import { expressMiddleware } from '@apollo/server/express4';
import { ApolloServerPluginDrainHttpServer } from '@apollo/server/plugin/drainHttpServer';
import cors from 'cors';
import express, { type NextFunction, type Request, type Response } from 'express';
import graphqlUploadExpress from 'graphql-upload/graphqlUploadExpress.mjs';
import { config } from './config/config.js';
// import { graphqlQueryComplexity } from './graphql/lib/graphqlQueryComplexity.lib.js';
import { typegraphqlSchema } from './graphql/typegraphqlSchema.js';
import { restRouter } from './rest/routes/route.js';
async function main() {
try {
const port = config.app.APP_PORT;
const app = express();
const http_server = http.createServer(app);
} catch (error) {
console.log('[Error]:', error);
}
}
main();
import type { GraphQLRequest } from '@apollo/server';
import type { DocumentNode } from 'graphql';
import { fieldExtensionsEstimator, getComplexity, simpleEstimator } from 'graphql-query-complexity';
import { config } from '../../config/config.js';
import { typegraphqlSchema } from '../typegraphqlSchema.js';
export const graphqlQueryComplexity = {
requestDidStart: async () => ({
async didResolveOperation({ request, document }: { request: GraphQLRequest; document: DocumentNode }) {
const complexity = getComplexity({
schema: typegraphqlSchema,
operationName: request.operationName,
query: document,
variables: request.variables,
estimators: [fieldExtensionsEstimator(), simpleEstimator({ defaultComplexity: 1 })],
});
}),
};
error
Schema Introspection Failure
Introspection is disabled on this endpoint. Enable introspection to populate your schema.
Unable to reach server
We were unable to introspect your endpoint. Please enable introspection on your server. (You might still be able to submit operations!)
The text was updated successfully, but these errors were encountered: