Skip to content

Commit

Permalink
[CLIENT] Include GraphQL Generated Types (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
yousinix authored Sep 28, 2020
1 parent 20bf7aa commit 31aae0f
Show file tree
Hide file tree
Showing 24 changed files with 1,392 additions and 25 deletions.
3 changes: 0 additions & 3 deletions client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@

# vercel
.vercel

# Generated GraphQL Types
generated/
2 changes: 1 addition & 1 deletion client/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ overwrite: true
schema: "http://localhost:4000/graphql"
documents: "graphql/**/*.gql"
generates:
generated/graphql.tsx:
graphql/types/index.tsx:
plugins:
- "typescript"
- "typescript-operations"
Expand Down
2 changes: 1 addition & 1 deletion client/components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Button } from "baseui/button";
import { useRouter } from "next/dist/client/router";
import { Plus } from "baseui/icon";

import { useLogoutMutation, UserRole as R } from "../generated/graphql";
import { useLogoutMutation, UserRole as R } from "../graphql/types";
import { Block } from "baseui/block";
import { useAuth } from "../hooks/useAuth";

Expand Down
2 changes: 1 addition & 1 deletion client/components/ReleaseRequestForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
EmployeesProfiles,
ReleaseRequestInput,
useManagersNamesQuery,
} from "../generated/graphql";
} from "../graphql/types";
import { CheckBoxStr } from "./CheckBoxStr";
import { ComboboxField } from "./ComboBoxField";
import { DatePickerStr } from "./DatePickerStr";
Expand Down
2 changes: 1 addition & 1 deletion client/components/ResourceRequestForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
EmployeesProfiles,
ResourceRequestInput,
useManagersNamesQuery,
} from "../generated/graphql";
} from "../graphql/types";
import { CheckBoxStr } from "./CheckBoxStr";
import { ComboboxField } from "./ComboBoxField";
import { DatePickerStr } from "./DatePickerStr";
Expand Down
2 changes: 1 addition & 1 deletion client/components/providers/AuthProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { AuthContext } from "../../context/AuthContext";
import { useRoleQuery } from "../../generated/graphql";
import { useRoleQuery } from "../../graphql/types";

export const AuthProvider: React.FC = ({ children }) => {
const [{ data, fetching }] = useRoleQuery();
Expand Down
2 changes: 1 addition & 1 deletion client/context/AuthContext.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { UserRole } from "../generated/graphql";
import { UserRole } from "../graphql/types";

export interface IAuthContext {
isLoading: boolean;
Expand Down
Loading

0 comments on commit 31aae0f

Please sign in to comment.