Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Expected DateTime to be a GraphQL nullable type.

default discord avatar
generator1012 years 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
  • discord user avatar
    jesschow
    2 years ago

    Hi

    @944284724824801302

    - is DateTime a field that you have added?

  • default discord avatar
    generator1012 years ago

    no



    I think the issue was related to the npm vs yarn

  • default discord avatar
    _sadajo_2 years ago

    Similar issue here, but I'm just trying to run a custom docker image.



    Did you end up switching to yarn or were you able to resolve it while continuing to use npm?



    I've just been able to solve it by adding the following to my package.json:



      "overrides": { "graphql@>15.7.0 <16.7.0": "^15.8.0" },
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.