Skip to content

DateTime Scalar? #1006

Closed Answered by ccfiel
ccfiel asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, I solved this one by importing DateTimeResolver. Problem solved! :)

import SchemaBuilder from '@pothos/core';
import PrismaPlugin from '@pothos/plugin-prisma';
import SimpleObjectsPlugin from '@pothos/plugin-simple-objects';
import { DateTimeResolver, JSONResolver } from 'graphql-scalars';
import ScopeAuthPlugin from '@pothos/plugin-scope-auth';

import type PrismaTypes from '../prisma/generated';

import { db } from './db';
import { User } from './graphql/Auth';

export const builder = new SchemaBuilder<{
  PrismaTypes: PrismaTypes;
  Context: { currentUser: User };
  Scalars: {
    JSON: {
      Input: unknown;
      Output: unknown;
    };
    DateTime: {
      Input: Date;
     …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ccfiel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant