I am building an embedded app to select products and save them to a database. I want to make a POST request to an endpoint that will save my selections to a mongodb database.
I used the Shopify CLI to create a Node.js application. My attempts to create a working API endpoint so far have entailed:
At this point, I get a 500 server error with a message:
Error: Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead.
in testPost (at _app.js:30)
_app.js line 30 is inside the ApolloProvider, so I think somehow I need to separate the API response. But I'm lost at from here. Any suggestions on how I can create a working API endpoint for POST requests from my embedded app?
Thank you!!
User | Count |
---|---|
13 | |
12 | |
10 | |
8 | |
8 |