8
apps/console/.env.development
Normal file
8
apps/console/.env.development
Normal file
@@ -0,0 +1,8 @@
|
||||
LIVE_RELOAD=
|
||||
|
||||
POSTHOG_HOST=
|
||||
POSTHOG_KEY=
|
||||
FARO_PUSH_URL=
|
||||
|
||||
API_SERVER_HOST="http://localhost:8080"
|
||||
|
||||
@@ -58,7 +58,7 @@ const staticData = {
|
||||
url: "/vendors",
|
||||
icon: ToyBrick,
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Settings",
|
||||
@@ -82,9 +82,9 @@ const staticData = {
|
||||
|
||||
const AppSidebarQuery = graphql`
|
||||
query AppSidebarQuery {
|
||||
node(id: "AZSfP_xAcAC5IAAAAAAltA") {
|
||||
viewer {
|
||||
id
|
||||
... on Organization {
|
||||
organization {
|
||||
name
|
||||
logoUrl
|
||||
createdAt
|
||||
@@ -101,7 +101,7 @@ function AppSidebarContent({
|
||||
queryRef: PreloadedQuery<AppSidebarQueryType>;
|
||||
}) {
|
||||
const data = usePreloadedQuery(AppSidebarQuery, queryRef);
|
||||
const organization = data.node;
|
||||
const organization = data.viewer.organization;
|
||||
|
||||
return (
|
||||
<Sidebar variant="inset" {...props}>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<c76b330caf722464b0da18ad8a5f058a>>
|
||||
* @generated SignedSource<<578d66fa0d0065452d9fa64611b7cfda>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -11,12 +11,14 @@
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type AppSidebarQuery$variables = Record<PropertyKey, never>;
|
||||
export type AppSidebarQuery$data = {
|
||||
readonly node: {
|
||||
readonly createdAt?: any;
|
||||
readonly viewer: {
|
||||
readonly id: string;
|
||||
readonly logoUrl?: string;
|
||||
readonly name?: string;
|
||||
readonly updatedAt?: any;
|
||||
readonly organization: {
|
||||
readonly createdAt: any;
|
||||
readonly logoUrl: string;
|
||||
readonly name: string;
|
||||
readonly updatedAt: any;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type AppSidebarQuery = {
|
||||
@@ -25,54 +27,40 @@ export type AppSidebarQuery = {
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "id",
|
||||
"value": "AZSfP_xAcAC5IAAAAAAltA"
|
||||
}
|
||||
],
|
||||
v1 = {
|
||||
var v0 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v1 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v2 = {
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "logoUrl",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "logoUrl",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
@@ -83,16 +71,30 @@ return {
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v0/*: any*/),
|
||||
"concreteType": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
@@ -106,37 +108,45 @@ return {
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v0/*: any*/),
|
||||
"concreteType": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
}
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "c5135cf2fd79365dad2ea581b3e010de",
|
||||
"cacheID": "e50b9b44daf91d53b07f8912e6c2088f",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "AppSidebarQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query AppSidebarQuery {\n node(id: \"AZSfP_xAcAC5IAAAAAAltA\") {\n __typename\n id\n ... on Organization {\n name\n logoUrl\n createdAt\n updatedAt\n }\n }\n}\n"
|
||||
"text": "query AppSidebarQuery {\n viewer {\n id\n organization {\n name\n logoUrl\n createdAt\n updatedAt\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "2aafa67cfe2e2c748605b224503c7463";
|
||||
(node as any).hash = "d450e65862def2f7ebd6f4b8d0475be0";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -73,7 +73,7 @@ function BreadcrumbFrameworkOverview() {
|
||||
}
|
||||
`,
|
||||
{ frameworkId: frameworkId! },
|
||||
{ fetchPolicy: "store-or-network" },
|
||||
{ fetchPolicy: "store-or-network" }
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -133,7 +133,7 @@ function BreadcrumbPeopleOverview() {
|
||||
}
|
||||
`,
|
||||
{ peopleId: peopleId! },
|
||||
{ fetchPolicy: "store-or-network" },
|
||||
{ fetchPolicy: "store-or-network" }
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -177,7 +177,7 @@ function BreadcrumbVendorOverview() {
|
||||
}
|
||||
`,
|
||||
{ vendorId: vendorId! },
|
||||
{ fetchPolicy: "store-or-network" },
|
||||
{ fetchPolicy: "store-or-network" }
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -215,7 +215,7 @@ function BreadcrumbControlOverview() {
|
||||
}
|
||||
`,
|
||||
{ frameworkId: frameworkId!, controlId: controlId! },
|
||||
{ fetchPolicy: "store-or-network" },
|
||||
{ fetchPolicy: "store-or-network" }
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -22,9 +22,11 @@ import { CreatePeoplePageCreatePeopleMutation } from "./__generated__/CreatePeop
|
||||
|
||||
const createPeoplePageQuery = graphql`
|
||||
query CreatePeoplePageQuery {
|
||||
currentOrganization: node(id: "AZSfP_xAcAC5IAAAAAAltA") {
|
||||
viewer {
|
||||
id
|
||||
... on Organization {
|
||||
|
||||
organization {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
@@ -111,15 +113,15 @@ function CreatePeoplePageContent({
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
const peopleConnectionId = ConnectionHandler.getConnectionID(
|
||||
data.currentOrganization.id,
|
||||
"PeopleListPage_peoples",
|
||||
data.viewer.organization.id,
|
||||
"PeopleListPage_peoples"
|
||||
);
|
||||
|
||||
createPeople({
|
||||
variables: {
|
||||
connections: [peopleConnectionId],
|
||||
input: {
|
||||
organizationId: data.currentOrganization.id,
|
||||
organizationId: data.viewer.organization.id,
|
||||
fullName: formData.fullName,
|
||||
primaryEmailAddress: formData.primaryEmailAddress,
|
||||
additionalEmailAddresses: formData.additionalEmailAddresses,
|
||||
@@ -188,7 +190,7 @@ function CreatePeoplePageContent({
|
||||
newEmails[index] = e.target.value;
|
||||
handleFieldChange(
|
||||
"additionalEmailAddresses",
|
||||
newEmails,
|
||||
newEmails
|
||||
);
|
||||
}}
|
||||
/>
|
||||
@@ -198,11 +200,11 @@ function CreatePeoplePageContent({
|
||||
onClick={() => {
|
||||
const newEmails =
|
||||
formData.additionalEmailAddresses.filter(
|
||||
(_, i) => i !== index,
|
||||
(_, i) => i !== index
|
||||
);
|
||||
handleFieldChange(
|
||||
"additionalEmailAddresses",
|
||||
newEmails,
|
||||
newEmails
|
||||
);
|
||||
}}
|
||||
>
|
||||
@@ -250,7 +252,7 @@ function CreatePeoplePageContent({
|
||||
"rounded-full px-4 py-1 text-sm transition-colors",
|
||||
formData.kind === "EMPLOYEE"
|
||||
? "bg-blue-100 text-blue-900 ring-2 ring-blue-600 ring-offset-2"
|
||||
: "bg-gray-100 text-gray-900 hover:bg-gray-200",
|
||||
: "bg-gray-100 text-gray-900 hover:bg-gray-200"
|
||||
)}
|
||||
>
|
||||
Employee
|
||||
@@ -262,7 +264,7 @@ function CreatePeoplePageContent({
|
||||
"rounded-full px-4 py-1 text-sm transition-colors",
|
||||
formData.kind === "CONTRACTOR"
|
||||
? "bg-purple-100 text-purple-900 ring-2 ring-purple-600 ring-offset-2"
|
||||
: "bg-gray-100 text-gray-900 hover:bg-gray-200",
|
||||
: "bg-gray-100 text-gray-900 hover:bg-gray-200"
|
||||
)}
|
||||
>
|
||||
Contractor
|
||||
@@ -292,7 +294,7 @@ function CreatePeoplePageContent({
|
||||
|
||||
export default function CreatePeoplePage() {
|
||||
const [queryRef, loadQuery] = useQueryLoader<CreatePeoplePageQueryType>(
|
||||
createPeoplePageQuery,
|
||||
createPeoplePageQuery
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -9,16 +9,12 @@ import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Link } from "react-router";
|
||||
import type { FrameworkListPageQuery as FrameworkListPageQueryType } from "./__generated__/FrameworkListPageQuery.graphql";
|
||||
import { Helmet } from "react-helmet-async";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { ChevronRight } from "lucide-react";
|
||||
import { Shield } from "lucide-react";
|
||||
|
||||
const FrameworkListPageQuery = graphql`
|
||||
query FrameworkListPageQuery {
|
||||
node(id: "AZSfP_xAcAC5IAAAAAAltA") {
|
||||
viewer {
|
||||
id
|
||||
... on Organization {
|
||||
organization {
|
||||
frameworks {
|
||||
edges {
|
||||
node {
|
||||
@@ -91,7 +87,7 @@ function FrameworkListPageContent({
|
||||
}) {
|
||||
const data = usePreloadedQuery(FrameworkListPageQuery, queryRef);
|
||||
const frameworks =
|
||||
data.node.frameworks?.edges.map((edge) => edge?.node) ?? [];
|
||||
data.viewer.organization.frameworks?.edges.map((edge) => edge?.node) ?? [];
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
@@ -105,7 +101,7 @@ function FrameworkListPageContent({
|
||||
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-2">
|
||||
{frameworks.map((framework) => {
|
||||
const validatedControls = framework.controls.edges.filter(
|
||||
(edge) => edge?.node?.state === "IMPLEMENTED",
|
||||
(edge) => edge?.node?.state === "IMPLEMENTED"
|
||||
).length;
|
||||
const totalControls = framework.controls.edges.length;
|
||||
|
||||
@@ -165,7 +161,7 @@ function FrameworkListPageFallback() {
|
||||
|
||||
export default function FrameworkListPage() {
|
||||
const [queryRef, loadQuery] = useQueryLoader<FrameworkListPageQueryType>(
|
||||
FrameworkListPageQuery,
|
||||
FrameworkListPageQuery
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -10,9 +10,9 @@ import type { HomePageQuery as HomePageQueryType } from "./__generated__/HomePag
|
||||
|
||||
export const HomePageQuery = graphql`
|
||||
query HomePageQuery {
|
||||
node(id: "AZSfP_xAcAC5IAAAAAAltA") {
|
||||
viewer {
|
||||
id
|
||||
... on Organization {
|
||||
organization {
|
||||
name
|
||||
createdAt
|
||||
updatedAt
|
||||
|
||||
@@ -28,9 +28,9 @@ const peopleListPageQuery = graphql`
|
||||
$last: Int
|
||||
$before: CursorKey
|
||||
) {
|
||||
currentOrganization: node(id: "AZSfP_xAcAC5IAAAAAAltA") {
|
||||
viewer {
|
||||
id
|
||||
... on Organization {
|
||||
organization {
|
||||
...PeopleListPage_peoples
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@ function PeopleListContent({
|
||||
}) {
|
||||
const data = usePreloadedQuery<PeopleListPageQueryType>(
|
||||
peopleListPageQuery,
|
||||
queryRef,
|
||||
queryRef
|
||||
);
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const [isPending, startTransition] = useTransition();
|
||||
@@ -147,7 +147,7 @@ function PeopleListContent({
|
||||
} = usePaginationFragment<
|
||||
PeopleListPagePaginationQuery,
|
||||
PeopleListPage_peoples$key
|
||||
>(peopleListFragment, data.currentOrganization);
|
||||
>(peopleListFragment, data.viewer.organization);
|
||||
|
||||
const peoples =
|
||||
peoplesConnection.peoples.edges.map((edge) => edge.node) ?? [];
|
||||
@@ -158,13 +158,19 @@ function PeopleListContent({
|
||||
<div>
|
||||
<h2 className="text-2xl font-semibold mb-1">Employees</h2>
|
||||
<p className="text-muted-foreground">
|
||||
Keep track of your company's workforce and their progress towards completing tasks assigned to them.
|
||||
Keep track of your company's workforce and their progress towards
|
||||
completing tasks assigned to them.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<p className="text-muted-foreground">1 people needs to get onboarded</p>
|
||||
<Button asChild variant="outline" style={{borderRadius: "0.5rem"}} className="gap-2">
|
||||
<Button
|
||||
asChild
|
||||
variant="outline"
|
||||
style={{ borderRadius: "0.5rem" }}
|
||||
className="gap-2"
|
||||
>
|
||||
<Link to="/peoples/create">
|
||||
<UserPlus className="h-4 w-4" />
|
||||
Add a people
|
||||
@@ -197,15 +203,15 @@ function PeopleListContent({
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Badge
|
||||
<Badge
|
||||
variant="secondary"
|
||||
className="bg-[#8BB563] text-white rounded-full px-3 py-0.5 text-xs font-medium"
|
||||
>
|
||||
{person?.kind === "EMPLOYEE"
|
||||
? "Employee"
|
||||
: person?.kind === "CONTRACTOR"
|
||||
? "Contractor"
|
||||
: "Vendor"}
|
||||
? "Contractor"
|
||||
: "Vendor"}
|
||||
</Badge>
|
||||
<Button
|
||||
variant="ghost"
|
||||
@@ -213,7 +219,11 @@ function PeopleListContent({
|
||||
className="h-8 w-8 text-muted-foreground hover:bg-transparent [&>svg]:hover:text-destructive"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (window.confirm("Are you sure you want to delete this person?")) {
|
||||
if (
|
||||
window.confirm(
|
||||
"Are you sure you want to delete this person?"
|
||||
)
|
||||
) {
|
||||
deletePeople({
|
||||
variables: {
|
||||
connections: [peoplesConnection.peoples.__id],
|
||||
|
||||
@@ -26,9 +26,9 @@ import type { SettingsPageQuery as SettingsPageQueryType } from "./__generated__
|
||||
|
||||
const settingsPageQuery = graphql`
|
||||
query SettingsPageQuery {
|
||||
node(id: "AZSfP_xAcAC5IAAAAAAltA") {
|
||||
viewer {
|
||||
id
|
||||
... on Organization {
|
||||
organization {
|
||||
name
|
||||
logoUrl
|
||||
}
|
||||
@@ -49,7 +49,7 @@ function SettingsPageContent({
|
||||
queryRef: PreloadedQuery<SettingsPageQueryType>;
|
||||
}) {
|
||||
const data = usePreloadedQuery(settingsPageQuery, queryRef);
|
||||
const organization = data.node;
|
||||
const organization = data.viewer.organization;
|
||||
const members: Member[] = [];
|
||||
|
||||
return (
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
import { useSearchParams } from "react-router";
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { CircleUser, Globe, Shield, Store, ChevronRight, Trash2 } from "lucide-react";
|
||||
import { Store, ChevronRight, Trash2 } from "lucide-react";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Link } from "react-router";
|
||||
@@ -32,9 +32,9 @@ const vendorListPageQuery = graphql`
|
||||
$last: Int
|
||||
$before: CursorKey
|
||||
) {
|
||||
currentOrganization: node(id: "AZSfP_xAcAC5IAAAAAAltA") {
|
||||
viewer {
|
||||
id
|
||||
... on Organization {
|
||||
organization {
|
||||
...VendorListPage_vendors
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ function VendorListContent({
|
||||
}) {
|
||||
const data = usePreloadedQuery<VendorListPageQueryType>(
|
||||
vendorListPageQuery,
|
||||
queryRef,
|
||||
queryRef
|
||||
);
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const [isPending, startTransition] = useTransition();
|
||||
@@ -196,7 +196,7 @@ function VendorListContent({
|
||||
} = usePaginationFragment<
|
||||
VendorListPagePaginationQuery,
|
||||
VendorListPage_vendors$key
|
||||
>(vendorListFragment, data.currentOrganization);
|
||||
>(vendorListFragment, data.viewer.organization);
|
||||
|
||||
const vendors =
|
||||
vendorsConnection.vendors.edges.map((edge) => edge.node) ?? [];
|
||||
@@ -212,7 +212,8 @@ function VendorListContent({
|
||||
<div>
|
||||
<h2 className="text-2xl font-semibold mb-1">Vendors</h2>
|
||||
<p className="text-muted-foreground">
|
||||
Vendors are third-party services that your company uses. Add them to keep track of their risk and compliance status.
|
||||
Vendors are third-party services that your company uses. Add them to
|
||||
keep track of their risk and compliance status.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -233,16 +234,17 @@ function VendorListContent({
|
||||
if (value.trim() === "") {
|
||||
setFilteredVendors([]);
|
||||
} else {
|
||||
const results = fuse
|
||||
.search(value)
|
||||
.map((result) => result.item);
|
||||
const results = fuse.search(value).map((result) => result.item);
|
||||
setFilteredVendors(results);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
{searchTerm.trim() !== "" && filteredVendors.length > 0 && (
|
||||
<div style={{ borderRadius: "0.3rem" }} className="absolute top-full left-0 mt-1 w-[calc(100%-100px)] max-h-48 overflow-y-auto border bg-popover shadow-md z-10">
|
||||
<div
|
||||
style={{ borderRadius: "0.3rem" }}
|
||||
className="absolute top-full left-0 mt-1 w-[calc(100%-100px)] max-h-48 overflow-y-auto border bg-popover shadow-md z-10"
|
||||
>
|
||||
{filteredVendors.map((vendor) => (
|
||||
<button
|
||||
key={vendor.id}
|
||||
@@ -252,7 +254,7 @@ function VendorListContent({
|
||||
variables: {
|
||||
connections: [vendorsConnection.vendors.__id],
|
||||
input: {
|
||||
organizationId: data.currentOrganization.id,
|
||||
organizationId: data.viewer.organization.id,
|
||||
name: vendor.name,
|
||||
description: "",
|
||||
serviceStartAt: new Date().toISOString(),
|
||||
@@ -304,7 +306,7 @@ function VendorListContent({
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Badge
|
||||
<Badge
|
||||
variant="secondary"
|
||||
className="bg-[#8BB563] text-white rounded-full px-3 py-0.5 text-xs font-medium"
|
||||
>
|
||||
@@ -316,7 +318,11 @@ function VendorListContent({
|
||||
className="h-8 w-8 text-muted-foreground hover:bg-transparent [&>svg]:hover:text-destructive"
|
||||
onClick={(e) => {
|
||||
e.preventDefault(); // Prevent navigation
|
||||
if (window.confirm("Are you sure you want to delete this vendor?")) {
|
||||
if (
|
||||
window.confirm(
|
||||
"Are you sure you want to delete this vendor?"
|
||||
)
|
||||
) {
|
||||
deleteVendor({
|
||||
variables: {
|
||||
connections: [vendorsConnection.vendors.__id],
|
||||
@@ -327,7 +333,8 @@ function VendorListContent({
|
||||
onCompleted() {
|
||||
toast({
|
||||
title: "Vendor deleted",
|
||||
description: "The vendor has been deleted successfully",
|
||||
description:
|
||||
"The vendor has been deleted successfully",
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<90c9055cb59db9172002bc02e6e9429d>>
|
||||
* @generated SignedSource<<25866c1f4e6fb640f91b8d05651df9f4>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -11,9 +11,12 @@
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreatePeoplePageQuery$variables = Record<PropertyKey, never>;
|
||||
export type CreatePeoplePageQuery$data = {
|
||||
readonly currentOrganization: {
|
||||
readonly viewer: {
|
||||
readonly id: string;
|
||||
readonly name?: string;
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type CreatePeoplePageQuery = {
|
||||
@@ -22,55 +25,53 @@ export type CreatePeoplePageQuery = {
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "id",
|
||||
"value": "AZSfP_xAcAC5IAAAAAAltA"
|
||||
}
|
||||
],
|
||||
v1 = {
|
||||
var v0 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v2 = {
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
};
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "CreatePeoplePageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "currentOrganization",
|
||||
"args": (v0/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
}
|
||||
],
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
@@ -79,40 +80,19 @@ return {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Operation",
|
||||
"name": "CreatePeoplePageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "currentOrganization",
|
||||
"args": (v0/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
}
|
||||
]
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "816d745d1a69d598b3507fa4df1e878f",
|
||||
"cacheID": "e0b72d4317b700564caa46c609276aed",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "CreatePeoplePageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query CreatePeoplePageQuery {\n currentOrganization: node(id: \"AZSfP_xAcAC5IAAAAAAltA\") {\n __typename\n id\n ... on Organization {\n name\n }\n }\n}\n"
|
||||
"text": "query CreatePeoplePageQuery {\n viewer {\n id\n organization {\n id\n name\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "54148a2bd398d4fda7c72b60c7210e6d";
|
||||
(node as any).hash = "89be7e6fd93829bdc8ac374983ca0a9b";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<87f0a667163355b6f7d273a71aa65a93>>
|
||||
* @generated SignedSource<<b79fe4cf20a9bc930e7bd90ccc2daf03>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -12,27 +12,29 @@ import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type FrameworkListPageQuery$variables = Record<PropertyKey, never>;
|
||||
export type FrameworkListPageQuery$data = {
|
||||
readonly node: {
|
||||
readonly frameworks?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly controls: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly id: string;
|
||||
readonly state: ControlState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly createdAt: any;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly updatedAt: any;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly viewer: {
|
||||
readonly id: string;
|
||||
readonly organization: {
|
||||
readonly frameworks: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly controls: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly id: string;
|
||||
readonly state: ControlState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly createdAt: any;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly updatedAt: any;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type FrameworkListPageQuery = {
|
||||
@@ -41,95 +43,82 @@ export type FrameworkListPageQuery = {
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "id",
|
||||
"value": "AZSfP_xAcAC5IAAAAAAltA"
|
||||
}
|
||||
],
|
||||
v1 = {
|
||||
var v0 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v2 = {
|
||||
"kind": "InlineFragment",
|
||||
v1 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "FrameworkConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "frameworks",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "FrameworkConnection",
|
||||
"concreteType": "FrameworkEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "frameworks",
|
||||
"plural": false,
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "FrameworkEdge",
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "controls",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlConnection",
|
||||
"concreteType": "ControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"plural": false,
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlEdge",
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
@@ -137,23 +126,23 @@ v2 = {
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
@@ -162,8 +151,7 @@ v2 = {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
@@ -174,16 +162,27 @@ return {
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v0/*: any*/),
|
||||
"concreteType": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
@@ -197,37 +196,42 @@ return {
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v0/*: any*/),
|
||||
"concreteType": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
}
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "b9f11bd39a99da4a1693b67c60a85845",
|
||||
"cacheID": "8f573b1a89e302e61a765711c1c6e73a",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "FrameworkListPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query FrameworkListPageQuery {\n node(id: \"AZSfP_xAcAC5IAAAAAAltA\") {\n __typename\n id\n ... on Organization {\n frameworks {\n edges {\n node {\n id\n name\n description\n controls {\n edges {\n node {\n id\n state\n }\n }\n }\n createdAt\n updatedAt\n }\n }\n }\n }\n }\n}\n"
|
||||
"text": "query FrameworkListPageQuery {\n viewer {\n id\n organization {\n frameworks {\n edges {\n node {\n id\n name\n description\n controls {\n edges {\n node {\n id\n state\n }\n }\n }\n createdAt\n updatedAt\n }\n }\n }\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "cc761cbab629daf0587a9befff255256";
|
||||
(node as any).hash = "ac0337411177ab9b1c8ef81e6bb47a06";
|
||||
|
||||
export default node;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<7a16966c3cf3d76ae51330e5536df480>>
|
||||
* @generated SignedSource<<dde370798e95a61988dd69cdde3acaad>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -17,9 +17,11 @@ export type PeopleListPageQuery$variables = {
|
||||
last?: number | null | undefined;
|
||||
};
|
||||
export type PeopleListPageQuery$data = {
|
||||
readonly currentOrganization: {
|
||||
readonly viewer: {
|
||||
readonly id: string;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"PeopleListPage_peoples">;
|
||||
readonly organization: {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"PeopleListPage_peoples">;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type PeopleListPageQuery = {
|
||||
@@ -48,28 +50,14 @@ v3 = {
|
||||
"kind": "LocalArgument",
|
||||
"name": "last"
|
||||
},
|
||||
v4 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "id",
|
||||
"value": "AZSfP_xAcAC5IAAAAAAltA"
|
||||
}
|
||||
],
|
||||
v5 = {
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = [
|
||||
v5 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "after",
|
||||
@@ -104,16 +92,21 @@ return {
|
||||
"name": "PeopleListPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "currentOrganization",
|
||||
"args": (v4/*: any*/),
|
||||
"concreteType": null,
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v5/*: any*/),
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"args": null,
|
||||
@@ -121,11 +114,10 @@ return {
|
||||
"name": "PeopleListPage_peoples"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
@@ -143,21 +135,26 @@ return {
|
||||
"name": "PeopleListPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "currentOrganization",
|
||||
"args": (v4/*: any*/),
|
||||
"concreteType": null,
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v6/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": "PeopleConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "peoples",
|
||||
@@ -179,7 +176,7 @@ return {
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v5/*: any*/),
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -222,7 +219,13 @@ return {
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
(v6/*: any*/)
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -292,7 +295,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"args": (v5/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "PeopleListPage_peoples",
|
||||
@@ -300,25 +303,24 @@ return {
|
||||
"name": "peoples"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "99597791fe9f240b902affc3d5e63af6",
|
||||
"cacheID": "d9b0af5656fcb50e2cedf0f831c0394d",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "PeopleListPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query PeopleListPageQuery(\n $first: Int\n $after: CursorKey\n $last: Int\n $before: CursorKey\n) {\n currentOrganization: node(id: \"AZSfP_xAcAC5IAAAAAAltA\") {\n __typename\n id\n ... on Organization {\n ...PeopleListPage_peoples\n }\n }\n}\n\nfragment PeopleListPage_peoples on Organization {\n id\n peoples(first: $first, after: $after, last: $last, before: $before) {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n additionalEmailAddresses\n kind\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n}\n"
|
||||
"text": "query PeopleListPageQuery(\n $first: Int\n $after: CursorKey\n $last: Int\n $before: CursorKey\n) {\n viewer {\n id\n organization {\n ...PeopleListPage_peoples\n id\n }\n }\n}\n\nfragment PeopleListPage_peoples on Organization {\n id\n peoples(first: $first, after: $after, last: $last, before: $before) {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n additionalEmailAddresses\n kind\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "f9f133aa09d9d051cef5697aba2398c5";
|
||||
(node as any).hash = "9646de6e2d6b844cb87945b8a26c0999";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<1daa3e6f3ef43392ed73ce9ddb46aa47>>
|
||||
* @generated SignedSource<<fab1b817b8d6876b5bf4dc9320c4deef>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -11,10 +11,12 @@
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type SettingsPageQuery$variables = Record<PropertyKey, never>;
|
||||
export type SettingsPageQuery$data = {
|
||||
readonly node: {
|
||||
readonly viewer: {
|
||||
readonly id: string;
|
||||
readonly logoUrl?: string;
|
||||
readonly name?: string;
|
||||
readonly organization: {
|
||||
readonly logoUrl: string;
|
||||
readonly name: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type SettingsPageQuery = {
|
||||
@@ -23,40 +25,26 @@ export type SettingsPageQuery = {
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "id",
|
||||
"value": "AZSfP_xAcAC5IAAAAAAltA"
|
||||
}
|
||||
],
|
||||
v1 = {
|
||||
var v0 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v1 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v2 = {
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "logoUrl",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "logoUrl",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
@@ -67,16 +55,28 @@ return {
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v0/*: any*/),
|
||||
"concreteType": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
@@ -90,37 +90,43 @@ return {
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v0/*: any*/),
|
||||
"concreteType": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/)
|
||||
}
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "911c50f40d00159bd8201b7193fe6686",
|
||||
"cacheID": "77d3f8660df07b02aa515461c9ec1449",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "SettingsPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query SettingsPageQuery {\n node(id: \"AZSfP_xAcAC5IAAAAAAltA\") {\n __typename\n id\n ... on Organization {\n name\n logoUrl\n }\n }\n}\n"
|
||||
"text": "query SettingsPageQuery {\n viewer {\n id\n organization {\n name\n logoUrl\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "fc0474b3b161e0a1e6c41f9898afa5b0";
|
||||
(node as any).hash = "c639e9c45b175beec64550bb72fe5111";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<65ad922b0229a2d1840687c46d5cea29>>
|
||||
* @generated SignedSource<<4b2d9a3c1a701053fe929da59580308b>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -17,9 +17,11 @@ export type VendorListPageQuery$variables = {
|
||||
last?: number | null | undefined;
|
||||
};
|
||||
export type VendorListPageQuery$data = {
|
||||
readonly currentOrganization: {
|
||||
readonly viewer: {
|
||||
readonly id: string;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"VendorListPage_vendors">;
|
||||
readonly organization: {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"VendorListPage_vendors">;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type VendorListPageQuery = {
|
||||
@@ -48,28 +50,14 @@ v3 = {
|
||||
"kind": "LocalArgument",
|
||||
"name": "last"
|
||||
},
|
||||
v4 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "id",
|
||||
"value": "AZSfP_xAcAC5IAAAAAAltA"
|
||||
}
|
||||
],
|
||||
v5 = {
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = [
|
||||
v5 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "after",
|
||||
@@ -104,16 +92,21 @@ return {
|
||||
"name": "VendorListPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "currentOrganization",
|
||||
"args": (v4/*: any*/),
|
||||
"concreteType": null,
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v5/*: any*/),
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"args": null,
|
||||
@@ -121,11 +114,10 @@ return {
|
||||
"name": "VendorListPage_vendors"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
@@ -143,21 +135,26 @@ return {
|
||||
"name": "VendorListPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "currentOrganization",
|
||||
"args": (v4/*: any*/),
|
||||
"concreteType": null,
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Viewer",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"name": "viewer",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v6/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": "VendorConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "vendors",
|
||||
@@ -179,7 +176,7 @@ return {
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v5/*: any*/),
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -208,7 +205,13 @@ return {
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
(v6/*: any*/)
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -278,7 +281,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"args": (v5/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "VendorListPage_vendors",
|
||||
@@ -286,25 +289,24 @@ return {
|
||||
"name": "vendors"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "node(id:\"AZSfP_xAcAC5IAAAAAAltA\")"
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "8150b3303765174bbf41ebf4cd12534c",
|
||||
"cacheID": "0c3f0f24d810d8a510fa30ca3f3f5890",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "VendorListPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query VendorListPageQuery(\n $first: Int\n $after: CursorKey\n $last: Int\n $before: CursorKey\n) {\n currentOrganization: node(id: \"AZSfP_xAcAC5IAAAAAAltA\") {\n __typename\n id\n ... on Organization {\n ...VendorListPage_vendors\n }\n }\n}\n\nfragment VendorListPage_vendors on Organization {\n id\n vendors(first: $first, after: $after, last: $last, before: $before) {\n edges {\n node {\n id\n name\n description\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n}\n"
|
||||
"text": "query VendorListPageQuery(\n $first: Int\n $after: CursorKey\n $last: Int\n $before: CursorKey\n) {\n viewer {\n id\n organization {\n ...VendorListPage_vendors\n id\n }\n }\n}\n\nfragment VendorListPage_vendors on Organization {\n id\n vendors(first: $first, after: $after, last: $last, before: $before) {\n edges {\n node {\n id\n name\n description\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "a1f88bf5287abaffb051993051d0e2a7";
|
||||
(node as any).hash = "ffd0aaecc51a29f19ff874adbb38dab4";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -5,13 +5,11 @@ directive @goField(
|
||||
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
|
||||
|
||||
directive @goModel(
|
||||
model: String
|
||||
models: [String!]
|
||||
model: String
|
||||
models: [String!]
|
||||
) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION
|
||||
|
||||
directive @goEnum(
|
||||
value: String
|
||||
) on ENUM_VALUE
|
||||
directive @goEnum(value: String) on ENUM_VALUE
|
||||
|
||||
scalar CursorKey
|
||||
scalar Void
|
||||
@@ -22,27 +20,62 @@ interface Node {
|
||||
id: ID!
|
||||
}
|
||||
|
||||
enum ControlState @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.ControlState") {
|
||||
NOT_STARTED @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateNotStarted")
|
||||
IN_PROGRESS @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateInProgress")
|
||||
NOT_APPLICABLE @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateNotApplicable")
|
||||
IMPLEMENTED @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateImplemented")
|
||||
enum ControlState
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.ControlState") {
|
||||
NOT_STARTED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateNotStarted"
|
||||
)
|
||||
IN_PROGRESS
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateInProgress"
|
||||
)
|
||||
NOT_APPLICABLE
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateNotApplicable"
|
||||
)
|
||||
IMPLEMENTED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateImplemented"
|
||||
)
|
||||
}
|
||||
|
||||
enum TaskState @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.TaskState") {
|
||||
TODO @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.TaskStateTodo")
|
||||
DONE @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.TaskStateDone")
|
||||
enum TaskState
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.TaskState") {
|
||||
TODO
|
||||
@goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.TaskStateTodo")
|
||||
DONE
|
||||
@goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.TaskStateDone")
|
||||
}
|
||||
|
||||
enum EvidenceState @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceState") {
|
||||
VALID @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateValid")
|
||||
INVALID @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateInvalid")
|
||||
EXPIRED @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateExpired")
|
||||
enum EvidenceState
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceState"
|
||||
) {
|
||||
VALID
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateValid"
|
||||
)
|
||||
INVALID
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateInvalid"
|
||||
)
|
||||
EXPIRED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateExpired"
|
||||
)
|
||||
}
|
||||
|
||||
enum PeopleKind @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKind") {
|
||||
EMPLOYEE @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKindEmployee")
|
||||
CONTRACTOR @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKindContractor")
|
||||
enum PeopleKind
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKind") {
|
||||
EMPLOYEE
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKindEmployee"
|
||||
)
|
||||
CONTRACTOR
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKindContractor"
|
||||
)
|
||||
}
|
||||
|
||||
type PageInfo {
|
||||
@@ -238,7 +271,7 @@ type Task implements Node {
|
||||
last: Int
|
||||
before: CursorKey
|
||||
): EvidenceConnection! @goField(forceResolver: true)
|
||||
|
||||
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
@@ -311,6 +344,12 @@ type EvidenceStateTransition {
|
||||
|
||||
type Query {
|
||||
node(id: ID!): Node!
|
||||
viewer: Viewer!
|
||||
}
|
||||
|
||||
type Viewer {
|
||||
id: ID!
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
@@ -360,16 +399,38 @@ input UpdatePeopleInput {
|
||||
kind: PeopleKind
|
||||
}
|
||||
|
||||
enum ServiceCriticality @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticality") {
|
||||
LOW @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityLow")
|
||||
MEDIUM @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityMedium")
|
||||
HIGH @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityHigh")
|
||||
enum ServiceCriticality
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticality"
|
||||
) {
|
||||
LOW
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityLow"
|
||||
)
|
||||
MEDIUM
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityMedium"
|
||||
)
|
||||
HIGH
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityHigh"
|
||||
)
|
||||
}
|
||||
|
||||
enum RiskTier @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.RiskTier") {
|
||||
CRITICAL @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierCritical")
|
||||
SIGNIFICANT @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierSignificant")
|
||||
GENERAL @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierGeneral")
|
||||
enum RiskTier
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.RiskTier") {
|
||||
CRITICAL
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierCritical"
|
||||
)
|
||||
SIGNIFICANT
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierSignificant"
|
||||
)
|
||||
GENERAL
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierGeneral"
|
||||
)
|
||||
}
|
||||
|
||||
input UpdateVendorInput {
|
||||
|
||||
@@ -49,6 +49,7 @@ type ResolverRoot interface {
|
||||
Organization() OrganizationResolver
|
||||
Query() QueryResolver
|
||||
Task() TaskResolver
|
||||
Viewer() ViewerResolver
|
||||
}
|
||||
|
||||
type DirectiveRoot struct {
|
||||
@@ -220,7 +221,8 @@ type ComplexityRoot struct {
|
||||
}
|
||||
|
||||
Query struct {
|
||||
Node func(childComplexity int, id gid.GID) int
|
||||
Node func(childComplexity int, id gid.GID) int
|
||||
Viewer func(childComplexity int) int
|
||||
}
|
||||
|
||||
Task struct {
|
||||
@@ -288,6 +290,11 @@ type ComplexityRoot struct {
|
||||
Cursor func(childComplexity int) int
|
||||
Node func(childComplexity int) int
|
||||
}
|
||||
|
||||
Viewer struct {
|
||||
ID func(childComplexity int) int
|
||||
Organization func(childComplexity int) int
|
||||
}
|
||||
}
|
||||
|
||||
type ControlResolver interface {
|
||||
@@ -315,11 +322,15 @@ type OrganizationResolver interface {
|
||||
}
|
||||
type QueryResolver interface {
|
||||
Node(ctx context.Context, id gid.GID) (types.Node, error)
|
||||
Viewer(ctx context.Context) (*types.Viewer, error)
|
||||
}
|
||||
type TaskResolver interface {
|
||||
StateTransisions(ctx context.Context, obj *types.Task, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.TaskStateTransitionConnection, error)
|
||||
Evidences(ctx context.Context, obj *types.Task, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.EvidenceConnection, error)
|
||||
}
|
||||
type ViewerResolver interface {
|
||||
Organization(ctx context.Context, obj *types.Viewer) (*types.Organization, error)
|
||||
}
|
||||
|
||||
type executableSchema struct {
|
||||
schema *ast.Schema
|
||||
@@ -1040,6 +1051,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Query.Node(childComplexity, args["id"].(gid.GID)), true
|
||||
|
||||
case "Query.viewer":
|
||||
if e.complexity.Query.Viewer == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Query.Viewer(childComplexity), true
|
||||
|
||||
case "Task.createdAt":
|
||||
if e.complexity.Task.CreatedAt == nil {
|
||||
break
|
||||
@@ -1323,6 +1341,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.VendorEdge.Node(childComplexity), true
|
||||
|
||||
case "Viewer.id":
|
||||
if e.complexity.Viewer.ID == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Viewer.ID(childComplexity), true
|
||||
|
||||
case "Viewer.organization":
|
||||
if e.complexity.Viewer.Organization == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Viewer.Organization(childComplexity), true
|
||||
|
||||
}
|
||||
return 0, false
|
||||
}
|
||||
@@ -1441,13 +1473,11 @@ var sources = []*ast.Source{
|
||||
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
|
||||
|
||||
directive @goModel(
|
||||
model: String
|
||||
models: [String!]
|
||||
model: String
|
||||
models: [String!]
|
||||
) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION
|
||||
|
||||
directive @goEnum(
|
||||
value: String
|
||||
) on ENUM_VALUE
|
||||
directive @goEnum(value: String) on ENUM_VALUE
|
||||
|
||||
scalar CursorKey
|
||||
scalar Void
|
||||
@@ -1458,27 +1488,62 @@ interface Node {
|
||||
id: ID!
|
||||
}
|
||||
|
||||
enum ControlState @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.ControlState") {
|
||||
NOT_STARTED @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateNotStarted")
|
||||
IN_PROGRESS @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateInProgress")
|
||||
NOT_APPLICABLE @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateNotApplicable")
|
||||
IMPLEMENTED @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateImplemented")
|
||||
enum ControlState
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.ControlState") {
|
||||
NOT_STARTED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateNotStarted"
|
||||
)
|
||||
IN_PROGRESS
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateInProgress"
|
||||
)
|
||||
NOT_APPLICABLE
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateNotApplicable"
|
||||
)
|
||||
IMPLEMENTED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateImplemented"
|
||||
)
|
||||
}
|
||||
|
||||
enum TaskState @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.TaskState") {
|
||||
TODO @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.TaskStateTodo")
|
||||
DONE @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.TaskStateDone")
|
||||
enum TaskState
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.TaskState") {
|
||||
TODO
|
||||
@goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.TaskStateTodo")
|
||||
DONE
|
||||
@goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.TaskStateDone")
|
||||
}
|
||||
|
||||
enum EvidenceState @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceState") {
|
||||
VALID @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateValid")
|
||||
INVALID @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateInvalid")
|
||||
EXPIRED @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateExpired")
|
||||
enum EvidenceState
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceState"
|
||||
) {
|
||||
VALID
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateValid"
|
||||
)
|
||||
INVALID
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateInvalid"
|
||||
)
|
||||
EXPIRED
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateExpired"
|
||||
)
|
||||
}
|
||||
|
||||
enum PeopleKind @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKind") {
|
||||
EMPLOYEE @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKindEmployee")
|
||||
CONTRACTOR @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKindContractor")
|
||||
enum PeopleKind
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKind") {
|
||||
EMPLOYEE
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKindEmployee"
|
||||
)
|
||||
CONTRACTOR
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKindContractor"
|
||||
)
|
||||
}
|
||||
|
||||
type PageInfo {
|
||||
@@ -1674,7 +1739,7 @@ type Task implements Node {
|
||||
last: Int
|
||||
before: CursorKey
|
||||
): EvidenceConnection! @goField(forceResolver: true)
|
||||
|
||||
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
@@ -1747,6 +1812,12 @@ type EvidenceStateTransition {
|
||||
|
||||
type Query {
|
||||
node(id: ID!): Node!
|
||||
viewer: Viewer!
|
||||
}
|
||||
|
||||
type Viewer {
|
||||
id: ID!
|
||||
organization: Organization! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
@@ -1796,16 +1867,38 @@ input UpdatePeopleInput {
|
||||
kind: PeopleKind
|
||||
}
|
||||
|
||||
enum ServiceCriticality @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticality") {
|
||||
LOW @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityLow")
|
||||
MEDIUM @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityMedium")
|
||||
HIGH @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityHigh")
|
||||
enum ServiceCriticality
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticality"
|
||||
) {
|
||||
LOW
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityLow"
|
||||
)
|
||||
MEDIUM
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityMedium"
|
||||
)
|
||||
HIGH
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.ServiceCriticalityHigh"
|
||||
)
|
||||
}
|
||||
|
||||
enum RiskTier @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.RiskTier") {
|
||||
CRITICAL @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierCritical")
|
||||
SIGNIFICANT @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierSignificant")
|
||||
GENERAL @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierGeneral")
|
||||
enum RiskTier
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.RiskTier") {
|
||||
CRITICAL
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierCritical"
|
||||
)
|
||||
SIGNIFICANT
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierSignificant"
|
||||
)
|
||||
GENERAL
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/probo/coredata.RiskTierGeneral"
|
||||
)
|
||||
}
|
||||
|
||||
input UpdateVendorInput {
|
||||
@@ -6558,6 +6651,50 @@ func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field g
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Query_viewer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Query_viewer(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().Viewer(rctx)
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
ec.Errorf(ctx, "must not be null")
|
||||
}
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*types.Viewer)
|
||||
fc.Result = res
|
||||
return ec.marshalNViewer2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋapiᚋconsoleᚋv1ᚋtypesᚐViewer(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Query_viewer(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Query",
|
||||
Field: field,
|
||||
IsMethod: true,
|
||||
IsResolver: true,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
switch field.Name {
|
||||
case "id":
|
||||
return ec.fieldContext_Viewer_id(ctx, field)
|
||||
case "organization":
|
||||
return ec.fieldContext_Viewer_organization(ctx, field)
|
||||
}
|
||||
return nil, fmt.Errorf("no field named %q was found under type Viewer", field.Name)
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Query___type(ctx, field)
|
||||
if err != nil {
|
||||
@@ -8263,6 +8400,100 @@ func (ec *executionContext) fieldContext_VendorEdge_node(_ context.Context, fiel
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Viewer_id(ctx context.Context, field graphql.CollectedField, obj *types.Viewer) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Viewer_id(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.ID, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
ec.Errorf(ctx, "must not be null")
|
||||
}
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(gid.GID)
|
||||
fc.Result = res
|
||||
return ec.marshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Viewer_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Viewer",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
return nil, errors.New("field of type ID does not have child fields")
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Viewer_organization(ctx context.Context, field graphql.CollectedField, obj *types.Viewer) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Viewer_organization(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Viewer().Organization(rctx, obj)
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
ec.Errorf(ctx, "must not be null")
|
||||
}
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*types.Organization)
|
||||
fc.Result = res
|
||||
return ec.marshalNOrganization2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋapiᚋconsoleᚋv1ᚋtypesᚐOrganization(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Viewer_organization(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Viewer",
|
||||
Field: field,
|
||||
IsMethod: true,
|
||||
IsResolver: true,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
switch field.Name {
|
||||
case "id":
|
||||
return ec.fieldContext_Organization_id(ctx, field)
|
||||
case "name":
|
||||
return ec.fieldContext_Organization_name(ctx, field)
|
||||
case "logoUrl":
|
||||
return ec.fieldContext_Organization_logoUrl(ctx, field)
|
||||
case "frameworks":
|
||||
return ec.fieldContext_Organization_frameworks(ctx, field)
|
||||
case "vendors":
|
||||
return ec.fieldContext_Organization_vendors(ctx, field)
|
||||
case "peoples":
|
||||
return ec.fieldContext_Organization_peoples(ctx, field)
|
||||
case "createdAt":
|
||||
return ec.fieldContext_Organization_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
return ec.fieldContext_Organization_updatedAt(ctx, field)
|
||||
}
|
||||
return nil, fmt.Errorf("no field named %q was found under type Organization", field.Name)
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext___Directive_name(ctx, field)
|
||||
if err != nil {
|
||||
@@ -11752,6 +11983,23 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
||||
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
||||
}
|
||||
|
||||
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
|
||||
case "viewer":
|
||||
field := field
|
||||
|
||||
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
||||
res = ec._Query_viewer(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&fs.Invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
rrm := func(ctx context.Context) graphql.Marshaler {
|
||||
return ec.OperationContext.RootResolverMiddleware(ctx,
|
||||
func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
||||
}
|
||||
|
||||
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
|
||||
case "__type":
|
||||
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
||||
@@ -12319,6 +12567,76 @@ func (ec *executionContext) _VendorEdge(ctx context.Context, sel ast.SelectionSe
|
||||
return out
|
||||
}
|
||||
|
||||
var viewerImplementors = []string{"Viewer"}
|
||||
|
||||
func (ec *executionContext) _Viewer(ctx context.Context, sel ast.SelectionSet, obj *types.Viewer) graphql.Marshaler {
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, viewerImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
out.Values[i] = graphql.MarshalString("Viewer")
|
||||
case "id":
|
||||
out.Values[i] = ec._Viewer_id(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "organization":
|
||||
field := field
|
||||
|
||||
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
||||
res = ec._Viewer_organization(ctx, field, obj)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&fs.Invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
if field.Deferrable != nil {
|
||||
dfs, ok := deferred[field.Deferrable.Label]
|
||||
di := 0
|
||||
if ok {
|
||||
dfs.AddField(field)
|
||||
di = len(dfs.Values) - 1
|
||||
} else {
|
||||
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
|
||||
deferred[field.Deferrable.Label] = dfs
|
||||
}
|
||||
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
|
||||
return innerFunc(ctx, dfs)
|
||||
})
|
||||
|
||||
// don't run the out.Concurrently() call below
|
||||
out.Values[i] = graphql.Null
|
||||
continue
|
||||
}
|
||||
|
||||
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
}
|
||||
}
|
||||
out.Dispatch(ctx)
|
||||
if out.Invalids > 0 {
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.deferred, int32(len(deferred)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.processDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
|
||||
var __DirectiveImplementors = []string{"__Directive"}
|
||||
|
||||
func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
|
||||
@@ -13226,6 +13544,20 @@ func (ec *executionContext) marshalNNode2githubᚗcomᚋgetproboᚋproboᚋpkg
|
||||
return ec._Node(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNOrganization2githubᚗcomᚋgetproboᚋproboᚋpkgᚋapiᚋconsoleᚋv1ᚋtypesᚐOrganization(ctx context.Context, sel ast.SelectionSet, v types.Organization) graphql.Marshaler {
|
||||
return ec._Organization(ctx, sel, &v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNOrganization2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋapiᚋconsoleᚋv1ᚋtypesᚐOrganization(ctx context.Context, sel ast.SelectionSet, v *types.Organization) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||
}
|
||||
return graphql.Null
|
||||
}
|
||||
return ec._Organization(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋapiᚋconsoleᚋv1ᚋtypesᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *types.PageInfo) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
@@ -13701,6 +14033,20 @@ func (ec *executionContext) marshalNVendorEdge2ᚖgithubᚗcomᚋgetproboᚋprob
|
||||
return ec._VendorEdge(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNViewer2githubᚗcomᚋgetproboᚋproboᚋpkgᚋapiᚋconsoleᚋv1ᚋtypesᚐViewer(ctx context.Context, sel ast.SelectionSet, v types.Viewer) graphql.Marshaler {
|
||||
return ec._Viewer(ctx, sel, &v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNViewer2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋapiᚋconsoleᚋv1ᚋtypesᚐViewer(ctx context.Context, sel ast.SelectionSet, v *types.Viewer) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||
}
|
||||
return graphql.Null
|
||||
}
|
||||
return ec._Viewer(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {
|
||||
return ec.___Directive(ctx, sel, &v)
|
||||
}
|
||||
|
||||
@@ -314,3 +314,8 @@ type VendorEdge struct {
|
||||
Cursor page.CursorKey `json:"cursor"`
|
||||
Node *Vendor `json:"node"`
|
||||
}
|
||||
|
||||
type Viewer struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Organization *Organization `json:"organization"`
|
||||
}
|
||||
|
||||
@@ -263,6 +263,11 @@ func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error
|
||||
return nil, gqlerror.Errorf("node %q not found", id)
|
||||
}
|
||||
|
||||
// Viewer is the resolver for the viewer field.
|
||||
func (r *queryResolver) Viewer(ctx context.Context) (*types.Viewer, error) {
|
||||
return &types.Viewer{}, nil
|
||||
}
|
||||
|
||||
// StateTransisions is the resolver for the stateTransisions field.
|
||||
func (r *taskResolver) StateTransisions(ctx context.Context, obj *types.Task, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.TaskStateTransitionConnection, error) {
|
||||
cursor := types.NewCursor(first, after, last, before)
|
||||
@@ -287,6 +292,17 @@ func (r *taskResolver) Evidences(ctx context.Context, obj *types.Task, first *in
|
||||
return types.NewEvidenceConnection(page), nil
|
||||
}
|
||||
|
||||
// Organization is the resolver for the organization field.
|
||||
func (r *viewerResolver) Organization(ctx context.Context, obj *types.Viewer) (*types.Organization, error) {
|
||||
organizationID, _ := gid.ParseGID("AZSfP_xAcAC5IAAAAAAltA") // TODO: remove this
|
||||
organization, err := r.svc.GetOrganization(ctx, organizationID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot get organization: %w", err)
|
||||
}
|
||||
|
||||
return types.NewOrganization(organization), nil
|
||||
}
|
||||
|
||||
// Control returns schema.ControlResolver implementation.
|
||||
func (r *Resolver) Control() schema.ControlResolver { return &controlResolver{r} }
|
||||
|
||||
@@ -308,6 +324,9 @@ func (r *Resolver) Query() schema.QueryResolver { return &queryResolver{r} }
|
||||
// Task returns schema.TaskResolver implementation.
|
||||
func (r *Resolver) Task() schema.TaskResolver { return &taskResolver{r} }
|
||||
|
||||
// Viewer returns schema.ViewerResolver implementation.
|
||||
func (r *Resolver) Viewer() schema.ViewerResolver { return &viewerResolver{r} }
|
||||
|
||||
type controlResolver struct{ *Resolver }
|
||||
type evidenceResolver struct{ *Resolver }
|
||||
type frameworkResolver struct{ *Resolver }
|
||||
@@ -315,3 +334,4 @@ type mutationResolver struct{ *Resolver }
|
||||
type organizationResolver struct{ *Resolver }
|
||||
type queryResolver struct{ *Resolver }
|
||||
type taskResolver struct{ *Resolver }
|
||||
type viewerResolver struct{ *Resolver }
|
||||
|
||||
Reference in New Issue
Block a user