Variable "$uid" of required type "String!" was not provided

Hello @christian!

There are a few things to note here:

  1. When creating dynamic pages with the Prismic Gatsby source plugin you should use the plugin config rather than the config in gatsby-node. Check out this other thread where i answered a related question:
  1. In the config for the pages, dynamic pages need to be created under the templates folder. Try and changing your "page component' to that folder, change the route in the plugin config and try again.

  2. Since the plugin passes dynamic data to the queries, the lang parameter should be a variable instead of a literal value. Read How to dynamically query documents by language

  3. This is an extra validation that is not related but important. When retrieving the data in your templates you must Adding a validation check.

1 Like