Skip to content

Commit

Permalink
Merge pull request #56 from bikov/master
Browse files Browse the repository at this point in the history
fix(scalars): date scalar resolver
  • Loading branch information
yarinvak authored Jun 13, 2019
2 parents f8a9fdd + f407a02 commit fd8deaf
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 fd8deaf

Please sign in to comment.