saleor-dashboard/src/apps/queries.ts
Lukasz Ostrowski c0909f3254
Display app webhooks and deliveries in Manage App view (#4066)
* Add webhooks deliveries display to manage app page

* make 2 columns layout on manage apps view

* add chip for webhook active state

* Add borders to manage app layout

* fix ts strict

* wip before accordion

* add accordion

* improve look of failed deliveries

* extract translations
2023-08-08 12:25:10 +02:00

124 lines
2.1 KiB
TypeScript

import { gql } from "@apollo/client";
export const appsList = gql`
query AppsList(
$before: String
$after: String
$first: Int
$last: Int
$sort: AppSortingInput
$filter: AppFilterInput
) {
apps(
before: $before
after: $after
first: $first
last: $last
sortBy: $sort
filter: $filter
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
totalCount
edges {
node {
...AppListItem
}
}
}
}
`;
export const appsInProgressList = gql`
query AppsInstallations {
appsInstallations {
...AppInstallation
}
}
`;
export const appDetails = gql`
query App($id: ID!) {
app(id: $id) {
...App
aboutApp
author
permissions {
code
name
}
dataPrivacy
dataPrivacyUrl
brand {
logo {
default(size: 64, format: WEBP)
}
}
}
}
`;
export const extensionList = gql`
query ExtensionList($filter: AppExtensionFilterInput!) {
appExtensions(filter: $filter, first: 100) {
edges {
node {
id
label
url
mount
target
accessToken
permissions {
code
}
app {
id
appUrl
}
}
}
}
}
`;
export const EXTENSION_LIST_QUERY = "ExtensionList";
export const appWebhookDeliveries = gql`
query AppWebhookDeliveries($appId: ID!) {
app(id: $appId) {
webhooks {
id
name
isActive
syncEvents {
name
}
asyncEvents {
name
}
eventDeliveries(first: 10) {
edges {
node {
createdAt
status
eventType
attempts(first: 10) {
edges {
node {
createdAt
status
}
}
}
}
}
}
}
}
}
`;