@kiwicom/smart-faq
Version:
248 lines (241 loc) • 5.53 kB
JavaScript
/**
* @flow
* @relayHash 1190d6bdc7415ac0432ec538264463fb
*/
/* eslint-disable */
'use strict';
/*::
import type { ConcreteRequest } from 'relay-runtime';
type ArticleContent_article$ref = any;
export type ArticleDetailQueryVariables = {|
id: string,
categoryId: string,
isSubcategory: boolean,
|};
export type ArticleDetailQueryResponse = {|
+FAQArticle: ?{|
+title: ?string,
+$fragmentRefs: ArticleContent_article$ref,
|},
+FAQCategory?: ?{|
+title: ?string,
+id: string,
+ancestors: ?$ReadOnlyArray<?{|
+id: string,
+title: ?string,
|}>,
|},
|};
export type ArticleDetailQuery = {|
variables: ArticleDetailQueryVariables,
response: ArticleDetailQueryResponse,
|};
*/
/*
query ArticleDetailQuery(
$id: ID!
$categoryId: ID!
$isSubcategory: Boolean!
) {
FAQArticle(id: $id) {
title
...ArticleContent_article
id
}
FAQCategory(id: $categoryId) @include(if: $isSubcategory) {
title
id
ancestors {
id
title
}
}
}
fragment ArticleContent_article on FAQArticle {
...FAQContentRender_article
id
originalId: id(opaque: false)
title
perex
content
}
fragment FAQContentRender_article on FAQArticle {
articleId: id(opaque: false)
}
*/
var node
/*: ConcreteRequest*/
= function () {
var v0 = [{
"kind": "LocalArgument",
"name": "id",
"type": "ID!",
"defaultValue": null
}, {
"kind": "LocalArgument",
"name": "categoryId",
"type": "ID!",
"defaultValue": null
}, {
"kind": "LocalArgument",
"name": "isSubcategory",
"type": "Boolean!",
"defaultValue": null
}],
v1 = [{
"kind": "Variable",
"name": "id",
"variableName": "id"
}],
v2 = {
"kind": "ScalarField",
"alias": null,
"name": "title",
"args": null,
"storageKey": null
},
v3 = {
"kind": "ScalarField",
"alias": null,
"name": "id",
"args": null,
"storageKey": null
},
v4 = {
"kind": "Condition",
"passingValue": true,
"condition": "isSubcategory",
"selections": [{
"kind": "LinkedField",
"alias": null,
"name": "FAQCategory",
"storageKey": null,
"args": [{
"kind": "Variable",
"name": "id",
"variableName": "categoryId"
}],
"concreteType": "FAQCategory",
"plural": false,
"selections": [v2
/*: any*/
, v3
/*: any*/
, {
"kind": "LinkedField",
"alias": null,
"name": "ancestors",
"storageKey": null,
"args": null,
"concreteType": "FAQCategory",
"plural": true,
"selections": [v3
/*: any*/
, v2
/*: any*/
]
}]
}]
},
v5 = [{
"kind": "Literal",
"name": "opaque",
"value": false
}];
return {
"kind": "Request",
"fragment": {
"kind": "Fragment",
"name": "ArticleDetailQuery",
"type": "RootQuery",
"metadata": null,
"argumentDefinitions": v0
/*: any*/
,
"selections": [{
"kind": "LinkedField",
"alias": null,
"name": "FAQArticle",
"storageKey": null,
"args": v1
/*: any*/
,
"concreteType": "FAQArticle",
"plural": false,
"selections": [v2
/*: any*/
, {
"kind": "FragmentSpread",
"name": "ArticleContent_article",
"args": null
}]
}, v4
/*: any*/
]
},
"operation": {
"kind": "Operation",
"name": "ArticleDetailQuery",
"argumentDefinitions": v0
/*: any*/
,
"selections": [{
"kind": "LinkedField",
"alias": null,
"name": "FAQArticle",
"storageKey": null,
"args": v1
/*: any*/
,
"concreteType": "FAQArticle",
"plural": false,
"selections": [v2
/*: any*/
, {
"kind": "ScalarField",
"alias": "articleId",
"name": "id",
"args": v5
/*: any*/
,
"storageKey": "id(opaque:false)"
}, v3
/*: any*/
, {
"kind": "ScalarField",
"alias": "originalId",
"name": "id",
"args": v5
/*: any*/
,
"storageKey": "id(opaque:false)"
}, {
"kind": "ScalarField",
"alias": null,
"name": "perex",
"args": null,
"storageKey": null
}, {
"kind": "ScalarField",
"alias": null,
"name": "content",
"args": null,
"storageKey": null
}]
}, v4
/*: any*/
]
},
"params": {
"operationKind": "query",
"name": "ArticleDetailQuery",
"id": null,
"text": "query ArticleDetailQuery(\n $id: ID!\n $categoryId: ID!\n $isSubcategory: Boolean!\n) {\n FAQArticle(id: $id) {\n title\n ...ArticleContent_article\n id\n }\n FAQCategory(id: $categoryId) @include(if: $isSubcategory) {\n title\n id\n ancestors {\n id\n title\n }\n }\n}\n\nfragment ArticleContent_article on FAQArticle {\n ...FAQContentRender_article\n id\n originalId: id(opaque: false)\n title\n perex\n content\n}\n\nfragment FAQContentRender_article on FAQArticle {\n articleId: id(opaque: false)\n}\n",
"metadata": {}
}
};
}(); // prettier-ignore
node
/*: any*/
.hash = '65b4847f742f5438129863eb7001d18c';
module.exports = node;