A GraphCMS UI extension to trigger POST
request to an API endpoint.
- API Endpoint
- API Key: It will be added in
Authorization
header asBearer
token
The extension will POST
the API endpoint.
The body of the request contains all fields of the current object, along with the model name, in the JSON format.
- CORS must be enabled on the API endpoint to accept request from the UIX domain (https://graphcms-uix-trigger-api.vercel.app). The CORS must also allow the header
Authorization
, and the HTTP methodsOPTIONS
andPOST
. - The request does not set
Content-Type: application/json
header. I found it a little inconvient to use with NextJS API routes.
- Migrate project from CRA to Vite
- In case CORS can not be enabled on the server, we can add
no-cors
mode tofetch
. This will make the response typeopaque
- Support customization by adding few fields when adding UIX to sidebar
- Stylize the UI
- @cadudecastroalves for helping me to get started on GraphCMS UIX