#11 Fix gql response types

This commit is contained in:
Christoph Lienhard 2020-12-29 19:53:27 +01:00
parent 101817276f
commit a07eb576eb
Signed by: christoph.lienhard
GPG key ID: 6B98870DDC270884
8 changed files with 14 additions and 14 deletions

View file

@ -19,7 +19,7 @@ export interface EditCategoryResponse {
export interface EditCategoryVariables { export interface EditCategoryVariables {
id: string, id: string,
title?: string, title?: string,
description?: string, description?: string | null,
} }
export const ADD_CATEGORY = gql` export const ADD_CATEGORY = gql`
@ -41,7 +41,7 @@ export interface AddCategoryResponse {
export interface AddCategoryVariables { export interface AddCategoryVariables {
title: string, title: string,
description?: string, description?: string | null,
} }
export const DELETE_CATEGORY = gql` export const DELETE_CATEGORY = gql`

View file

@ -19,7 +19,7 @@ export interface EditQuestionResponse {
export interface EditQuestionVariables { export interface EditQuestionVariables {
id: string, id: string,
title?: string, title?: string,
description?: string, description?: string | null,
categoryRowId?: number | null, categoryRowId?: number | null,
} }
@ -42,7 +42,7 @@ export interface AddQuestionResponse {
export interface AddQuestionVariables { export interface AddQuestionVariables {
title: string, title: string,
description?: string, description?: string | null,
categoryRowId?: number | null categoryRowId?: number | null
} }

View file

@ -13,7 +13,7 @@ export interface BasicCategoryResponse {
id: string, id: string,
rowId: number, rowId: number,
title: string, title: string,
description?: string, description: string | null,
} }
export const GET_ALL_CATEGORIES = gql` export const GET_ALL_CATEGORIES = gql`

View file

@ -29,8 +29,8 @@ export const BasicQuestionFragment = gql`
export interface BasicQuestionResponse { export interface BasicQuestionResponse {
id: string, id: string,
title: string, title: string,
description?: string, description: string | null,
categoryByCategoryRowId?: GetQuestionsCategoryResponse categoryByCategoryRowId: GetQuestionsCategoryResponse | null
} }
export const GET_ALL_QUESTIONS = gql` export const GET_ALL_QUESTIONS = gql`

View file

@ -31,16 +31,16 @@ const useStyles = makeStyles((theme: Theme) =>
}), }),
); );
interface QuestionProps { interface AccordionWithEditProps {
key: string, key: string,
title: string, title: string,
description?: string, description: string | null,
subTitle?: string, subTitle?: string | null,
onEditButtonClick?(): void, onEditButtonClick?(): void,
onDeleteButtonClick?(): void, onDeleteButtonClick?(): void,
} }
export default function AccordionWithEdit(props: QuestionProps) { export default function AccordionWithEdit(props: AccordionWithEditProps) {
const classes = useStyles(); const classes = useStyles();
return ( return (

View file

@ -9,7 +9,7 @@ import {DialogTitleAndDetails} from "./DialogTitleAndDetails";
export interface ChangeCategoryDialogContent { export interface ChangeCategoryDialogContent {
id: string id: string
title: string, title: string,
details?: string, details: string | null,
} }
interface ChangeCategoryDialogProps { interface ChangeCategoryDialogProps {

View file

@ -11,7 +11,7 @@ import {DialogTitleAndDetails} from "./DialogTitleAndDetails";
export interface ChangeQuestionDialogContent { export interface ChangeQuestionDialogContent {
id: string id: string
title: string, title: string,
details?: string, details: string | null,
categoryId: number | null, categoryId: number | null,
} }

View file

@ -10,7 +10,7 @@ const useStyles = makeStyles((theme) => ({
interface DialogTitleAndDetailsProps { interface DialogTitleAndDetailsProps {
title: string, title: string,
details?: string, details?: string | null,
handleTitleChange(newTitle: string): void, handleTitleChange(newTitle: string): void,