Like what we’re doing? Star us on GitHub!

Expected DateTime to be a GraphQL nullable type.

generator101
3 weeks ago
3

Has anyone faced this issue? I am trying to deploy payload and I get this on the server log



2023-02-24T15:22:23.933722656Z stderr F 
2023-02-24T15:22:23.933610406Z stderr F     at async initHTTP (/home/node/node_modules/payload/dist/initHTTP.js:28:21)
2023-02-24T15:22:23.933607812Z stderr F     at async getPayload (/home/node/node_modules/payload/dist/payload.js:236:26)
2023-02-24T15:22:23.933605289Z stderr F     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-02-24T15:22:23.933602511Z stderr F     at BasePayload.init (/home/node/node_modules/payload/dist/payload.js:209:42)
2023-02-24T15:22:23.933599844Z stderr F     at registerSchema (/home/node/node_modules/payload/dist/graphql/registerSchema.js:58:24)
2023-02-24T15:22:23.9335964Z stderr F     at initCollectionsGraphQL (/home/node/node_modules/payload/dist/collections/graphql/init.js:60:38)
2023-02-24T15:22:23.933593024Z stderr F     at Array.forEach (<anonymous>)
2023-02-24T15:22:23.933589447Z stderr F     at /home/node/node_modules/payload/dist/collections/graphql/init.js:101:23
2023-02-24T15:22:23.933586504Z stderr F     at new GraphQLNonNull (/home/node/node_modules/payload/node_modules/graphql/type/definition.js:395:32)
2023-02-24T15:22:23.933583663Z stderr F     at devAssert (/home/node/node_modules/payload/node_modules/graphql/jsutils/devAssert.js:12:11)
2023-02-24T15:22:23.933578341Z stderr F Error: Expected DateTime to be a GraphQL nullable type.
2023-02-24T15:22:23.933575552Z stderr F 
2023-02-24T15:22:23.933572703Z stderr F           ^
2023-02-24T15:22:23.933567927Z stderr F     throw new Error(message);
2023-02-24T15:22:23.933516156Z stderr F /home/node/node_modules/payload/node_modules/graphql/jsutils/devAssert.js:12
  • jesschow
    Payload Team
    2 weeks ago

    Hi @generator101 - is DateTime a field that you have added?

  • generator101
    2 weeks ago

    no



    I think the issue was related to the npm vs yarn

Open the post
Continue the discussion in Discord
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More