Introduce viewer object

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-02-25 15:23:29 +01:00
parent 42fec1bc71
commit 49c3807b4f
20 changed files with 1373 additions and 903 deletions

View File

@@ -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}>

View File

@@ -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;

View File

@@ -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 (

View File

@@ -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(() => {

View File

@@ -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(() => {

View File

@@ -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

View File

@@ -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],

View File

@@ -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 (

View File

@@ -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",
});
},
});

View File

@@ -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;

View File

@@ -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

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;