├── .watchmanconfig ├── .gitignore ├── app.json ├── .github └── dependabot.yml ├── .babelrc ├── App.test.js ├── data ├── schema.graphql └── schema.json ├── src ├── environment.js ├── components │ ├── common │ │ └── Button.js │ ├── FightersListItem.js │ └── FightersList.js ├── scenes │ └── FightersScene.js └── navigators │ ├── FighterDetailNavigator.js │ └── FightersListNavigator.js ├── README.md ├── App.js ├── LICENSE ├── package.json └── .flowconfig /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .expo/ 3 | npm-debug.* 4 | 5 | __generated__ 6 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "sdkVersion": "17.0.0", 4 | "privacy": "public", 5 | "name": "Top UFC Fighters", 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "09:00" 8 | open-pull-requests-limit: 10 9 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "relay" 4 | ], 5 | "presets": ["babel-preset-expo"], 6 | "env": { 7 | "development": { 8 | "plugins": ["transform-react-jsx-source"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import App from './App'; 3 | 4 | import renderer from 'react-test-renderer'; 5 | 6 | it('renders without crashing', () => { 7 | const rendered = renderer.create().toJSON(); 8 | expect(rendered).toBeTruthy(); 9 | }); 10 | -------------------------------------------------------------------------------- /data/schema.graphql: -------------------------------------------------------------------------------- 1 | type Fighter { 2 | # The ID of an object 3 | id: ID! 4 | _id: Int 5 | profileImage: String 6 | firstName: String 7 | lastName: String 8 | nickname: String 9 | weightClass: String 10 | wins: Int 11 | losses: Int 12 | draws: Int 13 | beltThumbnail: String 14 | link: String 15 | } 16 | 17 | type Query { 18 | allFighters: [Fighter] 19 | } 20 | -------------------------------------------------------------------------------- /src/environment.js: -------------------------------------------------------------------------------- 1 | import { Environment, Network, RecordSource, Store } from 'relay-runtime'; 2 | 3 | const fetchQuery = async (operation, variables, cacheConfig, uploadables) => { 4 | const response = await fetch('https://graphql-ufc-api.now.sh/', { 5 | method: 'POST', 6 | headers: { 7 | Accept: 'application/json', 8 | 'Content-Type': 'application/json', 9 | }, 10 | body: JSON.stringify({ 11 | query: operation.text, 12 | variables, 13 | }), 14 | }); 15 | return await response.json(); 16 | } 17 | 18 | const network = Network.create(fetchQuery); 19 | 20 | const source = new RecordSource(); 21 | const store = new Store(source); 22 | 23 | const env = new Environment({ 24 | network, 25 | store, 26 | }); 27 | 28 | export default env; 29 | -------------------------------------------------------------------------------- /src/components/common/Button.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react' 2 | import { StyleSheet, TouchableOpacity, Text } from 'react-native' 3 | 4 | export default class Button extends PureComponent { 5 | render() { 6 | const { onPress, children } = this.props 7 | const { container, label } = styles 8 | return ( 9 | 10 | {children} 11 | 12 | ) 13 | } 14 | } 15 | 16 | const styles = StyleSheet.create({ 17 | container: { 18 | backgroundColor: '#fff', 19 | borderRadius: 5, 20 | borderWidth: 1, 21 | borderColor: 'rgb(0, 122, 255)', 22 | marginLeft: 5, 23 | marginRight: 5 24 | }, 25 | label: { 26 | alignSelf: 'center', 27 | color: 'rgb(0, 122, 255)', 28 | fontSize: 16, 29 | fontWeight: '600', 30 | paddingTop: 10, 31 | paddingBottom: 10 32 | } 33 | }) 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-relay-graphql-example 2 | 3 | React Native + Relay Modern + GraphQL: an app to display information about top UFC fighters. 4 | 5 | The data is fetched by Relay Modern from this GraphQL Server: [https://graphql-ufc-api.now.sh/](https://graphql-ufc-api.now.sh/) 6 | 7 | ## GraphQL Server 8 | GraphQL Server's code is [here](https://github.com/jgcmarins/graphql-ufc-api). 9 | 10 | ## Try it 11 | Live demo [here](https://exp.host/@jgcmarins/top-ufc-fighters). 12 | 13 | ## Installation 14 | ``` 15 | $ yarn install 16 | ``` 17 | or 18 | ``` 19 | $ npm install 20 | ``` 21 | 22 | ## Running 23 | ``` 24 | $ yarn start 25 | ``` 26 | or 27 | ``` 28 | $ npm start 29 | ``` 30 | 31 | ## Dependencies 32 | This app was built on top of [CRNA](https://github.com/react-community/create-react-native-app). 33 | 34 | ## LICENSE 35 | [MIT](https://github.com/jgcmarins/react-native-relay-graphql-example/blob/master/LICENSE) 36 | -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StackNavigator } from 'react-navigation'; 3 | 4 | import FightersListNavigator from './src/navigators/FightersListNavigator'; 5 | import FighterDetailNavigator from './src/navigators/FighterDetailNavigator'; 6 | 7 | // Fix for Android - It wasn't fetching the data properly when NOT in debug mode 8 | // https://github.com/facebook/relay/issues/1704 9 | (function(PolyfillSet) { 10 | if (!PolyfillSet) { 11 | return; 12 | } 13 | var testSet = new PolyfillSet(); 14 | if (testSet.size === undefined) { 15 | if (testSet._c.size === 0) { 16 | Object.defineProperty(PolyfillSet.prototype, 'size', { 17 | get: function() { 18 | return this._c.size; 19 | }, 20 | }); 21 | } 22 | } 23 | })(require('babel-runtime/core-js/set').default); 24 | 25 | const UFCFightersApp = StackNavigator( 26 | { 27 | FightersListNavigator: { screen: FightersListNavigator }, 28 | FighterDetailNavigator: { screen: FighterDetailNavigator }, 29 | }, 30 | { 31 | initialRouteName: 'FightersListNavigator', 32 | }, 33 | ); 34 | 35 | export default () => ; 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 4a6f616f Gracinha 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-relay-graphql-example", 3 | "version": "0.1.0", 4 | "private": false, 5 | "devDependencies": { 6 | "babel-plugin-relay": "^1.5.0", 7 | "babel-preset-react-native": "^4.0.1", 8 | "jest-expo": "~42.1.0", 9 | "react-native-scripts": "2.0.1", 10 | "react-test-renderer": "17.0.2", 11 | "relay-compiler": "^1.5.0" 12 | }, 13 | "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js", 14 | "scripts": { 15 | "start": "react-native-scripts start", 16 | "eject": "react-native-scripts eject", 17 | "android": "react-native-scripts android", 18 | "ios": "react-native-scripts ios", 19 | "relay": "relay-compiler --src ./src --schema data/schema.graphql", 20 | "test": "node node_modules/jest/bin/jest.js --watch" 21 | }, 22 | "jest": { 23 | "preset": "jest-expo" 24 | }, 25 | "dependencies": { 26 | "babel-preset-react-native-stage-0": "^1.0.1", 27 | "expo": "^42.0.3", 28 | "react": "17.0.2", 29 | "react-native": "^0.65.1", 30 | "react-native-tab-view": "^1.4.1", 31 | "react-navigation": "^4.4.4", 32 | "react-relay": "^11.0.2" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/components/FightersListItem.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { StyleSheet, View, Text, Image, TouchableOpacity } from 'react-native'; 3 | 4 | export default class FightersListItem extends PureComponent { 5 | 6 | _calculateWinRate = (wins, losses, draws) => { 7 | var total = wins + losses + draws; 8 | return Math.round(((wins/total) * 100)); 9 | } 10 | 11 | render() { 12 | const { fighter } = this.props; 13 | const { navigate } = this.props.navigation 14 | const { wins, losses, draws } = fighter; 15 | return ( 16 | navigate('FighterDetailNavigator', {fighter})}> 17 | 25 | 26 | 27 | 28 | {fighter.firstName + ' ' + fighter.lastName} 29 | {fighter.nickname} 30 | 31 | 32 | 33 | {'Win rate: ' + this._calculateWinRate(wins, losses, draws) + '%'} 34 | 35 | 36 | 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/scenes/FightersScene.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { StyleSheet, View, Text, ScrollView, } from 'react-native'; 3 | import Relay, { 4 | graphql, 5 | QueryRenderer, 6 | } from 'react-relay'; 7 | 8 | import environment from '../environment'; 9 | import FightersList from '../components/FightersList'; 10 | 11 | export default class FightersScene extends PureComponent { 12 | 13 | render() { 14 | 15 | return ( 16 | { 36 | if(error) { 37 | return ({error.message}); 38 | } else if(props) { 39 | return ( 40 | 45 | ); 46 | } else { 47 | return ({'Loading...'}); 48 | } 49 | }} 50 | /> 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/components/FightersList.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { StyleSheet, View, Text, ScrollView, } from 'react-native'; 3 | 4 | import FightersListItem from './FightersListItem'; 5 | 6 | export default class FightersList extends PureComponent { 7 | 8 | _renderFighters = (allFighters, gender) => { 9 | var fighters = new Array(); 10 | allFighters.map(fighter => { 11 | if(fighter.weightClass && fighter.beltThumbnail !== null) { 12 | if(!fighter.weightClass.includes('Women') && gender === 'male') { 13 | fighters.push(fighter); 14 | } else if(fighter.weightClass.includes('Women') && gender === 'female') { 15 | fighters.push(fighter); 16 | } 17 | } 18 | }); 19 | 20 | fighters = fighters.sort((A, B) => { 21 | var totalA = (A.wins + A.losses + A.draws); 22 | var rateA = Math.round((A.wins/totalA) * 100); 23 | var totalB = (B.wins + B.losses + B.draws); 24 | var rateB = Math.round((B.wins/totalB) * 100); 25 | return (rateB - rateA); 26 | }); 27 | 28 | var fightersList = fighters.map(fighter => { 29 | return ( 30 | 35 | ); 36 | }); 37 | 38 | return fightersList; 39 | } 40 | 41 | render() { 42 | const { allFighters, gender } = this.props; 43 | return ( 44 | 45 | 46 | {this._renderFighters(allFighters, gender)} 47 | 48 | 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | .*/Libraries/react-native/ReactNative.js 16 | 17 | ; Additional create-react-native-app ignores 18 | 19 | ; Ignore duplicate module providers 20 | .*/node_modules/fbemitter/lib/* 21 | 22 | ; Ignore misbehaving dev-dependencies 23 | .*/node_modules/xdl/build/* 24 | .*/node_modules/reqwest/tests/* 25 | 26 | ; Ignore missing expo-sdk dependencies (temporarily) 27 | ; https://github.com/expo/expo/issues/162 28 | .*/node_modules/expo/src/* 29 | 30 | ; Ignore react-native-fbads dependency of the expo sdk 31 | .*/node_modules/react-native-fbads/* 32 | 33 | [include] 34 | 35 | [libs] 36 | node_modules/react-native/Libraries/react-native/react-native-interface.js 37 | node_modules/react-native/flow 38 | flow/ 39 | 40 | [options] 41 | module.system=haste 42 | 43 | emoji=true 44 | 45 | experimental.strict_type_args=true 46 | 47 | munge_underscores=true 48 | 49 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 50 | 51 | suppress_type=$FlowIssue 52 | suppress_type=$FlowFixMe 53 | suppress_type=$FixMe 54 | 55 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 56 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 57 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 58 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 59 | 60 | unsafe.enable_getters_and_setters=true 61 | 62 | [version] 63 | ^0.42.0 64 | -------------------------------------------------------------------------------- /src/navigators/FighterDetailNavigator.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { StyleSheet, View, Text, Image, Linking } from 'react-native'; 3 | 4 | import Button from '../components/common/Button'; 5 | 6 | export default class FighterDetailNavigator extends PureComponent { 7 | 8 | static navigationOptions = ({ navigation }) => ({ 9 | title: navigation.state.params.fighter.firstName + ' ' + navigation.state.params.fighter.lastName, 10 | headerStyle: { height: 80, paddingTop: 25, }, 11 | }); 12 | 13 | _onPressHandler = (url) => { Linking.openURL(url) } 14 | 15 | render() { 16 | const { 17 | _id, 18 | profileImage, 19 | firstName, 20 | lastName, 21 | nickname, 22 | weightClass, 23 | wins, 24 | losses, 25 | draws, 26 | beltThumbnail, 27 | link, 28 | } = this.props.navigation.state.params.fighter; 29 | return ( 30 | 36 | 37 | {nickname ? {'\"' + nickname + '\"'} : null} 38 | 39 | {'Weight class: ' + weightClass} 40 | 41 | 47 | {'Wins: ' + wins} 48 | {'Losses: ' + losses} 49 | {'Draws: ' + draws} 50 | 51 | 52 | 53 | 54 | 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/navigators/FightersListNavigator.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { StyleSheet, View, Text, TouchableOpacity } from 'react-native'; 3 | import { TabViewAnimated, TabBar, TabViewPagerPan } from 'react-native-tab-view'; 4 | import type { NavigationState } from 'react-native-tab-view/types'; 5 | 6 | import FightersScene from '../scenes/FightersScene'; 7 | 8 | type Route = { 9 | key: string, 10 | title: string, 11 | }; 12 | 13 | type State = NavigationState; 14 | 15 | export default class FightersListNavigator extends PureComponent { 16 | static navigationOptions = ({ navigation }) => ({ 17 | title: 'Top UFC Fighters', 18 | headerStyle: { height: 80, paddingTop: 25, }, 19 | }); 20 | 21 | state: State = { 22 | index: 0, 23 | routes: [ 24 | { key: '0', title: 'Female' }, 25 | { key: '1', title: 'Male' }, 26 | ], 27 | }; 28 | 29 | _renderTabHeader = props => { 30 | return ( 31 | 45 | {route.title.toUpperCase()} 46 | } 47 | /> 48 | ); 49 | }; 50 | 51 | _renderScene = ({ route }) => { 52 | switch (route.key) { 53 | case '0': 54 | return ( 55 | 56 | ); 57 | case '1': 58 | return ( 59 | 60 | ); 61 | default: 62 | return null; 63 | } 64 | }; 65 | 66 | _handleChangeTab = index => { 67 | this.setState({ 68 | index, 69 | }); 70 | }; 71 | 72 | _renderPager = props => ; 73 | 74 | render() { 75 | return ( 76 | 84 | ); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /data/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "__schema": { 4 | "queryType": { 5 | "name": "Query" 6 | }, 7 | "mutationType": null, 8 | "subscriptionType": null, 9 | "types": [ 10 | { 11 | "kind": "OBJECT", 12 | "name": "Query", 13 | "description": null, 14 | "fields": [ 15 | { 16 | "name": "allFighters", 17 | "description": null, 18 | "args": [], 19 | "type": { 20 | "kind": "LIST", 21 | "name": null, 22 | "ofType": { 23 | "kind": "OBJECT", 24 | "name": "Fighter", 25 | "ofType": null 26 | } 27 | }, 28 | "isDeprecated": false, 29 | "deprecationReason": null 30 | } 31 | ], 32 | "inputFields": null, 33 | "interfaces": [], 34 | "enumValues": null, 35 | "possibleTypes": null 36 | }, 37 | { 38 | "kind": "OBJECT", 39 | "name": "Fighter", 40 | "description": null, 41 | "fields": [ 42 | { 43 | "name": "id", 44 | "description": "The ID of an object", 45 | "args": [], 46 | "type": { 47 | "kind": "NON_NULL", 48 | "name": null, 49 | "ofType": { 50 | "kind": "SCALAR", 51 | "name": "ID", 52 | "ofType": null 53 | } 54 | }, 55 | "isDeprecated": false, 56 | "deprecationReason": null 57 | }, 58 | { 59 | "name": "_id", 60 | "description": null, 61 | "args": [], 62 | "type": { 63 | "kind": "SCALAR", 64 | "name": "Int", 65 | "ofType": null 66 | }, 67 | "isDeprecated": false, 68 | "deprecationReason": null 69 | }, 70 | { 71 | "name": "profileImage", 72 | "description": null, 73 | "args": [], 74 | "type": { 75 | "kind": "SCALAR", 76 | "name": "String", 77 | "ofType": null 78 | }, 79 | "isDeprecated": false, 80 | "deprecationReason": null 81 | }, 82 | { 83 | "name": "firstName", 84 | "description": null, 85 | "args": [], 86 | "type": { 87 | "kind": "SCALAR", 88 | "name": "String", 89 | "ofType": null 90 | }, 91 | "isDeprecated": false, 92 | "deprecationReason": null 93 | }, 94 | { 95 | "name": "lastName", 96 | "description": null, 97 | "args": [], 98 | "type": { 99 | "kind": "SCALAR", 100 | "name": "String", 101 | "ofType": null 102 | }, 103 | "isDeprecated": false, 104 | "deprecationReason": null 105 | }, 106 | { 107 | "name": "nickname", 108 | "description": null, 109 | "args": [], 110 | "type": { 111 | "kind": "SCALAR", 112 | "name": "String", 113 | "ofType": null 114 | }, 115 | "isDeprecated": false, 116 | "deprecationReason": null 117 | }, 118 | { 119 | "name": "weightClass", 120 | "description": null, 121 | "args": [], 122 | "type": { 123 | "kind": "SCALAR", 124 | "name": "String", 125 | "ofType": null 126 | }, 127 | "isDeprecated": false, 128 | "deprecationReason": null 129 | }, 130 | { 131 | "name": "wins", 132 | "description": null, 133 | "args": [], 134 | "type": { 135 | "kind": "SCALAR", 136 | "name": "Int", 137 | "ofType": null 138 | }, 139 | "isDeprecated": false, 140 | "deprecationReason": null 141 | }, 142 | { 143 | "name": "losses", 144 | "description": null, 145 | "args": [], 146 | "type": { 147 | "kind": "SCALAR", 148 | "name": "Int", 149 | "ofType": null 150 | }, 151 | "isDeprecated": false, 152 | "deprecationReason": null 153 | }, 154 | { 155 | "name": "draws", 156 | "description": null, 157 | "args": [], 158 | "type": { 159 | "kind": "SCALAR", 160 | "name": "Int", 161 | "ofType": null 162 | }, 163 | "isDeprecated": false, 164 | "deprecationReason": null 165 | }, 166 | { 167 | "name": "beltThumbnail", 168 | "description": null, 169 | "args": [], 170 | "type": { 171 | "kind": "SCALAR", 172 | "name": "String", 173 | "ofType": null 174 | }, 175 | "isDeprecated": false, 176 | "deprecationReason": null 177 | }, 178 | { 179 | "name": "link", 180 | "description": null, 181 | "args": [], 182 | "type": { 183 | "kind": "SCALAR", 184 | "name": "String", 185 | "ofType": null 186 | }, 187 | "isDeprecated": false, 188 | "deprecationReason": null 189 | } 190 | ], 191 | "inputFields": null, 192 | "interfaces": [], 193 | "enumValues": null, 194 | "possibleTypes": null 195 | }, 196 | { 197 | "kind": "SCALAR", 198 | "name": "ID", 199 | "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.", 200 | "fields": null, 201 | "inputFields": null, 202 | "interfaces": null, 203 | "enumValues": null, 204 | "possibleTypes": null 205 | }, 206 | { 207 | "kind": "SCALAR", 208 | "name": "Int", 209 | "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ", 210 | "fields": null, 211 | "inputFields": null, 212 | "interfaces": null, 213 | "enumValues": null, 214 | "possibleTypes": null 215 | }, 216 | { 217 | "kind": "SCALAR", 218 | "name": "String", 219 | "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", 220 | "fields": null, 221 | "inputFields": null, 222 | "interfaces": null, 223 | "enumValues": null, 224 | "possibleTypes": null 225 | }, 226 | { 227 | "kind": "OBJECT", 228 | "name": "__Schema", 229 | "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", 230 | "fields": [ 231 | { 232 | "name": "types", 233 | "description": "A list of all types supported by this server.", 234 | "args": [], 235 | "type": { 236 | "kind": "NON_NULL", 237 | "name": null, 238 | "ofType": { 239 | "kind": "LIST", 240 | "name": null, 241 | "ofType": { 242 | "kind": "NON_NULL", 243 | "name": null, 244 | "ofType": { 245 | "kind": "OBJECT", 246 | "name": "__Type", 247 | "ofType": null 248 | } 249 | } 250 | } 251 | }, 252 | "isDeprecated": false, 253 | "deprecationReason": null 254 | }, 255 | { 256 | "name": "queryType", 257 | "description": "The type that query operations will be rooted at.", 258 | "args": [], 259 | "type": { 260 | "kind": "NON_NULL", 261 | "name": null, 262 | "ofType": { 263 | "kind": "OBJECT", 264 | "name": "__Type", 265 | "ofType": null 266 | } 267 | }, 268 | "isDeprecated": false, 269 | "deprecationReason": null 270 | }, 271 | { 272 | "name": "mutationType", 273 | "description": "If this server supports mutation, the type that mutation operations will be rooted at.", 274 | "args": [], 275 | "type": { 276 | "kind": "OBJECT", 277 | "name": "__Type", 278 | "ofType": null 279 | }, 280 | "isDeprecated": false, 281 | "deprecationReason": null 282 | }, 283 | { 284 | "name": "subscriptionType", 285 | "description": "If this server support subscription, the type that subscription operations will be rooted at.", 286 | "args": [], 287 | "type": { 288 | "kind": "OBJECT", 289 | "name": "__Type", 290 | "ofType": null 291 | }, 292 | "isDeprecated": false, 293 | "deprecationReason": null 294 | }, 295 | { 296 | "name": "directives", 297 | "description": "A list of all directives supported by this server.", 298 | "args": [], 299 | "type": { 300 | "kind": "NON_NULL", 301 | "name": null, 302 | "ofType": { 303 | "kind": "LIST", 304 | "name": null, 305 | "ofType": { 306 | "kind": "NON_NULL", 307 | "name": null, 308 | "ofType": { 309 | "kind": "OBJECT", 310 | "name": "__Directive", 311 | "ofType": null 312 | } 313 | } 314 | } 315 | }, 316 | "isDeprecated": false, 317 | "deprecationReason": null 318 | } 319 | ], 320 | "inputFields": null, 321 | "interfaces": [], 322 | "enumValues": null, 323 | "possibleTypes": null 324 | }, 325 | { 326 | "kind": "OBJECT", 327 | "name": "__Type", 328 | "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", 329 | "fields": [ 330 | { 331 | "name": "kind", 332 | "description": null, 333 | "args": [], 334 | "type": { 335 | "kind": "NON_NULL", 336 | "name": null, 337 | "ofType": { 338 | "kind": "ENUM", 339 | "name": "__TypeKind", 340 | "ofType": null 341 | } 342 | }, 343 | "isDeprecated": false, 344 | "deprecationReason": null 345 | }, 346 | { 347 | "name": "name", 348 | "description": null, 349 | "args": [], 350 | "type": { 351 | "kind": "SCALAR", 352 | "name": "String", 353 | "ofType": null 354 | }, 355 | "isDeprecated": false, 356 | "deprecationReason": null 357 | }, 358 | { 359 | "name": "description", 360 | "description": null, 361 | "args": [], 362 | "type": { 363 | "kind": "SCALAR", 364 | "name": "String", 365 | "ofType": null 366 | }, 367 | "isDeprecated": false, 368 | "deprecationReason": null 369 | }, 370 | { 371 | "name": "fields", 372 | "description": null, 373 | "args": [ 374 | { 375 | "name": "includeDeprecated", 376 | "description": null, 377 | "type": { 378 | "kind": "SCALAR", 379 | "name": "Boolean", 380 | "ofType": null 381 | }, 382 | "defaultValue": "false" 383 | } 384 | ], 385 | "type": { 386 | "kind": "LIST", 387 | "name": null, 388 | "ofType": { 389 | "kind": "NON_NULL", 390 | "name": null, 391 | "ofType": { 392 | "kind": "OBJECT", 393 | "name": "__Field", 394 | "ofType": null 395 | } 396 | } 397 | }, 398 | "isDeprecated": false, 399 | "deprecationReason": null 400 | }, 401 | { 402 | "name": "interfaces", 403 | "description": null, 404 | "args": [], 405 | "type": { 406 | "kind": "LIST", 407 | "name": null, 408 | "ofType": { 409 | "kind": "NON_NULL", 410 | "name": null, 411 | "ofType": { 412 | "kind": "OBJECT", 413 | "name": "__Type", 414 | "ofType": null 415 | } 416 | } 417 | }, 418 | "isDeprecated": false, 419 | "deprecationReason": null 420 | }, 421 | { 422 | "name": "possibleTypes", 423 | "description": null, 424 | "args": [], 425 | "type": { 426 | "kind": "LIST", 427 | "name": null, 428 | "ofType": { 429 | "kind": "NON_NULL", 430 | "name": null, 431 | "ofType": { 432 | "kind": "OBJECT", 433 | "name": "__Type", 434 | "ofType": null 435 | } 436 | } 437 | }, 438 | "isDeprecated": false, 439 | "deprecationReason": null 440 | }, 441 | { 442 | "name": "enumValues", 443 | "description": null, 444 | "args": [ 445 | { 446 | "name": "includeDeprecated", 447 | "description": null, 448 | "type": { 449 | "kind": "SCALAR", 450 | "name": "Boolean", 451 | "ofType": null 452 | }, 453 | "defaultValue": "false" 454 | } 455 | ], 456 | "type": { 457 | "kind": "LIST", 458 | "name": null, 459 | "ofType": { 460 | "kind": "NON_NULL", 461 | "name": null, 462 | "ofType": { 463 | "kind": "OBJECT", 464 | "name": "__EnumValue", 465 | "ofType": null 466 | } 467 | } 468 | }, 469 | "isDeprecated": false, 470 | "deprecationReason": null 471 | }, 472 | { 473 | "name": "inputFields", 474 | "description": null, 475 | "args": [], 476 | "type": { 477 | "kind": "LIST", 478 | "name": null, 479 | "ofType": { 480 | "kind": "NON_NULL", 481 | "name": null, 482 | "ofType": { 483 | "kind": "OBJECT", 484 | "name": "__InputValue", 485 | "ofType": null 486 | } 487 | } 488 | }, 489 | "isDeprecated": false, 490 | "deprecationReason": null 491 | }, 492 | { 493 | "name": "ofType", 494 | "description": null, 495 | "args": [], 496 | "type": { 497 | "kind": "OBJECT", 498 | "name": "__Type", 499 | "ofType": null 500 | }, 501 | "isDeprecated": false, 502 | "deprecationReason": null 503 | } 504 | ], 505 | "inputFields": null, 506 | "interfaces": [], 507 | "enumValues": null, 508 | "possibleTypes": null 509 | }, 510 | { 511 | "kind": "ENUM", 512 | "name": "__TypeKind", 513 | "description": "An enum describing what kind of type a given `__Type` is.", 514 | "fields": null, 515 | "inputFields": null, 516 | "interfaces": null, 517 | "enumValues": [ 518 | { 519 | "name": "SCALAR", 520 | "description": "Indicates this type is a scalar.", 521 | "isDeprecated": false, 522 | "deprecationReason": null 523 | }, 524 | { 525 | "name": "OBJECT", 526 | "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", 527 | "isDeprecated": false, 528 | "deprecationReason": null 529 | }, 530 | { 531 | "name": "INTERFACE", 532 | "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", 533 | "isDeprecated": false, 534 | "deprecationReason": null 535 | }, 536 | { 537 | "name": "UNION", 538 | "description": "Indicates this type is a union. `possibleTypes` is a valid field.", 539 | "isDeprecated": false, 540 | "deprecationReason": null 541 | }, 542 | { 543 | "name": "ENUM", 544 | "description": "Indicates this type is an enum. `enumValues` is a valid field.", 545 | "isDeprecated": false, 546 | "deprecationReason": null 547 | }, 548 | { 549 | "name": "INPUT_OBJECT", 550 | "description": "Indicates this type is an input object. `inputFields` is a valid field.", 551 | "isDeprecated": false, 552 | "deprecationReason": null 553 | }, 554 | { 555 | "name": "LIST", 556 | "description": "Indicates this type is a list. `ofType` is a valid field.", 557 | "isDeprecated": false, 558 | "deprecationReason": null 559 | }, 560 | { 561 | "name": "NON_NULL", 562 | "description": "Indicates this type is a non-null. `ofType` is a valid field.", 563 | "isDeprecated": false, 564 | "deprecationReason": null 565 | } 566 | ], 567 | "possibleTypes": null 568 | }, 569 | { 570 | "kind": "SCALAR", 571 | "name": "Boolean", 572 | "description": "The `Boolean` scalar type represents `true` or `false`.", 573 | "fields": null, 574 | "inputFields": null, 575 | "interfaces": null, 576 | "enumValues": null, 577 | "possibleTypes": null 578 | }, 579 | { 580 | "kind": "OBJECT", 581 | "name": "__Field", 582 | "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", 583 | "fields": [ 584 | { 585 | "name": "name", 586 | "description": null, 587 | "args": [], 588 | "type": { 589 | "kind": "NON_NULL", 590 | "name": null, 591 | "ofType": { 592 | "kind": "SCALAR", 593 | "name": "String", 594 | "ofType": null 595 | } 596 | }, 597 | "isDeprecated": false, 598 | "deprecationReason": null 599 | }, 600 | { 601 | "name": "description", 602 | "description": null, 603 | "args": [], 604 | "type": { 605 | "kind": "SCALAR", 606 | "name": "String", 607 | "ofType": null 608 | }, 609 | "isDeprecated": false, 610 | "deprecationReason": null 611 | }, 612 | { 613 | "name": "args", 614 | "description": null, 615 | "args": [], 616 | "type": { 617 | "kind": "NON_NULL", 618 | "name": null, 619 | "ofType": { 620 | "kind": "LIST", 621 | "name": null, 622 | "ofType": { 623 | "kind": "NON_NULL", 624 | "name": null, 625 | "ofType": { 626 | "kind": "OBJECT", 627 | "name": "__InputValue", 628 | "ofType": null 629 | } 630 | } 631 | } 632 | }, 633 | "isDeprecated": false, 634 | "deprecationReason": null 635 | }, 636 | { 637 | "name": "type", 638 | "description": null, 639 | "args": [], 640 | "type": { 641 | "kind": "NON_NULL", 642 | "name": null, 643 | "ofType": { 644 | "kind": "OBJECT", 645 | "name": "__Type", 646 | "ofType": null 647 | } 648 | }, 649 | "isDeprecated": false, 650 | "deprecationReason": null 651 | }, 652 | { 653 | "name": "isDeprecated", 654 | "description": null, 655 | "args": [], 656 | "type": { 657 | "kind": "NON_NULL", 658 | "name": null, 659 | "ofType": { 660 | "kind": "SCALAR", 661 | "name": "Boolean", 662 | "ofType": null 663 | } 664 | }, 665 | "isDeprecated": false, 666 | "deprecationReason": null 667 | }, 668 | { 669 | "name": "deprecationReason", 670 | "description": null, 671 | "args": [], 672 | "type": { 673 | "kind": "SCALAR", 674 | "name": "String", 675 | "ofType": null 676 | }, 677 | "isDeprecated": false, 678 | "deprecationReason": null 679 | } 680 | ], 681 | "inputFields": null, 682 | "interfaces": [], 683 | "enumValues": null, 684 | "possibleTypes": null 685 | }, 686 | { 687 | "kind": "OBJECT", 688 | "name": "__InputValue", 689 | "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", 690 | "fields": [ 691 | { 692 | "name": "name", 693 | "description": null, 694 | "args": [], 695 | "type": { 696 | "kind": "NON_NULL", 697 | "name": null, 698 | "ofType": { 699 | "kind": "SCALAR", 700 | "name": "String", 701 | "ofType": null 702 | } 703 | }, 704 | "isDeprecated": false, 705 | "deprecationReason": null 706 | }, 707 | { 708 | "name": "description", 709 | "description": null, 710 | "args": [], 711 | "type": { 712 | "kind": "SCALAR", 713 | "name": "String", 714 | "ofType": null 715 | }, 716 | "isDeprecated": false, 717 | "deprecationReason": null 718 | }, 719 | { 720 | "name": "type", 721 | "description": null, 722 | "args": [], 723 | "type": { 724 | "kind": "NON_NULL", 725 | "name": null, 726 | "ofType": { 727 | "kind": "OBJECT", 728 | "name": "__Type", 729 | "ofType": null 730 | } 731 | }, 732 | "isDeprecated": false, 733 | "deprecationReason": null 734 | }, 735 | { 736 | "name": "defaultValue", 737 | "description": "A GraphQL-formatted string representing the default value for this input value.", 738 | "args": [], 739 | "type": { 740 | "kind": "SCALAR", 741 | "name": "String", 742 | "ofType": null 743 | }, 744 | "isDeprecated": false, 745 | "deprecationReason": null 746 | } 747 | ], 748 | "inputFields": null, 749 | "interfaces": [], 750 | "enumValues": null, 751 | "possibleTypes": null 752 | }, 753 | { 754 | "kind": "OBJECT", 755 | "name": "__EnumValue", 756 | "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", 757 | "fields": [ 758 | { 759 | "name": "name", 760 | "description": null, 761 | "args": [], 762 | "type": { 763 | "kind": "NON_NULL", 764 | "name": null, 765 | "ofType": { 766 | "kind": "SCALAR", 767 | "name": "String", 768 | "ofType": null 769 | } 770 | }, 771 | "isDeprecated": false, 772 | "deprecationReason": null 773 | }, 774 | { 775 | "name": "description", 776 | "description": null, 777 | "args": [], 778 | "type": { 779 | "kind": "SCALAR", 780 | "name": "String", 781 | "ofType": null 782 | }, 783 | "isDeprecated": false, 784 | "deprecationReason": null 785 | }, 786 | { 787 | "name": "isDeprecated", 788 | "description": null, 789 | "args": [], 790 | "type": { 791 | "kind": "NON_NULL", 792 | "name": null, 793 | "ofType": { 794 | "kind": "SCALAR", 795 | "name": "Boolean", 796 | "ofType": null 797 | } 798 | }, 799 | "isDeprecated": false, 800 | "deprecationReason": null 801 | }, 802 | { 803 | "name": "deprecationReason", 804 | "description": null, 805 | "args": [], 806 | "type": { 807 | "kind": "SCALAR", 808 | "name": "String", 809 | "ofType": null 810 | }, 811 | "isDeprecated": false, 812 | "deprecationReason": null 813 | } 814 | ], 815 | "inputFields": null, 816 | "interfaces": [], 817 | "enumValues": null, 818 | "possibleTypes": null 819 | }, 820 | { 821 | "kind": "OBJECT", 822 | "name": "__Directive", 823 | "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", 824 | "fields": [ 825 | { 826 | "name": "name", 827 | "description": null, 828 | "args": [], 829 | "type": { 830 | "kind": "NON_NULL", 831 | "name": null, 832 | "ofType": { 833 | "kind": "SCALAR", 834 | "name": "String", 835 | "ofType": null 836 | } 837 | }, 838 | "isDeprecated": false, 839 | "deprecationReason": null 840 | }, 841 | { 842 | "name": "description", 843 | "description": null, 844 | "args": [], 845 | "type": { 846 | "kind": "SCALAR", 847 | "name": "String", 848 | "ofType": null 849 | }, 850 | "isDeprecated": false, 851 | "deprecationReason": null 852 | }, 853 | { 854 | "name": "locations", 855 | "description": null, 856 | "args": [], 857 | "type": { 858 | "kind": "NON_NULL", 859 | "name": null, 860 | "ofType": { 861 | "kind": "LIST", 862 | "name": null, 863 | "ofType": { 864 | "kind": "NON_NULL", 865 | "name": null, 866 | "ofType": { 867 | "kind": "ENUM", 868 | "name": "__DirectiveLocation", 869 | "ofType": null 870 | } 871 | } 872 | } 873 | }, 874 | "isDeprecated": false, 875 | "deprecationReason": null 876 | }, 877 | { 878 | "name": "args", 879 | "description": null, 880 | "args": [], 881 | "type": { 882 | "kind": "NON_NULL", 883 | "name": null, 884 | "ofType": { 885 | "kind": "LIST", 886 | "name": null, 887 | "ofType": { 888 | "kind": "NON_NULL", 889 | "name": null, 890 | "ofType": { 891 | "kind": "OBJECT", 892 | "name": "__InputValue", 893 | "ofType": null 894 | } 895 | } 896 | } 897 | }, 898 | "isDeprecated": false, 899 | "deprecationReason": null 900 | }, 901 | { 902 | "name": "onOperation", 903 | "description": null, 904 | "args": [], 905 | "type": { 906 | "kind": "NON_NULL", 907 | "name": null, 908 | "ofType": { 909 | "kind": "SCALAR", 910 | "name": "Boolean", 911 | "ofType": null 912 | } 913 | }, 914 | "isDeprecated": true, 915 | "deprecationReason": "Use `locations`." 916 | }, 917 | { 918 | "name": "onFragment", 919 | "description": null, 920 | "args": [], 921 | "type": { 922 | "kind": "NON_NULL", 923 | "name": null, 924 | "ofType": { 925 | "kind": "SCALAR", 926 | "name": "Boolean", 927 | "ofType": null 928 | } 929 | }, 930 | "isDeprecated": true, 931 | "deprecationReason": "Use `locations`." 932 | }, 933 | { 934 | "name": "onField", 935 | "description": null, 936 | "args": [], 937 | "type": { 938 | "kind": "NON_NULL", 939 | "name": null, 940 | "ofType": { 941 | "kind": "SCALAR", 942 | "name": "Boolean", 943 | "ofType": null 944 | } 945 | }, 946 | "isDeprecated": true, 947 | "deprecationReason": "Use `locations`." 948 | } 949 | ], 950 | "inputFields": null, 951 | "interfaces": [], 952 | "enumValues": null, 953 | "possibleTypes": null 954 | }, 955 | { 956 | "kind": "ENUM", 957 | "name": "__DirectiveLocation", 958 | "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", 959 | "fields": null, 960 | "inputFields": null, 961 | "interfaces": null, 962 | "enumValues": [ 963 | { 964 | "name": "QUERY", 965 | "description": "Location adjacent to a query operation.", 966 | "isDeprecated": false, 967 | "deprecationReason": null 968 | }, 969 | { 970 | "name": "MUTATION", 971 | "description": "Location adjacent to a mutation operation.", 972 | "isDeprecated": false, 973 | "deprecationReason": null 974 | }, 975 | { 976 | "name": "SUBSCRIPTION", 977 | "description": "Location adjacent to a subscription operation.", 978 | "isDeprecated": false, 979 | "deprecationReason": null 980 | }, 981 | { 982 | "name": "FIELD", 983 | "description": "Location adjacent to a field.", 984 | "isDeprecated": false, 985 | "deprecationReason": null 986 | }, 987 | { 988 | "name": "FRAGMENT_DEFINITION", 989 | "description": "Location adjacent to a fragment definition.", 990 | "isDeprecated": false, 991 | "deprecationReason": null 992 | }, 993 | { 994 | "name": "FRAGMENT_SPREAD", 995 | "description": "Location adjacent to a fragment spread.", 996 | "isDeprecated": false, 997 | "deprecationReason": null 998 | }, 999 | { 1000 | "name": "INLINE_FRAGMENT", 1001 | "description": "Location adjacent to an inline fragment.", 1002 | "isDeprecated": false, 1003 | "deprecationReason": null 1004 | }, 1005 | { 1006 | "name": "SCHEMA", 1007 | "description": "Location adjacent to a schema definition.", 1008 | "isDeprecated": false, 1009 | "deprecationReason": null 1010 | }, 1011 | { 1012 | "name": "SCALAR", 1013 | "description": "Location adjacent to a scalar definition.", 1014 | "isDeprecated": false, 1015 | "deprecationReason": null 1016 | }, 1017 | { 1018 | "name": "OBJECT", 1019 | "description": "Location adjacent to an object type definition.", 1020 | "isDeprecated": false, 1021 | "deprecationReason": null 1022 | }, 1023 | { 1024 | "name": "FIELD_DEFINITION", 1025 | "description": "Location adjacent to a field definition.", 1026 | "isDeprecated": false, 1027 | "deprecationReason": null 1028 | }, 1029 | { 1030 | "name": "ARGUMENT_DEFINITION", 1031 | "description": "Location adjacent to an argument definition.", 1032 | "isDeprecated": false, 1033 | "deprecationReason": null 1034 | }, 1035 | { 1036 | "name": "INTERFACE", 1037 | "description": "Location adjacent to an interface definition.", 1038 | "isDeprecated": false, 1039 | "deprecationReason": null 1040 | }, 1041 | { 1042 | "name": "UNION", 1043 | "description": "Location adjacent to a union definition.", 1044 | "isDeprecated": false, 1045 | "deprecationReason": null 1046 | }, 1047 | { 1048 | "name": "ENUM", 1049 | "description": "Location adjacent to an enum definition.", 1050 | "isDeprecated": false, 1051 | "deprecationReason": null 1052 | }, 1053 | { 1054 | "name": "ENUM_VALUE", 1055 | "description": "Location adjacent to an enum value definition.", 1056 | "isDeprecated": false, 1057 | "deprecationReason": null 1058 | }, 1059 | { 1060 | "name": "INPUT_OBJECT", 1061 | "description": "Location adjacent to an input object type definition.", 1062 | "isDeprecated": false, 1063 | "deprecationReason": null 1064 | }, 1065 | { 1066 | "name": "INPUT_FIELD_DEFINITION", 1067 | "description": "Location adjacent to an input object field definition.", 1068 | "isDeprecated": false, 1069 | "deprecationReason": null 1070 | } 1071 | ], 1072 | "possibleTypes": null 1073 | } 1074 | ], 1075 | "directives": [ 1076 | { 1077 | "name": "include", 1078 | "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", 1079 | "locations": [ 1080 | "FIELD", 1081 | "FRAGMENT_SPREAD", 1082 | "INLINE_FRAGMENT" 1083 | ], 1084 | "args": [ 1085 | { 1086 | "name": "if", 1087 | "description": "Included when true.", 1088 | "type": { 1089 | "kind": "NON_NULL", 1090 | "name": null, 1091 | "ofType": { 1092 | "kind": "SCALAR", 1093 | "name": "Boolean", 1094 | "ofType": null 1095 | } 1096 | }, 1097 | "defaultValue": null 1098 | } 1099 | ] 1100 | }, 1101 | { 1102 | "name": "skip", 1103 | "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", 1104 | "locations": [ 1105 | "FIELD", 1106 | "FRAGMENT_SPREAD", 1107 | "INLINE_FRAGMENT" 1108 | ], 1109 | "args": [ 1110 | { 1111 | "name": "if", 1112 | "description": "Skipped when true.", 1113 | "type": { 1114 | "kind": "NON_NULL", 1115 | "name": null, 1116 | "ofType": { 1117 | "kind": "SCALAR", 1118 | "name": "Boolean", 1119 | "ofType": null 1120 | } 1121 | }, 1122 | "defaultValue": null 1123 | } 1124 | ] 1125 | }, 1126 | { 1127 | "name": "deprecated", 1128 | "description": "Marks an element of a GraphQL schema as no longer supported.", 1129 | "locations": [ 1130 | "FIELD_DEFINITION", 1131 | "ENUM_VALUE" 1132 | ], 1133 | "args": [ 1134 | { 1135 | "name": "reason", 1136 | "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).", 1137 | "type": { 1138 | "kind": "SCALAR", 1139 | "name": "String", 1140 | "ofType": null 1141 | }, 1142 | "defaultValue": "\"No longer supported\"" 1143 | } 1144 | ] 1145 | } 1146 | ] 1147 | } 1148 | } 1149 | } --------------------------------------------------------------------------------