Skip to content

Commit d241f0f

Browse files
committed
feat: include tenant id in webhook gql response
1 parent 39e8243 commit d241f0f

9 files changed

Lines changed: 40 additions & 2 deletions

File tree

packages/backend/src/graphql/generated/graphql.schema.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/backend/src/graphql/generated/graphql.ts

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/backend/src/graphql/resolvers/webhooks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@ export const webhookEventToGraphql = (
4545
id: webhookEvent.id,
4646
type: webhookEvent.type,
4747
data: webhookEvent.data,
48+
tenantId: webhookEvent.tenantId,
4849
createdAt: new Date(webhookEvent.createdAt).toISOString()
4950
})

packages/backend/src/graphql/schema.graphql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,8 @@ type WalletAddressWithdrawal {
13941394
type WebhookEvent implements Model {
13951395
"Unique identifier of the webhook event."
13961396
id: ID!
1397+
"Tenant of the webhook event."
1398+
tenantId: ID!
13971399
"Type of webhook event."
13981400
type: String!
13991401
"Stringified JSON data for the webhook event."

packages/frontend/app/generated/graphql.ts

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/frontend/app/lib/api/webhook.server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const listWebhooks = async (
3434
cursor
3535
node {
3636
id
37+
tenantId
3738
data
3839
type
3940
createdAt
@@ -50,6 +51,7 @@ export const listWebhooks = async (
5051
`,
5152
variables: args
5253
})
54+
console.log('response.data.webhookEvents=', response.data.webhookEvents)
5355

5456
return response.data.webhookEvents
5557
}

packages/frontend/app/routes/webhook-events.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,12 @@ export default function WebhookEventsPage() {
132132
<Table.Cell>
133133
<Button
134134
aria-label='view webhook data'
135-
state={{ data: webhook.node.data }}
135+
state={{
136+
data: {
137+
...webhook.node.data,
138+
tenantId: webhook.node.tenantId
139+
}
140+
}}
136141
to={`/webhook-events/data${
137142
searchParams ? `?${searchParams}` : null
138143
}`}

packages/mock-account-service-lib/src/generated/graphql.ts

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/integration/lib/generated/graphql.ts

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)