@kiwicom/smart-faq
Version:
288 lines (281 loc) • 6.72 kB
JavaScript
/**
* @flow
* @relayHash f9ce993559787321de43a7004f582378
*/
/* eslint-disable */
'use strict';
/*::
import type { ConcreteRequest } from 'relay-runtime';
type ArticleContent_article$ref = any;
export type ArticleDetailQueryVariables = {|
id: number,
categoryId: number,
isSubcategory: boolean,
|};
export type ArticleDetailQueryResponse = {|
+FAQArticle: ?{|
+title: ?string,
+$fragmentRefs: ArticleContent_article$ref,
|},
+FAQCategory?: ?{|
+title: ?string,
+originalId: string,
+ancestors: ?$ReadOnlyArray<?{|
+originalId: string,
+title: ?string,
|}>,
|},
|};
export type ArticleDetailQuery = {|
variables: ArticleDetailQueryVariables,
response: ArticleDetailQueryResponse,
|};
*/
/*
query ArticleDetailQuery(
$id: Int!
$categoryId: Int!
$isSubcategory: Boolean!
) {
FAQArticle(originalId: $id) {
title
...ArticleContent_article
id
}
FAQCategory(originalId: $categoryId) @include(if: $isSubcategory) {
title
originalId: id(opaque: false)
ancestors {
originalId: id(opaque: false)
title
id
}
id
}
}
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": "Int!",
"defaultValue": null
}, {
"kind": "LocalArgument",
"name": "categoryId",
"type": "Int!",
"defaultValue": null
}, {
"kind": "LocalArgument",
"name": "isSubcategory",
"type": "Boolean!",
"defaultValue": null
}],
v1 = [{
"kind": "Variable",
"name": "originalId",
"variableName": "id"
}],
v2 = {
"kind": "ScalarField",
"alias": null,
"name": "title",
"args": null,
"storageKey": null
},
v3 = [{
"kind": "Variable",
"name": "originalId",
"variableName": "categoryId"
}],
v4 = [{
"kind": "Literal",
"name": "opaque",
"value": false
}],
v5 = {
"kind": "ScalarField",
"alias": "originalId",
"name": "id",
"args": v4
/*: any*/
,
"storageKey": "id(opaque:false)"
},
v6 = {
"kind": "ScalarField",
"alias": null,
"name": "id",
"args": null,
"storageKey": null
};
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
}]
}, {
"kind": "Condition",
"passingValue": true,
"condition": "isSubcategory",
"selections": [{
"kind": "LinkedField",
"alias": null,
"name": "FAQCategory",
"storageKey": null,
"args": v3
/*: any*/
,
"concreteType": "FAQCategory",
"plural": false,
"selections": [v2
/*: any*/
, v5
/*: any*/
, {
"kind": "LinkedField",
"alias": null,
"name": "ancestors",
"storageKey": null,
"args": null,
"concreteType": "FAQCategory",
"plural": true,
"selections": [v5
/*: any*/
, v2
/*: 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": v4
/*: any*/
,
"storageKey": "id(opaque:false)"
}, v6
/*: any*/
, v5
/*: any*/
, {
"kind": "ScalarField",
"alias": null,
"name": "perex",
"args": null,
"storageKey": null
}, {
"kind": "ScalarField",
"alias": null,
"name": "content",
"args": null,
"storageKey": null
}]
}, {
"kind": "Condition",
"passingValue": true,
"condition": "isSubcategory",
"selections": [{
"kind": "LinkedField",
"alias": null,
"name": "FAQCategory",
"storageKey": null,
"args": v3
/*: any*/
,
"concreteType": "FAQCategory",
"plural": false,
"selections": [v2
/*: any*/
, v5
/*: any*/
, {
"kind": "LinkedField",
"alias": null,
"name": "ancestors",
"storageKey": null,
"args": null,
"concreteType": "FAQCategory",
"plural": true,
"selections": [v5
/*: any*/
, v2
/*: any*/
, v6
/*: any*/
]
}, v6
/*: any*/
]
}]
}]
},
"params": {
"operationKind": "query",
"name": "ArticleDetailQuery",
"id": null,
"text": "query ArticleDetailQuery(\n $id: Int!\n $categoryId: Int!\n $isSubcategory: Boolean!\n) {\n FAQArticle(originalId: $id) {\n title\n ...ArticleContent_article\n id\n }\n FAQCategory(originalId: $categoryId) @include(if: $isSubcategory) {\n title\n originalId: id(opaque: false)\n ancestors {\n originalId: id(opaque: false)\n title\n id\n }\n id\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 = '362ebca323833a7f527561635fb7a3dd';
module.exports = node;