#11 Fix gql response types
This commit is contained in:
parent
101817276f
commit
a07eb576eb
|
@ -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`
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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`
|
||||||
|
|
|
@ -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`
|
||||||
|
|
|
@ -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 (
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue