Files
probo/apps/trust/src/queries/TrustGraph.ts
Sacha Al Himdani 1bd6f7c1c9 Add trust center files
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-10-27 18:46:03 +01:00

161 lines
2.9 KiB
TypeScript

import { graphql } from "relay-runtime";
export const trustGraphQuery = graphql`
query TrustGraphQuery($slug: String!) {
trustCenterBySlug(slug: $slug) {
id
slug
isUserAuthenticated
hasAcceptedNonDisclosureAgreement
ndaFileName
ndaFileUrl
organization {
name
description
websiteUrl
logoUrl
email
headquarterAddress
}
...OverviewPageFragment
audits(first: 50) {
edges {
node {
id
...AuditRowFragment
}
}
}
}
}
`;
export const trustDocumentsQuery = graphql`
query TrustGraphDocumentsQuery($slug: String!) {
trustCenterBySlug(slug: $slug) {
id
organization {
name
}
documents(first: 50) {
edges {
node {
id
documentType
...DocumentRowFragment
}
}
}
trustCenterFiles(first: 50) {
edges {
node {
id
category
...TrustCenterFileRowFragment
}
}
}
}
}
`;
export const trustVendorsQuery = graphql`
query TrustGraphVendorsQuery($slug: String!) {
trustCenterBySlug(slug: $slug) {
id
organization {
name
}
vendors(first: 50) {
edges {
node {
id
countries
...VendorRowFragment
}
}
}
}
}
`;
// Queries for custom domain (subdomain) approach
export const currentTrustGraphQuery = graphql`
query TrustGraphCurrentQuery {
currentTrustCenter {
id
slug
isUserAuthenticated
hasAcceptedNonDisclosureAgreement
ndaFileName
ndaFileUrl
organization {
name
description
websiteUrl
logoUrl
email
headquarterAddress
}
...OverviewPageFragment
audits(first: 50) {
edges {
node {
id
...AuditRowFragment
}
}
}
}
}
`;
export const currentTrustDocumentsQuery = graphql`
query TrustGraphCurrentDocumentsQuery {
currentTrustCenter {
id
organization {
name
}
documents(first: 50) {
edges {
node {
id
documentType
...DocumentRowFragment
}
}
}
trustCenterFiles(first: 50) {
edges {
node {
id
category
...TrustCenterFileRowFragment
}
}
}
}
}
`;
export const currentTrustVendorsQuery = graphql`
query TrustGraphCurrentVendorsQuery {
currentTrustCenter {
id
organization {
name
}
vendors(first: 50) {
edges {
node {
id
countries
...VendorRowFragment
}
}
}
}
}
`;