Hello,
new to JAMStack decided to follow Smashingmagazine query in https://www.smashingmagazine.com/2020/06/static-sites-jamstack-apps-faunadb/. I set up all according to tutorial but when building (gatsby develop) I keep getting an error
error There was an error in your GraphQL query:
Cannot query field "allSignature" on type "Query".
I have a account on fauna.com. My faunaDb “guestbook” contains a collection “signatures”. I have an index “allSignatures”.
My gatsby-config.js contains this entry for gatsby-source-faunadb
:
secret: process.env.GATSBY_FAUNADB_GUESTBOOK_KEY,
index: `allSignatures`,
type: `signature`,
my query:
graphql`
query GetSignatures {
allSignature {
nodes {
name: String
message: String
_ts: String
_id: String
}
}
}
`
I do not know why I am unable to request all field in the collection. According to the docs defining a type signature
allows me to use a query allSignature
.
This happens when the collection is empty (which is logical for a new db) and when a document with field name and message is added.
Is there a mismatch in the naming of collection / index or in gatsby-config.js type / index properties?
Thanks,
Marc