├── .gitignore ├── .babelrc ├── js ├── routes │ └── AppHomeRoute.js ├── app.js └── components │ └── App.js ├── webpack.config.js ├── public └── index.html ├── README.md ├── scripts └── updateSchema.js ├── DOCUMENTATION.md ├── data ├── database.js ├── schema.js └── schema.json ├── package.json ├── LICENSE ├── PATENTS └── server.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | npm-debug.log 4 | data/schema.graphql 5 | .idea/ 6 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "es2015", 4 | "stage-0", 5 | "react" 6 | ], 7 | "plugins": [ 8 | "./build/babelRelayPlugin" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /js/routes/AppHomeRoute.js: -------------------------------------------------------------------------------- 1 | import Relay from 'react-relay'; 2 | 3 | export default class extends Relay.Route { 4 | static queries = { 5 | viewer: () => Relay.QL` 6 | query { 7 | viewer 8 | } 9 | `, 10 | }; 11 | static routeName = 'AppHomeRoute'; 12 | } 13 | -------------------------------------------------------------------------------- /js/app.js: -------------------------------------------------------------------------------- 1 | import 'babel-polyfill'; 2 | 3 | import App from './components/App'; 4 | import AppHomeRoute from './routes/AppHomeRoute'; 5 | import React from 'react'; 6 | import ReactDOM from 'react-dom'; 7 | import Relay from 'react-relay'; 8 | 9 | ReactDOM.render( 10 | , 15 | document.getElementById('root') 16 | ); 17 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | import path from 'path'; 2 | import webpack from 'webpack'; 3 | 4 | const config = { 5 | entry: path.resolve(__dirname, 'js', 'app.js'), 6 | resolve: { 7 | modules: [ 8 | 'node_modules', 9 | path.resolve(__dirname, 'js'), 10 | ] 11 | }, 12 | module: { 13 | rules: [ 14 | { 15 | exclude: /node_modules/, 16 | loader: 'babel-loader', 17 | test: /\.js$/ 18 | } 19 | ] 20 | }, 21 | output: { 22 | filename: 'app.js', 23 | path: '/', 24 | publicPath: '/js/' 25 | } 26 | }; 27 | 28 | module.exports = config; 29 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Relay • Starter Kit 7 | 8 | 9 |
10 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /js/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Relay from 'react-relay'; 3 | 4 | class App extends React.Component { 5 | render() { 6 | return ( 7 |
8 |

Widget list

9 | 14 |
15 | ); 16 | } 17 | } 18 | 19 | export default Relay.createContainer(App, { 20 | fragments: { 21 | viewer: () => Relay.QL` 22 | fragment on User { 23 | widgets(first: 10) { 24 | edges { 25 | node { 26 | id, 27 | name, 28 | }, 29 | }, 30 | }, 31 | } 32 | `, 33 | }, 34 | }); 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DEPRECATED 2 | 3 | ## This repo is no longer actively maintained. 4 | 5 | This repo provided a basic starting point for building a "Relay Classic" (that is, Relay prior to version 1.0.0) application. All future development work is being undertaken on "Relay Modern" (version 1.0.0 and above). 6 | 7 | The contents of this repo are being conserved for historical interest only, but we don't have any plans to update the code. If you'd like to get started with building a Relay Modern application, please see the link below. PRs to improve the documentation for the onboarding experience are welcome. 8 | 9 | ## Links 10 | 11 | - [Relay Modern documentation](https://facebook.github.io/relay/docs/relay-modern.html). 12 | - [Relay Modern examples](https://github.com/relayjs/relay-examples). 13 | - Original README.md file for this repo, now named [DOCUMENTATION.md](./DOCUMENTATION.md). 14 | -------------------------------------------------------------------------------- /scripts/updateSchema.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env babel-node --optional es7.asyncFunctions 2 | 3 | import fs from 'fs'; 4 | import path from 'path'; 5 | import { Schema } from '../data/schema'; 6 | import { graphql } from 'graphql'; 7 | import { introspectionQuery, printSchema } from 'graphql/utilities'; 8 | 9 | // Save JSON of full schema introspection for Babel Relay Plugin to use 10 | (async () => { 11 | var result = await (graphql(Schema, introspectionQuery)); 12 | if (result.errors) { 13 | console.error( 14 | 'ERROR introspecting schema: ', 15 | JSON.stringify(result.errors, null, 2) 16 | ); 17 | } else { 18 | fs.writeFileSync( 19 | path.join(__dirname, '../data/schema.json'), 20 | JSON.stringify(result, null, 2) 21 | ); 22 | } 23 | })(); 24 | 25 | // Save user readable type system shorthand of schema 26 | fs.writeFileSync( 27 | path.join(__dirname, '../data/schema.graphql'), 28 | printSchema(Schema) 29 | ); 30 | -------------------------------------------------------------------------------- /DOCUMENTATION.md: -------------------------------------------------------------------------------- 1 | # Relay Starter Kit 2 | 3 | This kit includes an app server, a GraphQL server implementing a tiny example schema, and a transpiler that you can use to get started building an app with Relay. For a walkthrough with a slightly larger schema, see the [Relay tutorial](https://facebook.github.io/relay/docs/tutorial.html). 4 | 5 | ## Installation 6 | 7 | ``` 8 | npm install 9 | ``` 10 | 11 | ## Running 12 | 13 | Start a local server: 14 | 15 | ``` 16 | npm start 17 | ``` 18 | 19 | ## Developing 20 | 21 | Any changes you make to files in the `js/` directory will cause the server to 22 | automatically rebuild the app and refresh your browser. 23 | 24 | If at any time you make changes to `data/schema.js`, stop the server, 25 | regenerate `data/schema.json`, and restart the server: 26 | 27 | ``` 28 | npm run update-schema 29 | npm start 30 | ``` 31 | 32 | ## License 33 | 34 | Relay Starter Kit is [BSD licensed](./LICENSE). We also provide an additional [patent grant](./PATENTS). 35 | -------------------------------------------------------------------------------- /data/database.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | // Model types 11 | class User {} 12 | class Widget {} 13 | 14 | // Mock data 15 | var viewer = new User(); 16 | viewer.id = '1'; 17 | viewer.name = 'Anonymous'; 18 | var widgets = ['What\'s-it', 'Who\'s-it', 'How\'s-it'].map((name, i) => { 19 | var widget = new Widget(); 20 | widget.name = name; 21 | widget.id = `${i}`; 22 | return widget; 23 | }); 24 | 25 | module.exports = { 26 | // Export methods that your schema can use to interact with your database 27 | getUser: (id) => id === viewer.id ? viewer : null, 28 | getViewer: () => viewer, 29 | getWidget: (id) => widgets.find(w => w.id === id), 30 | getWidgets: () => widgets, 31 | User, 32 | Widget, 33 | }; 34 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "relay-starter-kit", 3 | "private": true, 4 | "description": "A quick way to get up and running with Relay", 5 | "repository": "facebook/relay-starter-kit", 6 | "version": "0.1.0", 7 | "scripts": { 8 | "start": "babel-node ./server.js", 9 | "update-schema": "babel-node ./scripts/updateSchema.js" 10 | }, 11 | "dependencies": { 12 | "babel-core": "^6.14.0", 13 | "babel-loader": "^6.2.5", 14 | "babel-polyfill": "^6.13.0", 15 | "babel-preset-es2015": "^6.14.0", 16 | "babel-preset-react": "^6.11.1", 17 | "babel-preset-stage-0": "^6.5.0", 18 | "babel-relay-plugin": "0.9.3", 19 | "chokidar": "1.6.0", 20 | "classnames": "2.2.5", 21 | "express": "4.14.0", 22 | "express-graphql": "0.5.4", 23 | "graphql": "0.7.0", 24 | "graphql-relay": "0.4.3", 25 | "react": "^15.3.1", 26 | "react-dom": "^15.3.1", 27 | "react-relay": "0.9.3", 28 | "require-clean": "0.1.3", 29 | "webpack": "2.5.1", 30 | "webpack-dev-server": "2.4.5" 31 | }, 32 | "devDependencies": { 33 | "babel-cli": "^6.14.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD License 2 | 3 | For Relay Starter Kit software 4 | 5 | Copyright (c) 2013-2015, Facebook, Inc. 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, this 12 | list of conditions and the following disclaimer. 13 | 14 | * Redistributions in binary form must reproduce the above copyright notice, 15 | this list of conditions and the following disclaimer in the documentation 16 | and/or other materials provided with the distribution. 17 | 18 | * Neither the name Facebook nor the names of its contributors may be used to 19 | endorse or promote products derived from this software without specific 20 | prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 23 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 24 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 26 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 29 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /PATENTS: -------------------------------------------------------------------------------- 1 | Additional Grant of Patent Rights Version 2 2 | 3 | "Software" means the Relay Starter Kit software distributed by Facebook, Inc. 4 | 5 | Facebook, Inc. ("Facebook") hereby grants to each recipient of the Software 6 | ("you") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable 7 | (subject to the termination provision below) license under any Necessary 8 | Claims, to make, have made, use, sell, offer to sell, import, and otherwise 9 | transfer the Software. For avoidance of doubt, no license is granted under 10 | Facebook's rights in any patent claims that are infringed by (i) modifications 11 | to the Software made by you or any third party or (ii) the Software in 12 | combination with any software or other technology. 13 | 14 | The license granted hereunder will terminate, automatically and without notice, 15 | if you (or any of your subsidiaries, corporate affiliates or agents) initiate 16 | directly or indirectly, or take a direct financial interest in, any Patent 17 | Assertion: (i) against Facebook or any of its subsidiaries or corporate 18 | affiliates, (ii) against any party if such Patent Assertion arises in whole or 19 | in part from any software, technology, product or service of Facebook or any of 20 | its subsidiaries or corporate affiliates, or (iii) against any party relating 21 | to the Software. Notwithstanding the foregoing, if Facebook or any of its 22 | subsidiaries or corporate affiliates files a lawsuit alleging patent 23 | infringement against you in the first instance, and you respond by filing a 24 | patent infringement counterclaim in that lawsuit against that party that is 25 | unrelated to the Software, the license granted hereunder will not terminate 26 | under section (i) of this paragraph due to such counterclaim. 27 | 28 | A "Necessary Claim" is a claim of a patent owned by Facebook that is 29 | necessarily infringed by the Software standing alone. 30 | 31 | A "Patent Assertion" is any lawsuit or other action alleging direct, indirect, 32 | or contributory infringement or inducement to infringe any patent, including a 33 | cross-claim or counterclaim. 34 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | import chokidar from 'chokidar'; 2 | import express from 'express'; 3 | import graphQLHTTP from 'express-graphql'; 4 | import path from 'path'; 5 | import webpack from 'webpack'; 6 | import WebpackDevServer from 'webpack-dev-server'; 7 | import {clean} from 'require-clean'; 8 | import {exec} from 'child_process'; 9 | import config from './webpack.config'; 10 | 11 | const APP_PORT = 3000; 12 | const GRAPHQL_PORT = 8080; 13 | 14 | let graphQLServer; 15 | let appServer; 16 | 17 | function startAppServer(callback) { 18 | // Serve the Relay app 19 | const compiler = webpack(config); 20 | appServer = new WebpackDevServer(compiler, { 21 | contentBase: '/public/', 22 | proxy: {'/graphql': `http://localhost:${GRAPHQL_PORT}`}, 23 | publicPath: '/js/', 24 | stats: {colors: true} 25 | }); 26 | // Serve static resources 27 | appServer.use('/', express.static(path.resolve(__dirname, 'public'))); 28 | appServer.listen(APP_PORT, () => { 29 | console.log(`App is now running on http://localhost:${APP_PORT}`); 30 | if (callback) { 31 | callback(); 32 | } 33 | }); 34 | } 35 | 36 | function startGraphQLServer(callback) { 37 | // Expose a GraphQL endpoint 38 | clean('./data/schema'); 39 | const {Schema} = require('./data/schema'); 40 | const graphQLApp = express(); 41 | graphQLApp.use('/', graphQLHTTP({ 42 | graphiql: true, 43 | pretty: true, 44 | schema: Schema, 45 | })); 46 | graphQLServer = graphQLApp.listen(GRAPHQL_PORT, () => { 47 | console.log( 48 | `GraphQL server is now running on http://localhost:${GRAPHQL_PORT}` 49 | ); 50 | if (callback) { 51 | callback(); 52 | } 53 | }); 54 | } 55 | 56 | function startServers(callback) { 57 | // Shut down the servers 58 | if (appServer) { 59 | appServer.listeningApp.close(); 60 | } 61 | if (graphQLServer) { 62 | graphQLServer.close(); 63 | } 64 | 65 | // Compile the schema 66 | exec('npm run update-schema', (error, stdout) => { 67 | console.log(stdout); 68 | let doneTasks = 0; 69 | function handleTaskDone() { 70 | doneTasks++; 71 | if (doneTasks === 2 && callback) { 72 | callback(); 73 | } 74 | } 75 | startGraphQLServer(handleTaskDone); 76 | startAppServer(handleTaskDone); 77 | }); 78 | } 79 | const watcher = chokidar.watch('./data/{database,schema}.js'); 80 | watcher.on('change', path => { 81 | console.log(`\`${path}\` changed. Restarting.`); 82 | startServers(() => 83 | console.log('Restart your browser to use the updated schema.') 84 | ); 85 | }); 86 | startServers(); 87 | -------------------------------------------------------------------------------- /data/schema.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | import { 11 | GraphQLBoolean, 12 | GraphQLFloat, 13 | GraphQLID, 14 | GraphQLInt, 15 | GraphQLList, 16 | GraphQLNonNull, 17 | GraphQLObjectType, 18 | GraphQLSchema, 19 | GraphQLString, 20 | } from 'graphql'; 21 | 22 | import { 23 | connectionArgs, 24 | connectionDefinitions, 25 | connectionFromArray, 26 | fromGlobalId, 27 | globalIdField, 28 | mutationWithClientMutationId, 29 | nodeDefinitions, 30 | } from 'graphql-relay'; 31 | 32 | import { 33 | // Import methods that your schema can use to interact with your database 34 | User, 35 | Widget, 36 | getUser, 37 | getViewer, 38 | getWidget, 39 | getWidgets, 40 | } from './database'; 41 | 42 | /** 43 | * We get the node interface and field from the Relay library. 44 | * 45 | * The first method defines the way we resolve an ID to its object. 46 | * The second defines the way we resolve an object to its GraphQL type. 47 | */ 48 | var {nodeInterface, nodeField} = nodeDefinitions( 49 | (globalId) => { 50 | var {type, id} = fromGlobalId(globalId); 51 | if (type === 'User') { 52 | return getUser(id); 53 | } else if (type === 'Widget') { 54 | return getWidget(id); 55 | } else { 56 | return null; 57 | } 58 | }, 59 | (obj) => { 60 | if (obj instanceof User) { 61 | return userType; 62 | } else if (obj instanceof Widget) { 63 | return widgetType; 64 | } else { 65 | return null; 66 | } 67 | } 68 | ); 69 | 70 | /** 71 | * Define your own types here 72 | */ 73 | 74 | var userType = new GraphQLObjectType({ 75 | name: 'User', 76 | description: 'A person who uses our app', 77 | fields: () => ({ 78 | id: globalIdField('User'), 79 | widgets: { 80 | type: widgetConnection, 81 | description: 'A person\'s collection of widgets', 82 | args: connectionArgs, 83 | resolve: (_, args) => connectionFromArray(getWidgets(), args), 84 | }, 85 | }), 86 | interfaces: [nodeInterface], 87 | }); 88 | 89 | var widgetType = new GraphQLObjectType({ 90 | name: 'Widget', 91 | description: 'A shiny widget', 92 | fields: () => ({ 93 | id: globalIdField('Widget'), 94 | name: { 95 | type: GraphQLString, 96 | description: 'The name of the widget', 97 | }, 98 | }), 99 | interfaces: [nodeInterface], 100 | }); 101 | 102 | /** 103 | * Define your own connection types here 104 | */ 105 | var {connectionType: widgetConnection} = 106 | connectionDefinitions({name: 'Widget', nodeType: widgetType}); 107 | 108 | /** 109 | * This is the type that will be the root of our query, 110 | * and the entry point into our schema. 111 | */ 112 | var queryType = new GraphQLObjectType({ 113 | name: 'Query', 114 | fields: () => ({ 115 | node: nodeField, 116 | // Add your own root fields here 117 | viewer: { 118 | type: userType, 119 | resolve: () => getViewer(), 120 | }, 121 | }), 122 | }); 123 | 124 | /** 125 | * This is the type that will be the root of our mutations, 126 | * and the entry point into performing writes in our schema. 127 | */ 128 | var mutationType = new GraphQLObjectType({ 129 | name: 'Mutation', 130 | fields: () => ({ 131 | // Add your own mutations here 132 | }) 133 | }); 134 | 135 | /** 136 | * Finally, we construct our schema (whose starting query type is the query 137 | * type we defined above) and export it. 138 | */ 139 | export var Schema = new GraphQLSchema({ 140 | query: queryType, 141 | // Uncomment the following after adding some mutation fields: 142 | // mutation: mutationType 143 | }); 144 | -------------------------------------------------------------------------------- /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": "node", 17 | "description": "Fetches an object given its ID", 18 | "args": [ 19 | { 20 | "name": "id", 21 | "description": "The ID of an object", 22 | "type": { 23 | "kind": "NON_NULL", 24 | "name": null, 25 | "ofType": { 26 | "kind": "SCALAR", 27 | "name": "ID", 28 | "ofType": null 29 | } 30 | }, 31 | "defaultValue": null 32 | } 33 | ], 34 | "type": { 35 | "kind": "INTERFACE", 36 | "name": "Node", 37 | "ofType": null 38 | }, 39 | "isDeprecated": false, 40 | "deprecationReason": null 41 | }, 42 | { 43 | "name": "viewer", 44 | "description": null, 45 | "args": [], 46 | "type": { 47 | "kind": "OBJECT", 48 | "name": "User", 49 | "ofType": null 50 | }, 51 | "isDeprecated": false, 52 | "deprecationReason": null 53 | } 54 | ], 55 | "inputFields": null, 56 | "interfaces": [], 57 | "enumValues": null, 58 | "possibleTypes": null 59 | }, 60 | { 61 | "kind": "SCALAR", 62 | "name": "ID", 63 | "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.", 64 | "fields": null, 65 | "inputFields": null, 66 | "interfaces": null, 67 | "enumValues": null, 68 | "possibleTypes": null 69 | }, 70 | { 71 | "kind": "INTERFACE", 72 | "name": "Node", 73 | "description": "An object with an ID", 74 | "fields": [ 75 | { 76 | "name": "id", 77 | "description": "The id of the object.", 78 | "args": [], 79 | "type": { 80 | "kind": "NON_NULL", 81 | "name": null, 82 | "ofType": { 83 | "kind": "SCALAR", 84 | "name": "ID", 85 | "ofType": null 86 | } 87 | }, 88 | "isDeprecated": false, 89 | "deprecationReason": null 90 | } 91 | ], 92 | "inputFields": null, 93 | "interfaces": null, 94 | "enumValues": null, 95 | "possibleTypes": [ 96 | { 97 | "kind": "OBJECT", 98 | "name": "User", 99 | "ofType": null 100 | }, 101 | { 102 | "kind": "OBJECT", 103 | "name": "Widget", 104 | "ofType": null 105 | } 106 | ] 107 | }, 108 | { 109 | "kind": "OBJECT", 110 | "name": "User", 111 | "description": "A person who uses our app", 112 | "fields": [ 113 | { 114 | "name": "id", 115 | "description": "The ID of an object", 116 | "args": [], 117 | "type": { 118 | "kind": "NON_NULL", 119 | "name": null, 120 | "ofType": { 121 | "kind": "SCALAR", 122 | "name": "ID", 123 | "ofType": null 124 | } 125 | }, 126 | "isDeprecated": false, 127 | "deprecationReason": null 128 | }, 129 | { 130 | "name": "widgets", 131 | "description": "A person's collection of widgets", 132 | "args": [ 133 | { 134 | "name": "after", 135 | "description": null, 136 | "type": { 137 | "kind": "SCALAR", 138 | "name": "String", 139 | "ofType": null 140 | }, 141 | "defaultValue": null 142 | }, 143 | { 144 | "name": "first", 145 | "description": null, 146 | "type": { 147 | "kind": "SCALAR", 148 | "name": "Int", 149 | "ofType": null 150 | }, 151 | "defaultValue": null 152 | }, 153 | { 154 | "name": "before", 155 | "description": null, 156 | "type": { 157 | "kind": "SCALAR", 158 | "name": "String", 159 | "ofType": null 160 | }, 161 | "defaultValue": null 162 | }, 163 | { 164 | "name": "last", 165 | "description": null, 166 | "type": { 167 | "kind": "SCALAR", 168 | "name": "Int", 169 | "ofType": null 170 | }, 171 | "defaultValue": null 172 | } 173 | ], 174 | "type": { 175 | "kind": "OBJECT", 176 | "name": "WidgetConnection", 177 | "ofType": null 178 | }, 179 | "isDeprecated": false, 180 | "deprecationReason": null 181 | } 182 | ], 183 | "inputFields": null, 184 | "interfaces": [ 185 | { 186 | "kind": "INTERFACE", 187 | "name": "Node", 188 | "ofType": null 189 | } 190 | ], 191 | "enumValues": null, 192 | "possibleTypes": null 193 | }, 194 | { 195 | "kind": "SCALAR", 196 | "name": "String", 197 | "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.", 198 | "fields": null, 199 | "inputFields": null, 200 | "interfaces": null, 201 | "enumValues": null, 202 | "possibleTypes": null 203 | }, 204 | { 205 | "kind": "SCALAR", 206 | "name": "Int", 207 | "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ", 208 | "fields": null, 209 | "inputFields": null, 210 | "interfaces": null, 211 | "enumValues": null, 212 | "possibleTypes": null 213 | }, 214 | { 215 | "kind": "OBJECT", 216 | "name": "WidgetConnection", 217 | "description": "A connection to a list of items.", 218 | "fields": [ 219 | { 220 | "name": "pageInfo", 221 | "description": "Information to aid in pagination.", 222 | "args": [], 223 | "type": { 224 | "kind": "NON_NULL", 225 | "name": null, 226 | "ofType": { 227 | "kind": "OBJECT", 228 | "name": "PageInfo", 229 | "ofType": null 230 | } 231 | }, 232 | "isDeprecated": false, 233 | "deprecationReason": null 234 | }, 235 | { 236 | "name": "edges", 237 | "description": "A list of edges.", 238 | "args": [], 239 | "type": { 240 | "kind": "LIST", 241 | "name": null, 242 | "ofType": { 243 | "kind": "OBJECT", 244 | "name": "WidgetEdge", 245 | "ofType": null 246 | } 247 | }, 248 | "isDeprecated": false, 249 | "deprecationReason": null 250 | } 251 | ], 252 | "inputFields": null, 253 | "interfaces": [], 254 | "enumValues": null, 255 | "possibleTypes": null 256 | }, 257 | { 258 | "kind": "OBJECT", 259 | "name": "PageInfo", 260 | "description": "Information about pagination in a connection.", 261 | "fields": [ 262 | { 263 | "name": "hasNextPage", 264 | "description": "When paginating forwards, are there more items?", 265 | "args": [], 266 | "type": { 267 | "kind": "NON_NULL", 268 | "name": null, 269 | "ofType": { 270 | "kind": "SCALAR", 271 | "name": "Boolean", 272 | "ofType": null 273 | } 274 | }, 275 | "isDeprecated": false, 276 | "deprecationReason": null 277 | }, 278 | { 279 | "name": "hasPreviousPage", 280 | "description": "When paginating backwards, are there more items?", 281 | "args": [], 282 | "type": { 283 | "kind": "NON_NULL", 284 | "name": null, 285 | "ofType": { 286 | "kind": "SCALAR", 287 | "name": "Boolean", 288 | "ofType": null 289 | } 290 | }, 291 | "isDeprecated": false, 292 | "deprecationReason": null 293 | }, 294 | { 295 | "name": "startCursor", 296 | "description": "When paginating backwards, the cursor to continue.", 297 | "args": [], 298 | "type": { 299 | "kind": "SCALAR", 300 | "name": "String", 301 | "ofType": null 302 | }, 303 | "isDeprecated": false, 304 | "deprecationReason": null 305 | }, 306 | { 307 | "name": "endCursor", 308 | "description": "When paginating forwards, the cursor to continue.", 309 | "args": [], 310 | "type": { 311 | "kind": "SCALAR", 312 | "name": "String", 313 | "ofType": null 314 | }, 315 | "isDeprecated": false, 316 | "deprecationReason": null 317 | } 318 | ], 319 | "inputFields": null, 320 | "interfaces": [], 321 | "enumValues": null, 322 | "possibleTypes": null 323 | }, 324 | { 325 | "kind": "SCALAR", 326 | "name": "Boolean", 327 | "description": "The `Boolean` scalar type represents `true` or `false`.", 328 | "fields": null, 329 | "inputFields": null, 330 | "interfaces": null, 331 | "enumValues": null, 332 | "possibleTypes": null 333 | }, 334 | { 335 | "kind": "OBJECT", 336 | "name": "WidgetEdge", 337 | "description": "An edge in a connection.", 338 | "fields": [ 339 | { 340 | "name": "node", 341 | "description": "The item at the end of the edge", 342 | "args": [], 343 | "type": { 344 | "kind": "OBJECT", 345 | "name": "Widget", 346 | "ofType": null 347 | }, 348 | "isDeprecated": false, 349 | "deprecationReason": null 350 | }, 351 | { 352 | "name": "cursor", 353 | "description": "A cursor for use in pagination", 354 | "args": [], 355 | "type": { 356 | "kind": "NON_NULL", 357 | "name": null, 358 | "ofType": { 359 | "kind": "SCALAR", 360 | "name": "String", 361 | "ofType": null 362 | } 363 | }, 364 | "isDeprecated": false, 365 | "deprecationReason": null 366 | } 367 | ], 368 | "inputFields": null, 369 | "interfaces": [], 370 | "enumValues": null, 371 | "possibleTypes": null 372 | }, 373 | { 374 | "kind": "OBJECT", 375 | "name": "Widget", 376 | "description": "A shiny widget", 377 | "fields": [ 378 | { 379 | "name": "id", 380 | "description": "The ID of an object", 381 | "args": [], 382 | "type": { 383 | "kind": "NON_NULL", 384 | "name": null, 385 | "ofType": { 386 | "kind": "SCALAR", 387 | "name": "ID", 388 | "ofType": null 389 | } 390 | }, 391 | "isDeprecated": false, 392 | "deprecationReason": null 393 | }, 394 | { 395 | "name": "name", 396 | "description": "The name of the widget", 397 | "args": [], 398 | "type": { 399 | "kind": "SCALAR", 400 | "name": "String", 401 | "ofType": null 402 | }, 403 | "isDeprecated": false, 404 | "deprecationReason": null 405 | } 406 | ], 407 | "inputFields": null, 408 | "interfaces": [ 409 | { 410 | "kind": "INTERFACE", 411 | "name": "Node", 412 | "ofType": null 413 | } 414 | ], 415 | "enumValues": null, 416 | "possibleTypes": null 417 | }, 418 | { 419 | "kind": "OBJECT", 420 | "name": "__Schema", 421 | "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.", 422 | "fields": [ 423 | { 424 | "name": "types", 425 | "description": "A list of all types supported by this server.", 426 | "args": [], 427 | "type": { 428 | "kind": "NON_NULL", 429 | "name": null, 430 | "ofType": { 431 | "kind": "LIST", 432 | "name": null, 433 | "ofType": { 434 | "kind": "NON_NULL", 435 | "name": null, 436 | "ofType": { 437 | "kind": "OBJECT", 438 | "name": "__Type", 439 | "ofType": null 440 | } 441 | } 442 | } 443 | }, 444 | "isDeprecated": false, 445 | "deprecationReason": null 446 | }, 447 | { 448 | "name": "queryType", 449 | "description": "The type that query operations will be rooted at.", 450 | "args": [], 451 | "type": { 452 | "kind": "NON_NULL", 453 | "name": null, 454 | "ofType": { 455 | "kind": "OBJECT", 456 | "name": "__Type", 457 | "ofType": null 458 | } 459 | }, 460 | "isDeprecated": false, 461 | "deprecationReason": null 462 | }, 463 | { 464 | "name": "mutationType", 465 | "description": "If this server supports mutation, the type that mutation operations will be rooted at.", 466 | "args": [], 467 | "type": { 468 | "kind": "OBJECT", 469 | "name": "__Type", 470 | "ofType": null 471 | }, 472 | "isDeprecated": false, 473 | "deprecationReason": null 474 | }, 475 | { 476 | "name": "subscriptionType", 477 | "description": "If this server support subscription, the type that subscription operations will be rooted at.", 478 | "args": [], 479 | "type": { 480 | "kind": "OBJECT", 481 | "name": "__Type", 482 | "ofType": null 483 | }, 484 | "isDeprecated": false, 485 | "deprecationReason": null 486 | }, 487 | { 488 | "name": "directives", 489 | "description": "A list of all directives supported by this server.", 490 | "args": [], 491 | "type": { 492 | "kind": "NON_NULL", 493 | "name": null, 494 | "ofType": { 495 | "kind": "LIST", 496 | "name": null, 497 | "ofType": { 498 | "kind": "NON_NULL", 499 | "name": null, 500 | "ofType": { 501 | "kind": "OBJECT", 502 | "name": "__Directive", 503 | "ofType": null 504 | } 505 | } 506 | } 507 | }, 508 | "isDeprecated": false, 509 | "deprecationReason": null 510 | } 511 | ], 512 | "inputFields": null, 513 | "interfaces": [], 514 | "enumValues": null, 515 | "possibleTypes": null 516 | }, 517 | { 518 | "kind": "OBJECT", 519 | "name": "__Type", 520 | "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.", 521 | "fields": [ 522 | { 523 | "name": "kind", 524 | "description": null, 525 | "args": [], 526 | "type": { 527 | "kind": "NON_NULL", 528 | "name": null, 529 | "ofType": { 530 | "kind": "ENUM", 531 | "name": "__TypeKind", 532 | "ofType": null 533 | } 534 | }, 535 | "isDeprecated": false, 536 | "deprecationReason": null 537 | }, 538 | { 539 | "name": "name", 540 | "description": null, 541 | "args": [], 542 | "type": { 543 | "kind": "SCALAR", 544 | "name": "String", 545 | "ofType": null 546 | }, 547 | "isDeprecated": false, 548 | "deprecationReason": null 549 | }, 550 | { 551 | "name": "description", 552 | "description": null, 553 | "args": [], 554 | "type": { 555 | "kind": "SCALAR", 556 | "name": "String", 557 | "ofType": null 558 | }, 559 | "isDeprecated": false, 560 | "deprecationReason": null 561 | }, 562 | { 563 | "name": "fields", 564 | "description": null, 565 | "args": [ 566 | { 567 | "name": "includeDeprecated", 568 | "description": null, 569 | "type": { 570 | "kind": "SCALAR", 571 | "name": "Boolean", 572 | "ofType": null 573 | }, 574 | "defaultValue": "false" 575 | } 576 | ], 577 | "type": { 578 | "kind": "LIST", 579 | "name": null, 580 | "ofType": { 581 | "kind": "NON_NULL", 582 | "name": null, 583 | "ofType": { 584 | "kind": "OBJECT", 585 | "name": "__Field", 586 | "ofType": null 587 | } 588 | } 589 | }, 590 | "isDeprecated": false, 591 | "deprecationReason": null 592 | }, 593 | { 594 | "name": "interfaces", 595 | "description": null, 596 | "args": [], 597 | "type": { 598 | "kind": "LIST", 599 | "name": null, 600 | "ofType": { 601 | "kind": "NON_NULL", 602 | "name": null, 603 | "ofType": { 604 | "kind": "OBJECT", 605 | "name": "__Type", 606 | "ofType": null 607 | } 608 | } 609 | }, 610 | "isDeprecated": false, 611 | "deprecationReason": null 612 | }, 613 | { 614 | "name": "possibleTypes", 615 | "description": null, 616 | "args": [], 617 | "type": { 618 | "kind": "LIST", 619 | "name": null, 620 | "ofType": { 621 | "kind": "NON_NULL", 622 | "name": null, 623 | "ofType": { 624 | "kind": "OBJECT", 625 | "name": "__Type", 626 | "ofType": null 627 | } 628 | } 629 | }, 630 | "isDeprecated": false, 631 | "deprecationReason": null 632 | }, 633 | { 634 | "name": "enumValues", 635 | "description": null, 636 | "args": [ 637 | { 638 | "name": "includeDeprecated", 639 | "description": null, 640 | "type": { 641 | "kind": "SCALAR", 642 | "name": "Boolean", 643 | "ofType": null 644 | }, 645 | "defaultValue": "false" 646 | } 647 | ], 648 | "type": { 649 | "kind": "LIST", 650 | "name": null, 651 | "ofType": { 652 | "kind": "NON_NULL", 653 | "name": null, 654 | "ofType": { 655 | "kind": "OBJECT", 656 | "name": "__EnumValue", 657 | "ofType": null 658 | } 659 | } 660 | }, 661 | "isDeprecated": false, 662 | "deprecationReason": null 663 | }, 664 | { 665 | "name": "inputFields", 666 | "description": null, 667 | "args": [], 668 | "type": { 669 | "kind": "LIST", 670 | "name": null, 671 | "ofType": { 672 | "kind": "NON_NULL", 673 | "name": null, 674 | "ofType": { 675 | "kind": "OBJECT", 676 | "name": "__InputValue", 677 | "ofType": null 678 | } 679 | } 680 | }, 681 | "isDeprecated": false, 682 | "deprecationReason": null 683 | }, 684 | { 685 | "name": "ofType", 686 | "description": null, 687 | "args": [], 688 | "type": { 689 | "kind": "OBJECT", 690 | "name": "__Type", 691 | "ofType": null 692 | }, 693 | "isDeprecated": false, 694 | "deprecationReason": null 695 | } 696 | ], 697 | "inputFields": null, 698 | "interfaces": [], 699 | "enumValues": null, 700 | "possibleTypes": null 701 | }, 702 | { 703 | "kind": "ENUM", 704 | "name": "__TypeKind", 705 | "description": "An enum describing what kind of type a given `__Type` is.", 706 | "fields": null, 707 | "inputFields": null, 708 | "interfaces": null, 709 | "enumValues": [ 710 | { 711 | "name": "SCALAR", 712 | "description": "Indicates this type is a scalar.", 713 | "isDeprecated": false, 714 | "deprecationReason": null 715 | }, 716 | { 717 | "name": "OBJECT", 718 | "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", 719 | "isDeprecated": false, 720 | "deprecationReason": null 721 | }, 722 | { 723 | "name": "INTERFACE", 724 | "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", 725 | "isDeprecated": false, 726 | "deprecationReason": null 727 | }, 728 | { 729 | "name": "UNION", 730 | "description": "Indicates this type is a union. `possibleTypes` is a valid field.", 731 | "isDeprecated": false, 732 | "deprecationReason": null 733 | }, 734 | { 735 | "name": "ENUM", 736 | "description": "Indicates this type is an enum. `enumValues` is a valid field.", 737 | "isDeprecated": false, 738 | "deprecationReason": null 739 | }, 740 | { 741 | "name": "INPUT_OBJECT", 742 | "description": "Indicates this type is an input object. `inputFields` is a valid field.", 743 | "isDeprecated": false, 744 | "deprecationReason": null 745 | }, 746 | { 747 | "name": "LIST", 748 | "description": "Indicates this type is a list. `ofType` is a valid field.", 749 | "isDeprecated": false, 750 | "deprecationReason": null 751 | }, 752 | { 753 | "name": "NON_NULL", 754 | "description": "Indicates this type is a non-null. `ofType` is a valid field.", 755 | "isDeprecated": false, 756 | "deprecationReason": null 757 | } 758 | ], 759 | "possibleTypes": null 760 | }, 761 | { 762 | "kind": "OBJECT", 763 | "name": "__Field", 764 | "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.", 765 | "fields": [ 766 | { 767 | "name": "name", 768 | "description": null, 769 | "args": [], 770 | "type": { 771 | "kind": "NON_NULL", 772 | "name": null, 773 | "ofType": { 774 | "kind": "SCALAR", 775 | "name": "String", 776 | "ofType": null 777 | } 778 | }, 779 | "isDeprecated": false, 780 | "deprecationReason": null 781 | }, 782 | { 783 | "name": "description", 784 | "description": null, 785 | "args": [], 786 | "type": { 787 | "kind": "SCALAR", 788 | "name": "String", 789 | "ofType": null 790 | }, 791 | "isDeprecated": false, 792 | "deprecationReason": null 793 | }, 794 | { 795 | "name": "args", 796 | "description": null, 797 | "args": [], 798 | "type": { 799 | "kind": "NON_NULL", 800 | "name": null, 801 | "ofType": { 802 | "kind": "LIST", 803 | "name": null, 804 | "ofType": { 805 | "kind": "NON_NULL", 806 | "name": null, 807 | "ofType": { 808 | "kind": "OBJECT", 809 | "name": "__InputValue", 810 | "ofType": null 811 | } 812 | } 813 | } 814 | }, 815 | "isDeprecated": false, 816 | "deprecationReason": null 817 | }, 818 | { 819 | "name": "type", 820 | "description": null, 821 | "args": [], 822 | "type": { 823 | "kind": "NON_NULL", 824 | "name": null, 825 | "ofType": { 826 | "kind": "OBJECT", 827 | "name": "__Type", 828 | "ofType": null 829 | } 830 | }, 831 | "isDeprecated": false, 832 | "deprecationReason": null 833 | }, 834 | { 835 | "name": "isDeprecated", 836 | "description": null, 837 | "args": [], 838 | "type": { 839 | "kind": "NON_NULL", 840 | "name": null, 841 | "ofType": { 842 | "kind": "SCALAR", 843 | "name": "Boolean", 844 | "ofType": null 845 | } 846 | }, 847 | "isDeprecated": false, 848 | "deprecationReason": null 849 | }, 850 | { 851 | "name": "deprecationReason", 852 | "description": null, 853 | "args": [], 854 | "type": { 855 | "kind": "SCALAR", 856 | "name": "String", 857 | "ofType": null 858 | }, 859 | "isDeprecated": false, 860 | "deprecationReason": null 861 | } 862 | ], 863 | "inputFields": null, 864 | "interfaces": [], 865 | "enumValues": null, 866 | "possibleTypes": null 867 | }, 868 | { 869 | "kind": "OBJECT", 870 | "name": "__InputValue", 871 | "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.", 872 | "fields": [ 873 | { 874 | "name": "name", 875 | "description": null, 876 | "args": [], 877 | "type": { 878 | "kind": "NON_NULL", 879 | "name": null, 880 | "ofType": { 881 | "kind": "SCALAR", 882 | "name": "String", 883 | "ofType": null 884 | } 885 | }, 886 | "isDeprecated": false, 887 | "deprecationReason": null 888 | }, 889 | { 890 | "name": "description", 891 | "description": null, 892 | "args": [], 893 | "type": { 894 | "kind": "SCALAR", 895 | "name": "String", 896 | "ofType": null 897 | }, 898 | "isDeprecated": false, 899 | "deprecationReason": null 900 | }, 901 | { 902 | "name": "type", 903 | "description": null, 904 | "args": [], 905 | "type": { 906 | "kind": "NON_NULL", 907 | "name": null, 908 | "ofType": { 909 | "kind": "OBJECT", 910 | "name": "__Type", 911 | "ofType": null 912 | } 913 | }, 914 | "isDeprecated": false, 915 | "deprecationReason": null 916 | }, 917 | { 918 | "name": "defaultValue", 919 | "description": "A GraphQL-formatted string representing the default value for this input value.", 920 | "args": [], 921 | "type": { 922 | "kind": "SCALAR", 923 | "name": "String", 924 | "ofType": null 925 | }, 926 | "isDeprecated": false, 927 | "deprecationReason": null 928 | } 929 | ], 930 | "inputFields": null, 931 | "interfaces": [], 932 | "enumValues": null, 933 | "possibleTypes": null 934 | }, 935 | { 936 | "kind": "OBJECT", 937 | "name": "__EnumValue", 938 | "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.", 939 | "fields": [ 940 | { 941 | "name": "name", 942 | "description": null, 943 | "args": [], 944 | "type": { 945 | "kind": "NON_NULL", 946 | "name": null, 947 | "ofType": { 948 | "kind": "SCALAR", 949 | "name": "String", 950 | "ofType": null 951 | } 952 | }, 953 | "isDeprecated": false, 954 | "deprecationReason": null 955 | }, 956 | { 957 | "name": "description", 958 | "description": null, 959 | "args": [], 960 | "type": { 961 | "kind": "SCALAR", 962 | "name": "String", 963 | "ofType": null 964 | }, 965 | "isDeprecated": false, 966 | "deprecationReason": null 967 | }, 968 | { 969 | "name": "isDeprecated", 970 | "description": null, 971 | "args": [], 972 | "type": { 973 | "kind": "NON_NULL", 974 | "name": null, 975 | "ofType": { 976 | "kind": "SCALAR", 977 | "name": "Boolean", 978 | "ofType": null 979 | } 980 | }, 981 | "isDeprecated": false, 982 | "deprecationReason": null 983 | }, 984 | { 985 | "name": "deprecationReason", 986 | "description": null, 987 | "args": [], 988 | "type": { 989 | "kind": "SCALAR", 990 | "name": "String", 991 | "ofType": null 992 | }, 993 | "isDeprecated": false, 994 | "deprecationReason": null 995 | } 996 | ], 997 | "inputFields": null, 998 | "interfaces": [], 999 | "enumValues": null, 1000 | "possibleTypes": null 1001 | }, 1002 | { 1003 | "kind": "OBJECT", 1004 | "name": "__Directive", 1005 | "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.", 1006 | "fields": [ 1007 | { 1008 | "name": "name", 1009 | "description": null, 1010 | "args": [], 1011 | "type": { 1012 | "kind": "NON_NULL", 1013 | "name": null, 1014 | "ofType": { 1015 | "kind": "SCALAR", 1016 | "name": "String", 1017 | "ofType": null 1018 | } 1019 | }, 1020 | "isDeprecated": false, 1021 | "deprecationReason": null 1022 | }, 1023 | { 1024 | "name": "description", 1025 | "description": null, 1026 | "args": [], 1027 | "type": { 1028 | "kind": "SCALAR", 1029 | "name": "String", 1030 | "ofType": null 1031 | }, 1032 | "isDeprecated": false, 1033 | "deprecationReason": null 1034 | }, 1035 | { 1036 | "name": "locations", 1037 | "description": null, 1038 | "args": [], 1039 | "type": { 1040 | "kind": "NON_NULL", 1041 | "name": null, 1042 | "ofType": { 1043 | "kind": "LIST", 1044 | "name": null, 1045 | "ofType": { 1046 | "kind": "NON_NULL", 1047 | "name": null, 1048 | "ofType": { 1049 | "kind": "ENUM", 1050 | "name": "__DirectiveLocation", 1051 | "ofType": null 1052 | } 1053 | } 1054 | } 1055 | }, 1056 | "isDeprecated": false, 1057 | "deprecationReason": null 1058 | }, 1059 | { 1060 | "name": "args", 1061 | "description": null, 1062 | "args": [], 1063 | "type": { 1064 | "kind": "NON_NULL", 1065 | "name": null, 1066 | "ofType": { 1067 | "kind": "LIST", 1068 | "name": null, 1069 | "ofType": { 1070 | "kind": "NON_NULL", 1071 | "name": null, 1072 | "ofType": { 1073 | "kind": "OBJECT", 1074 | "name": "__InputValue", 1075 | "ofType": null 1076 | } 1077 | } 1078 | } 1079 | }, 1080 | "isDeprecated": false, 1081 | "deprecationReason": null 1082 | }, 1083 | { 1084 | "name": "onOperation", 1085 | "description": null, 1086 | "args": [], 1087 | "type": { 1088 | "kind": "NON_NULL", 1089 | "name": null, 1090 | "ofType": { 1091 | "kind": "SCALAR", 1092 | "name": "Boolean", 1093 | "ofType": null 1094 | } 1095 | }, 1096 | "isDeprecated": true, 1097 | "deprecationReason": "Use `locations`." 1098 | }, 1099 | { 1100 | "name": "onFragment", 1101 | "description": null, 1102 | "args": [], 1103 | "type": { 1104 | "kind": "NON_NULL", 1105 | "name": null, 1106 | "ofType": { 1107 | "kind": "SCALAR", 1108 | "name": "Boolean", 1109 | "ofType": null 1110 | } 1111 | }, 1112 | "isDeprecated": true, 1113 | "deprecationReason": "Use `locations`." 1114 | }, 1115 | { 1116 | "name": "onField", 1117 | "description": null, 1118 | "args": [], 1119 | "type": { 1120 | "kind": "NON_NULL", 1121 | "name": null, 1122 | "ofType": { 1123 | "kind": "SCALAR", 1124 | "name": "Boolean", 1125 | "ofType": null 1126 | } 1127 | }, 1128 | "isDeprecated": true, 1129 | "deprecationReason": "Use `locations`." 1130 | } 1131 | ], 1132 | "inputFields": null, 1133 | "interfaces": [], 1134 | "enumValues": null, 1135 | "possibleTypes": null 1136 | }, 1137 | { 1138 | "kind": "ENUM", 1139 | "name": "__DirectiveLocation", 1140 | "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", 1141 | "fields": null, 1142 | "inputFields": null, 1143 | "interfaces": null, 1144 | "enumValues": [ 1145 | { 1146 | "name": "QUERY", 1147 | "description": "Location adjacent to a query operation.", 1148 | "isDeprecated": false, 1149 | "deprecationReason": null 1150 | }, 1151 | { 1152 | "name": "MUTATION", 1153 | "description": "Location adjacent to a mutation operation.", 1154 | "isDeprecated": false, 1155 | "deprecationReason": null 1156 | }, 1157 | { 1158 | "name": "SUBSCRIPTION", 1159 | "description": "Location adjacent to a subscription operation.", 1160 | "isDeprecated": false, 1161 | "deprecationReason": null 1162 | }, 1163 | { 1164 | "name": "FIELD", 1165 | "description": "Location adjacent to a field.", 1166 | "isDeprecated": false, 1167 | "deprecationReason": null 1168 | }, 1169 | { 1170 | "name": "FRAGMENT_DEFINITION", 1171 | "description": "Location adjacent to a fragment definition.", 1172 | "isDeprecated": false, 1173 | "deprecationReason": null 1174 | }, 1175 | { 1176 | "name": "FRAGMENT_SPREAD", 1177 | "description": "Location adjacent to a fragment spread.", 1178 | "isDeprecated": false, 1179 | "deprecationReason": null 1180 | }, 1181 | { 1182 | "name": "INLINE_FRAGMENT", 1183 | "description": "Location adjacent to an inline fragment.", 1184 | "isDeprecated": false, 1185 | "deprecationReason": null 1186 | }, 1187 | { 1188 | "name": "SCHEMA", 1189 | "description": "Location adjacent to a schema definition.", 1190 | "isDeprecated": false, 1191 | "deprecationReason": null 1192 | }, 1193 | { 1194 | "name": "SCALAR", 1195 | "description": "Location adjacent to a scalar definition.", 1196 | "isDeprecated": false, 1197 | "deprecationReason": null 1198 | }, 1199 | { 1200 | "name": "OBJECT", 1201 | "description": "Location adjacent to an object type definition.", 1202 | "isDeprecated": false, 1203 | "deprecationReason": null 1204 | }, 1205 | { 1206 | "name": "FIELD_DEFINITION", 1207 | "description": "Location adjacent to a field definition.", 1208 | "isDeprecated": false, 1209 | "deprecationReason": null 1210 | }, 1211 | { 1212 | "name": "ARGUMENT_DEFINITION", 1213 | "description": "Location adjacent to an argument definition.", 1214 | "isDeprecated": false, 1215 | "deprecationReason": null 1216 | }, 1217 | { 1218 | "name": "INTERFACE", 1219 | "description": "Location adjacent to an interface definition.", 1220 | "isDeprecated": false, 1221 | "deprecationReason": null 1222 | }, 1223 | { 1224 | "name": "UNION", 1225 | "description": "Location adjacent to a union definition.", 1226 | "isDeprecated": false, 1227 | "deprecationReason": null 1228 | }, 1229 | { 1230 | "name": "ENUM", 1231 | "description": "Location adjacent to an enum definition.", 1232 | "isDeprecated": false, 1233 | "deprecationReason": null 1234 | }, 1235 | { 1236 | "name": "ENUM_VALUE", 1237 | "description": "Location adjacent to an enum value definition.", 1238 | "isDeprecated": false, 1239 | "deprecationReason": null 1240 | }, 1241 | { 1242 | "name": "INPUT_OBJECT", 1243 | "description": "Location adjacent to an input object type definition.", 1244 | "isDeprecated": false, 1245 | "deprecationReason": null 1246 | }, 1247 | { 1248 | "name": "INPUT_FIELD_DEFINITION", 1249 | "description": "Location adjacent to an input object field definition.", 1250 | "isDeprecated": false, 1251 | "deprecationReason": null 1252 | } 1253 | ], 1254 | "possibleTypes": null 1255 | } 1256 | ], 1257 | "directives": [ 1258 | { 1259 | "name": "include", 1260 | "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", 1261 | "locations": [ 1262 | "FIELD", 1263 | "FRAGMENT_SPREAD", 1264 | "INLINE_FRAGMENT" 1265 | ], 1266 | "args": [ 1267 | { 1268 | "name": "if", 1269 | "description": "Included when true.", 1270 | "type": { 1271 | "kind": "NON_NULL", 1272 | "name": null, 1273 | "ofType": { 1274 | "kind": "SCALAR", 1275 | "name": "Boolean", 1276 | "ofType": null 1277 | } 1278 | }, 1279 | "defaultValue": null 1280 | } 1281 | ] 1282 | }, 1283 | { 1284 | "name": "skip", 1285 | "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", 1286 | "locations": [ 1287 | "FIELD", 1288 | "FRAGMENT_SPREAD", 1289 | "INLINE_FRAGMENT" 1290 | ], 1291 | "args": [ 1292 | { 1293 | "name": "if", 1294 | "description": "Skipped when true.", 1295 | "type": { 1296 | "kind": "NON_NULL", 1297 | "name": null, 1298 | "ofType": { 1299 | "kind": "SCALAR", 1300 | "name": "Boolean", 1301 | "ofType": null 1302 | } 1303 | }, 1304 | "defaultValue": null 1305 | } 1306 | ] 1307 | }, 1308 | { 1309 | "name": "deprecated", 1310 | "description": "Marks an element of a GraphQL schema as no longer supported.", 1311 | "locations": [ 1312 | "FIELD_DEFINITION", 1313 | "ENUM_VALUE" 1314 | ], 1315 | "args": [ 1316 | { 1317 | "name": "reason", 1318 | "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/).", 1319 | "type": { 1320 | "kind": "SCALAR", 1321 | "name": "String", 1322 | "ofType": null 1323 | }, 1324 | "defaultValue": "\"No longer supported\"" 1325 | } 1326 | ] 1327 | } 1328 | ] 1329 | } 1330 | } 1331 | } --------------------------------------------------------------------------------