Error for query in *resolver only*

prisma

#1

I recently added two columns to my database (both Int!). After re-deploying, attempting to query for these fields via context.db in a resolver returns the error:

Cannot query field <field> on type <type>...

This error only happens in code. Issuing the same query via the Playground does not produce the error. Has anyone ever seen this?? What is going on?

All help greatly appreciated.


#2

Are you sure your server and playground are pointing to the same Prisma server?


#3

Sounds like you are overwriting the type in your own schema.graphql, but you didn’t add the two integer fields.

To say more, you need to share more of your setup:

  • datamodel
  • generated prisma.graphql file
  • schema.graphql

#4

Thanks for the replies guys. I restarted my computer and it worked. Not sure what happened there…