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 f1bc8c3 commit e69e83f
Show file tree
Hide file tree
Showing 22 changed files with 26 additions and 26 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dreamit/graphql-server",
"version": "3.3.1",
"version": "3.3.2",
"description": "A GraphQL server written in NodeJS/Typescript.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -35,8 +35,8 @@
"jest-html-reporters": "3.1.4"
},
"peerDependencies": {
"graphql": "^16.0.0",
"@sgohlke/graphql-prom-metrics": "^1.0.2",
"@sgohlke/graphql-server-base": "^1.0.1"
"@dreamit/graphql-server-base": "^1.0.3",
"@sgohlke/graphql-prom-metrics": "^1.2.2",
"graphql": "^16.0.0"
}
}
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/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ export * from './server/GraphQLServer'
export * from './server/GraphQLServerOptions'

// For backwards-compatibility with graphql-server v3 versions and extensions
export * from '@sgohlke/graphql-server-base'
export * from '@dreamit/graphql-server-base'
2 changes: 1 addition & 1 deletion src/logger/JsonLogger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Logger} from '@sgohlke/graphql-server-base'
import {Logger} from '@dreamit/graphql-server-base'
import {Console} from 'node:console'
import {
LogEntry,
Expand Down
2 changes: 1 addition & 1 deletion src/logger/TextLogger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Logger} from '@sgohlke/graphql-server-base'
import {Logger} from '@dreamit/graphql-server-base'
import {
LogLevel,
LogEntry,
Expand Down
2 changes: 1 addition & 1 deletion src/metrics/IncreaseFetchOrGraphQLErrorMetric.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
Logger,
MetricsClient
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'
import {
determineGraphQLOrFetchError,
} from '..'
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/ContentType.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/request/DefaultRequestInformationExtractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ContentType,
GraphQLRequestInfo,
GraphQLServerRequest
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'

/**
* Default implementation of RequestInformationExtractor interface
Expand Down
2 changes: 1 addition & 1 deletion src/request/RequestInformationExtractor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
GraphQLRequestInfo,
GraphQLServerRequest
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'

/**
* Interface for RequestInformationExtractor.
Expand Down
2 changes: 1 addition & 1 deletion src/response/DefaultResponseHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ResponseParameters
} from '..'
import {GraphQLError} from 'graphql'
import { GraphQLExecutionResult } from '@sgohlke/graphql-server-base'
import { GraphQLExecutionResult } from '@dreamit/graphql-server-base'

/**
* Default implementation of ResponseHandler interface
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/ResponseHandler.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
GraphQLExecutionResult,
ResponseParameters
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'

/**
* Interface for ResponseHandler.
Expand Down
2 changes: 1 addition & 1 deletion src/server/DefaultGraphQLServerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
GraphQLServerResponse,
Logger,
MetricsClient
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'

export const fallbackTextLogger = new TextLogger('fallback-logger', 'fallback-service')
export const defaultRequestInformationExtractor = new DefaultRequestInformationExtractor()
Expand Down
4 changes: 2 additions & 2 deletions src/server/GraphQLServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
GraphQLRequestInfo,
GraphQLExecutionResult,
MetricsClient,
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'
import {
GraphQLServerOptions,
isAggregateError,
Expand Down Expand Up @@ -114,7 +114,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 @@ -4,7 +4,7 @@ import {
MetricsClient,
GraphQLServerRequest,
GraphQLServerResponse,
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'
import {
RequestInformationExtractor,
ResponseHandler
Expand Down
2 changes: 1 addition & 1 deletion tests/ExampleSchemas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {GraphQLRequestInfo} from '@sgohlke/graphql-server-base'
import {GraphQLRequestInfo} from '@dreamit/graphql-server-base'
import {
buildSchema,
GraphQLError,
Expand Down
2 changes: 1 addition & 1 deletion tests/TestHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from './ExampleSchemas'
import fetch from 'cross-fetch'
import {Console} from 'node:console'
import { GraphQLRequestInfo } from '@sgohlke/graphql-server-base'
import { GraphQLRequestInfo } from '@dreamit/graphql-server-base'

export class NoStacktraceJsonLogger extends JsonLogger {
loggerConsole: Console = new Console(process.stdout, process.stderr, false)
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 @@ -11,7 +11,7 @@ import {
SYNTAX_ERROR,
VALIDATION_ERROR,
MetricsClient,
} from '@sgohlke/graphql-server-base'
} from '@dreamit/graphql-server-base'
import {
GraphQLServer,
SimpleMetricsClient,
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 @@ -23,7 +23,7 @@ import {
} from '../ExampleSchemas'
import {TEXT_LOGGER} from '~/tests/TestHelpers'
import {PromMetricsClient} from '@sgohlke/graphql-prom-metrics'
import {GraphQLExecutionResult} from '@sgohlke/graphql-server-base'
import {GraphQLExecutionResult} from '@dreamit/graphql-server-base'

const graphQLErrorResponse: GraphQLExecutionResult = {
executionResult: {
Expand Down

0 comments on commit e69e83f

Please sign in to comment.