Proxy contract
When securityMode: 'proxy', the SDK posts to proxyEndpoint || endpoint with:
- Method:
POST - Headers:
Content-Type: application/jsonX-Client-ID: <clientId>(if configured)Authorization: Bearer <token>(ifgetAccessToken()returns a token)- Any
headersyou supplied in config
- Body:
{ query, variables, operationName }
Your proxy is expected to:
- Attach the upstream
apikeyheader (andorderEditorApiKeyfor the operations you allow-list). - Forward the request to the upstream Propeller GraphQL endpoint.
- Return the upstream JSON response untouched.
A minimal Node/Edge handler:
export async function handler(req: Request) {
const upstream = await fetch('https://api.helice.cloud/v2/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
apikey: process.env.PROPELLER_API_KEY!,
},
body: await req.text(),
});
return new Response(await upstream.text(), {
status: upstream.status,
headers: { 'Content-Type': 'application/json' },
});
}