Skip to content

Commit

Permalink
fix(scalars): date scalar resolver
Browse files Browse the repository at this point in the history
delete resolver for the date scalar , now date is working always
  • Loading branch information
bikov committed Jun 2, 2019
1 parent b0a2be3 commit f407a02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/schema/common/date.ts
Original file line number Diff line number Diff line change
@@ -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 };
4 changes: 2 additions & 2 deletions src/schema/utils/polaris-schema-creator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TContext = any>({
typeDefs,
Expand All @@ -24,7 +24,7 @@ export function makeExecutablePolarisSchema<TContext = any>({
);
return makeExecutableSchema({
typeDefs: typeDefsWithCommonEntity,
resolvers: mergeResolvers([dateResolver, ...(resolvers as [])]), // resolvers,
resolvers: mergeResolvers(resolvers as []),
connectors,
logger,
allowUndefinedInResolve,
Expand Down

0 comments on commit f407a02

Please sign in to comment.