From f407a02ffed4fe0d07439709a684c69dd1b4890d Mon Sep 17 00:00:00 2001 From: bikov Date: Sun, 2 Jun 2019 11:31:56 +0300 Subject: [PATCH] fix(scalars): date scalar resolver delete resolver for the date scalar , now date is working always --- src/schema/common/date.ts | 2 -- src/schema/utils/polaris-schema-creator.ts | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/schema/common/date.ts b/src/schema/common/date.ts index b526b78..146643f 100644 --- a/src/schema/common/date.ts +++ b/src/schema/common/date.ts @@ -1,7 +1,5 @@ import { gql } from 'apollo-server-core'; -import { GraphQLDateTime } from 'graphql-iso-date'; export const dateSchema = gql` scalar Date `; -export const dateResolver = { Date: GraphQLDateTime }; diff --git a/src/schema/utils/polaris-schema-creator.ts b/src/schema/utils/polaris-schema-creator.ts index 302ecd6..5fc763f 100644 --- a/src/schema/utils/polaris-schema-creator.ts +++ b/src/schema/utils/polaris-schema-creator.ts @@ -2,7 +2,7 @@ import { buildSchema, GraphQLSchema } from 'graphql'; import { IExecutableSchemaDefinition, makeExecutableSchema } from 'graphql-tools'; import { mergeResolvers, mergeTypes } from 'merge-graphql-schemas'; import { CommonEntityInterface } from '../common/common-entity-interface'; -import { dateResolver, dateSchema } from '../common/date'; +import { dateSchema } from '../common/date'; export function makeExecutablePolarisSchema({ typeDefs, @@ -24,7 +24,7 @@ export function makeExecutablePolarisSchema({ ); return makeExecutableSchema({ typeDefs: typeDefsWithCommonEntity, - resolvers: mergeResolvers([dateResolver, ...(resolvers as [])]), // resolvers, + resolvers: mergeResolvers(resolvers as []), connectors, logger, allowUndefinedInResolve,