Execution is not even getting to the service – I get api errors in “KnownArgumentNamesRule”
api | GraphQLError: Unknown argument “business” on field “Query.labels”.
api | GraphQLError: Unknown argument “title” on field “Query.labels”.
api | GraphQLError: Unknown argument “phone” on field “Query.labels”.
api |
api | 1 Object.Argument
api | …/labels-project/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js:46
Something is even stopping me from getting there to figure it out…
The RW api service doesn’t care if you use a Prisma client, Contentful client, got, axios, fetch, another GraphQL via Hasura – whatever – your service is a service that “does something” and returns information that matches the SDL you’ve defined such that RW’s graphql (which is a just a function … and will be an AWS lambda function if you deploy say to Netlify) returns that data.
I recommend reading:
to see how the cell component works on the web side.
As noted in the docs:
While it might seem like there must be lot of magic involved, a Cell is actually just a higher-order component that executes a GraphQL query and manages its lifecycle. All the logic’s actually in just one file: withCellHOC.tsx. The idea is that, by exporting named constants that match the parameters of withCell , Redwood can assemble this higher-order component out of these constants at build-time using a babel plugin!
So, you need to respond with something that will cause the Error lifecycle:
Maybe try → catch and then rethrow in your service around that return fetch(awsUrl, {method, headers, body})?