Update doc for register handler (#151)

This commit is contained in:
Lukasz Ostrowski 2023-01-19 14:17:36 +01:00 committed by GitHub
parent 62a9c2b11f
commit 74e3f40ca5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,6 +61,7 @@ import { VercelAPL } from "./vercel-apl";
export default createAppRegisterHandler({
apl: new VercelAPL(),
allowedSaleorUrls: ["https://your-saleor.saleor.cloud/graphql/"], // optional, see options below
});
```
@ -69,6 +70,11 @@ Options provided to handler factory
```typescript
export type CreateAppRegisterHandlerOptions = {
apl: APL;
/**
* Provide your Saleor /graphql/ endpoints (or functions),
* to allow app registration only in allowed Saleor instances.
*/
allowedSaleorUrls?: Array<string | ((saleorApiUrl: string) => boolean)>;
};
```