Compare commits

...

3 commits

Author SHA1 Message Date
Krzysztof Wolski
5e4836fbd2 Fix types for the webhooks 2023-06-19 17:17:48 +02:00
Krzysztof Wolski
09d3ab7ad5 Add changelog 2023-06-19 17:08:50 +02:00
Krzysztof Wolski
80a6801458 Remove codegen urql package 2023-06-19 17:06:43 +02:00
28 changed files with 287 additions and 403 deletions

View file

@ -0,0 +1,15 @@
---
"saleor-app-emails-and-messages": patch
"saleor-app-data-importer": patch
"saleor-app-products-feed": patch
"saleor-app-monitoring": patch
"saleor-app-invoices": patch
"saleor-app-klaviyo": patch
"saleor-app-search": patch
"saleor-app-slack": patch
"saleor-app-taxes": patch
"saleor-app-cms": patch
"saleor-app-crm": patch
---
Removed `typescript-urql` package. All packages use `TypedDocument` for making GraphQL operations.

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -44,7 +44,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@types/react": "18.2.5", "@types/react": "18.2.5",

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -47,7 +47,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "^8.0.1",

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -46,7 +46,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "^8.0.1",

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -59,7 +59,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "^8.0.1",

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -47,7 +47,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@types/react": "18.2.5", "@types/react": "18.2.5",
"@types/react-dom": "18.2.5", "@types/react-dom": "18.2.5",

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -40,7 +40,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@types/react": "18.2.5", "@types/react": "18.2.5",
"@types/react-dom": "18.2.5", "@types/react-dom": "18.2.5",

View file

@ -2,8 +2,8 @@ import { NextWebhookApiHandler, SaleorAsyncWebhook } from "@saleor/app-sdk/handl
import { gql } from "urql"; import { gql } from "urql";
import { import {
CustomerCreatedDocument,
CustomerCreatedWebhookPayloadFragment, CustomerCreatedWebhookPayloadFragment,
UntypedCustomerCreatedDocument,
} from "../../../../generated/graphql"; } from "../../../../generated/graphql";
import { Klaviyo } from "../../../lib/klaviyo"; import { Klaviyo } from "../../../lib/klaviyo";
import { createSettingsManager } from "../../../lib/metadata"; import { createSettingsManager } from "../../../lib/metadata";
@ -55,7 +55,7 @@ export const customerCreatedWebhook = new SaleorAsyncWebhook<CustomerCreatedWebh
webhookPath: "api/webhooks/customer-created", webhookPath: "api/webhooks/customer-created",
event: "CUSTOMER_CREATED", event: "CUSTOMER_CREATED",
apl: saleorApp.apl, apl: saleorApp.apl,
query: UntypedCustomerCreatedDocument, query: CustomerCreatedDocument,
} }
); );

View file

@ -3,7 +3,7 @@ import { gql } from "urql";
import { import {
FulfillmentCreatedWebhookPayloadFragment, FulfillmentCreatedWebhookPayloadFragment,
UntypedFulfillmentCreatedDocument, FulfillmentCreatedDocument,
} from "../../../../generated/graphql"; } from "../../../../generated/graphql";
import { Klaviyo } from "../../../lib/klaviyo"; import { Klaviyo } from "../../../lib/klaviyo";
import { createSettingsManager } from "../../../lib/metadata"; import { createSettingsManager } from "../../../lib/metadata";
@ -62,7 +62,7 @@ export const fulfillmentCreatedWebhook =
webhookPath: "api/webhooks/fulfillment-created", webhookPath: "api/webhooks/fulfillment-created",
event: "FULFILLMENT_CREATED", event: "FULFILLMENT_CREATED",
apl: saleorApp.apl, apl: saleorApp.apl,
query: UntypedFulfillmentCreatedDocument, query: FulfillmentCreatedDocument,
}); });
const handler: NextWebhookApiHandler<FulfillmentCreatedWebhookPayloadFragment> = async ( const handler: NextWebhookApiHandler<FulfillmentCreatedWebhookPayloadFragment> = async (

View file

@ -3,7 +3,7 @@ import { gql } from "urql";
import { import {
OrderCreatedWebhookPayloadFragment, OrderCreatedWebhookPayloadFragment,
UntypedOrderCreatedDocument, OrderCreatedDocument,
} from "../../../../generated/graphql"; } from "../../../../generated/graphql";
import { Klaviyo } from "../../../lib/klaviyo"; import { Klaviyo } from "../../../lib/klaviyo";
import { createSettingsManager } from "../../../lib/metadata"; import { createSettingsManager } from "../../../lib/metadata";
@ -32,7 +32,7 @@ export const orderCreatedWebhook = new SaleorAsyncWebhook<OrderCreatedWebhookPay
webhookPath: "api/webhooks/order-created", webhookPath: "api/webhooks/order-created",
event: "ORDER_CREATED", event: "ORDER_CREATED",
apl: saleorApp.apl, apl: saleorApp.apl,
query: UntypedOrderCreatedDocument, query: OrderCreatedDocument,
}); });
const handler: NextWebhookApiHandler<OrderCreatedWebhookPayloadFragment> = async ( const handler: NextWebhookApiHandler<OrderCreatedWebhookPayloadFragment> = async (

View file

@ -3,7 +3,7 @@ import { gql } from "urql";
import { import {
OrderFullyPaidWebhookPayloadFragment, OrderFullyPaidWebhookPayloadFragment,
UntypedOrderFullyPaidDocument, OrderFullyPaidDocument,
} from "../../../../generated/graphql"; } from "../../../../generated/graphql";
import { Klaviyo } from "../../../lib/klaviyo"; import { Klaviyo } from "../../../lib/klaviyo";
import { createSettingsManager } from "../../../lib/metadata"; import { createSettingsManager } from "../../../lib/metadata";
@ -32,7 +32,7 @@ export const orderFullyPaidWebhook = new SaleorAsyncWebhook<OrderFullyPaidWebhoo
webhookPath: "api/webhooks/order-fully-paid", webhookPath: "api/webhooks/order-fully-paid",
event: "ORDER_FULLY_PAID", event: "ORDER_FULLY_PAID",
apl: saleorApp.apl, apl: saleorApp.apl,
query: UntypedOrderFullyPaidDocument, query: OrderFullyPaidDocument,
}); });
const handler: NextWebhookApiHandler<OrderFullyPaidWebhookPayloadFragment> = async ( const handler: NextWebhookApiHandler<OrderFullyPaidWebhookPayloadFragment> = async (

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -40,7 +40,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "^8.0.1",

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -53,7 +53,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "^8.0.1",

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -44,7 +44,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@types/react": "18.2.5", "@types/react": "18.2.5",
"@types/react-dom": "18.2.5", "@types/react-dom": "18.2.5",

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -42,7 +42,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@types/react": "18.2.5", "@types/react": "18.2.5",
"@types/react-dom": "18.2.5", "@types/react-dom": "18.2.5",

View file

@ -10,9 +10,6 @@ extensions:
plugins: plugins:
- typescript - typescript
- typescript-operations - typescript-operations
- typescript-urql:
documentVariablePrefix: "Untyped"
fragmentVariablePrefix: "Untyped"
- typed-document-node - typed-document-node
generated/schema.graphql: generated/schema.graphql:
plugins: plugins:

View file

@ -52,7 +52,6 @@
"@graphql-codegen/typed-document-node": "3.0.2", "@graphql-codegen/typed-document-node": "3.0.2",
"@graphql-codegen/typescript": "3.0.2", "@graphql-codegen/typescript": "3.0.2",
"@graphql-codegen/typescript-operations": "3.0.2", "@graphql-codegen/typescript-operations": "3.0.2",
"@graphql-codegen/typescript-urql": "3.7.3",
"@graphql-typed-document-node/core": "3.2.0", "@graphql-typed-document-node/core": "3.2.0",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "^8.0.1",

File diff suppressed because it is too large Load diff