Skip to content

Commit

Permalink
Switch to dreamit graphql-server-base
Browse files Browse the repository at this point in the history
  • Loading branch information
sgohlke committed May 15, 2023
1 parent d9dd2b4 commit 9e3d70c
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dreamit/graphql-server",
"version": "4.0.0",
"version": "4.0.1",
"description": "A GraphQL server written in NodeJS/Typescript.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -30,12 +30,12 @@
"@sgohlke/ts-base-dependencies": "1.0.9",
"@types/content-type": "1.1.5",
"@types/express": "4.17.17",
"cross-fetch": "3.1.5",
"cross-fetch": "3.1.6",
"express": "4.18.2",
"jest-html-reporters": "3.1.4"
},
"peerDependencies": {
"graphql": "^16.0.0",
"@sgohlke/graphql-server-base": "^2.0.0"
"@dreamit/graphql-server-base": "^2.1.4"
}
}
2 changes: 1 addition & 1 deletion src/error/DetermineGraphQLOrFetchError.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
FETCH_ERROR,
GRAPHQL_ERROR
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'

/**
* Determines if an error is a GraphQLError or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
INTROSPECTION_DISABLED_ERROR,
VALIDATION_ERROR
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'

/**
* Determines if an error is a ValidationError or
Expand Down
2 changes: 1 addition & 1 deletion src/logger/JsonLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
createLogEntry
} from '..'
import {Console} from 'node:console'
import {Logger} from '@sgohlke/graphql-server-base'
import {Logger} from '@dreamit/graphql-server-base'

const loggerConsole: Console = new Console(process.stdout, process.stderr, false)

Expand Down
2 changes: 1 addition & 1 deletion src/logger/TextLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
LogLevel,
createLogEntry,
} from '..'
import {Logger} from '@sgohlke/graphql-server-base'
import {Logger} from '@dreamit/graphql-server-base'

/**
* Logger implementation that outputs log entries as text to console.
Expand Down
2 changes: 1 addition & 1 deletion src/metrics/NoMetricsClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-empty-function */
import { MetricsClient } from '@sgohlke/graphql-server-base'
import { MetricsClient } from '@dreamit/graphql-server-base'

/**
* Metrics client that does not collect any metrics.
Expand Down
2 changes: 1 addition & 1 deletion src/metrics/SimpleMetricsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SCHEMA_VALIDATION_ERROR,
SYNTAX_ERROR,
VALIDATION_ERROR
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'

/**
* Simple metrics client.
Expand Down
2 changes: 1 addition & 1 deletion src/request/ExtractInformationFromRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ContentType,
GraphQLRequestInfo,
GraphQLServerRequest
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'
import {Buffer} from 'node:buffer'
import {GraphQLError} from 'graphql'
import {URLSearchParams} from 'node:url'
Expand Down
2 changes: 1 addition & 1 deletion src/request/GetContentType.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContentType } from '@sgohlke/graphql-server-base'
import { ContentType } from '@dreamit/graphql-server-base'

export function getContentType(contentType?: string): ContentType {
if (contentType) {
Expand Down
2 changes: 1 addition & 1 deletion src/response/GraphQLExecutionResult.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
GraphQLError
} from 'graphql'
import {GraphQLExecutionResult} from '@sgohlke/graphql-server-base'
import {GraphQLExecutionResult} from '@dreamit/graphql-server-base'

export function getFirstErrorFromExecutionResult(result: GraphQLExecutionResult)
: GraphQLError {
Expand Down
2 changes: 1 addition & 1 deletion src/response/SendResponse.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Buffer} from 'node:buffer'
import { ResponseParameters } from '@sgohlke/graphql-server-base'
import { ResponseParameters } from '@dreamit/graphql-server-base'

/**
* Default implementation of sendResponse function
Expand Down
2 changes: 1 addition & 1 deletion src/server/DefaultGraphQLServerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
Logger,
MetricsClient,
ResponseParameters
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'
import {
GraphQLFieldResolver,
GraphQLTypeResolver
Expand Down
4 changes: 2 additions & 2 deletions src/server/GraphQLServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
SCHEMA_VALIDATION_ERROR,
SYNTAX_ERROR,
isGraphQLServerRequest,
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'

const requestCouldNotBeProcessed = 'Request could not be processed: '
const defaultOptions = new DefaultGraphQLServerOptions()
Expand Down Expand Up @@ -107,7 +107,7 @@ export class GraphQLServer {

// Gets the metrics for use in the response body.
async getMetrics(): Promise<string> {
return this.options.metricsClient.getMetrics()
return await this.options.metricsClient.getMetrics()
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/server/GraphQLServerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
Logger,
MetricsClient,
ResponseParameters
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'
import {
GraphQLFieldResolver,
GraphQLTypeResolver
Expand Down
2 changes: 1 addition & 1 deletion tests/ExampleSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
import {
AggregateError,
} from '~/src'
import {GraphQLRequestInfo} from '@sgohlke/graphql-server-base'
import {GraphQLRequestInfo} from '@dreamit/graphql-server-base'

// Contains example schemas and data that can be used across tests

Expand Down
2 changes: 1 addition & 1 deletion tests/TestHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
userSchemaResolvers
} from './ExampleSchemas'
import {Console} from 'node:console'
import { GraphQLRequestInfo } from '@sgohlke/graphql-server-base'
import { GraphQLRequestInfo } from '@dreamit/graphql-server-base'
import fetch from 'cross-fetch'

export class NoStacktraceJsonLogger extends JsonLogger {
Expand Down
2 changes: 1 addition & 1 deletion tests/metrics/MetricsClients.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
SCHEMA_VALIDATION_ERROR,
SYNTAX_ERROR,
VALIDATION_ERROR,
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'
import {
GRAPHQL_SERVER_PORT,
LOGGER,
Expand Down
2 changes: 1 addition & 1 deletion tests/response/CustomSendResponse.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {


import {Buffer} from 'node:buffer'
import { ResponseParameters } from '@sgohlke/graphql-server-base'
import { ResponseParameters } from '@dreamit/graphql-server-base'
import {Server} from 'node:http'
import bodyParser from 'body-parser'

Expand Down
2 changes: 1 addition & 1 deletion tests/server/GraphQLServer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
userTwo,
usersQuery
} from '../ExampleSchemas'
import {GraphQLExecutionResult} from '@sgohlke/graphql-server-base'
import {GraphQLExecutionResult} from '@dreamit/graphql-server-base'
import {TEXT_LOGGER} from '~/tests/TestHelpers'


Expand Down

0 comments on commit 9e3d70c

Please sign in to comment.