Without actually running your code, I think the problem is in your GraphQL schema definition.
The file db/schema.gql contains:
type User {
netlifyID: ID!
stripeID: ID!
}
type Query {
getUserByNetlifyID(netlifyID: ID!): User!
getUserByStripeID(stripeID: ID!): User!
}
The ID type is a Fauna document ID, which is a string-encoded 64-bit integer. If the Netlify and/or Stripe ids are not that type, your query would fail.
Likely, the simplest thing to do would be to update your schema to use the String type:
type User {
netlifyID: String!
stripeID: String!
}
type Query {
getUserByNetlifyID(netlifyID: String!): User!
getUserByStripeID(stripeID: String!): User!
}
I would suggest verifying that the GraphQL mutation from your example works in the Dashboard’s GraphQL page before making any adjustments to your app logic. Just replace the dynamic bits with static values that represent actual Netlify/Stripe ids.