import gql from 'graphql-tag'; export interface JsonApiEntity { id: string; type: string; attributes: any; } export interface TrunkshowModulesQueryData { trunkshow_modules: { data: JsonApiEntity[]; included: JsonApiEntity[]; meta: { num_pages: number; facets: any; page: number; per_page: number; total: number; mods: JsonApiEntity[]; additional_params: {[key: string]: string}; page_type: string; }; }; } export interface TrunkshowModulesQueryVars { slug: string; } const TRUNKSHOW_MODULES_QUERY = gql` query TrunkshowModules($slug: String) { trunkshow_modules(slug: $slug) @rest( type: "TrunkshowModulesPayload" path: "/pages/trunkshow/{args.slug}" endpoint: "mojo" ) { data @type(name: "Trunkshows") { id type attributes } included @type(name: "Included") { id type attributes } meta @type(name: "TrunkshowMeta") { num_pages facets page per_page total mods @type(name: "DisplayModules") { id type attributes } additional_params page_type } } } `; export default TRUNKSHOW_MODULES_QUERY;