36 lines
806 B
TypeScript
36 lines
806 B
TypeScript
import {MockedResponse} from "@apollo/client/testing";
|
|
import {BasicCategoryResponse, GET_ALL_CATEGORIES, GetAllCategoriesResponse} from "./category";
|
|
|
|
|
|
export const categoryNodesMock: Array<BasicCategoryResponse> = [
|
|
{
|
|
id: "c1",
|
|
rowId: 1,
|
|
title: "Category 1",
|
|
description: "Further information for C1",
|
|
__typename: "Category"
|
|
}, {
|
|
id: "c2",
|
|
rowId: 2,
|
|
title: "Category 2",
|
|
description: "Further information for C2",
|
|
__typename: "Category"
|
|
}];
|
|
|
|
export const getAllCategoriesMock: Array<MockedResponse<GetAllCategoriesResponse>> = [
|
|
{
|
|
request: {
|
|
query: GET_ALL_CATEGORIES,
|
|
},
|
|
result: {
|
|
data: {
|
|
allCategories: {
|
|
nodes: categoryNodesMock,
|
|
__typename: "CategoriesConnection",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
]
|
|
|