├── .distignore ├── .editorconfig ├── .gitignore ├── .travis.yml ├── Gruntfile.js ├── LICENSE ├── README.md ├── assets ├── app │ ├── .gitignore │ ├── README.md │ ├── build │ │ ├── asset-manifest.json │ │ ├── index.html │ │ ├── service-worker.js │ │ └── static │ │ │ ├── css │ │ │ ├── main.aafb6422.css │ │ │ └── main.aafb6422.css.map │ │ │ ├── js │ │ │ ├── main.fe7dc498.js │ │ │ └── main.fe7dc498.js.map │ │ │ └── media │ │ │ ├── GraphQLLanguageService.js.5ab204b9.flow │ │ │ ├── autocompleteUtils.js.4ce7ba19.flow │ │ │ ├── getAutocompleteSuggestions.js.7f98f032.flow │ │ │ ├── getDefinition.js.4dbec62f.flow │ │ │ ├── getDiagnostics.js.65b0979a.flow │ │ │ ├── getHoverInformation.js.d9411837.flow │ │ │ ├── getOutline.js.c04e3998.flow │ │ │ └── index.js.02c24280.flow │ ├── package-lock.json │ ├── package.json │ ├── public │ │ └── index.html │ ├── src │ │ ├── App.js │ │ ├── app.css │ │ ├── index.js │ │ └── snippets.js │ └── yarn.lock ├── img │ └── wp-graphiql-wp-admin.gif └── js │ └── wp-graphiql-helpers.js ├── bin └── install-wp-tests.sh ├── composer.json ├── package.json ├── phpcs.ruleset.xml ├── phpunit.xml.dist ├── readme.txt ├── tests ├── bootstrap.php └── test-sample.php └── wp-graphiql.php /.distignore: -------------------------------------------------------------------------------- 1 | # A set of files you probably don't want in your WordPress.org distribution 2 | .distignore 3 | .editorconfig 4 | .git 5 | .gitignore 6 | .gitlab-ci.yml 7 | .travis.yml 8 | .DS_Store 9 | Thumbs.db 10 | behat.yml 11 | bin 12 | circle.yml 13 | composer.json 14 | composer.lock 15 | Gruntfile.js 16 | package.json 17 | phpunit.xml 18 | phpunit.xml.dist 19 | multisite.xml 20 | multisite.xml.dist 21 | phpcs.ruleset.xml 22 | README.md 23 | wp-cli.local.yml 24 | tests 25 | vendor 26 | node_modules 27 | *.sql 28 | *.tar.gz 29 | *.zip 30 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # WordPress Coding Standards 5 | # https://make.wordpress.org/core/handbook/coding-standards/ 6 | 7 | root = true 8 | 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | indent_style = tab 15 | indent_size = 4 16 | 17 | [{.jshintrc,*.json,*.yml}] 18 | indent_style = space 19 | indent_size = 2 20 | 21 | [{*.txt,wp-config-sample.php}] 22 | end_of_line = crlf 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Thumbs.db 3 | wp-cli.local.yml 4 | node_modules/ 5 | *.sql 6 | *.tar.gz 7 | *.zip 8 | .idea* -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: php 4 | 5 | notifications: 6 | email: 7 | on_success: never 8 | on_failure: change 9 | 10 | branches: 11 | only: 12 | - master 13 | 14 | cache: 15 | directories: 16 | - vendor 17 | - $HOME/.composer/cache 18 | 19 | matrix: 20 | include: 21 | - php: 7.1 22 | env: WP_VERSION=latest 23 | - php: 7.0 24 | env: WP_VERSION=latest 25 | - php: 5.6 26 | env: WP_VERSION=4.4 27 | - php: 5.6 28 | env: WP_VERSION=latest 29 | - php: 5.6 30 | env: WP_VERSION=trunk 31 | - php: 5.6 32 | env: WP_TRAVISCI=phpcs 33 | - php: 5.3 34 | env: WP_VERSION=latest 35 | 36 | before_script: 37 | - export PATH="$HOME/.composer/vendor/bin:$PATH" 38 | - | 39 | if [[ ! -z "$WP_VERSION" ]] ; then 40 | bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION 41 | if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then 42 | composer global require "phpunit/phpunit=4.8.*" 43 | else 44 | composer global require "phpunit/phpunit=5.7.*" 45 | fi 46 | fi 47 | - | 48 | if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then 49 | composer global require wp-coding-standards/wpcs 50 | phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs 51 | fi 52 | 53 | script: 54 | - | 55 | if [[ ! -z "$WP_VERSION" ]] ; then 56 | phpunit 57 | WP_MULTISITE=1 phpunit 58 | fi 59 | - | 60 | if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then 61 | phpcs --standard=phpcs.ruleset.xml $(find . -name '*.php') 62 | fi 63 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function( grunt ) { 2 | 3 | 'use strict'; 4 | var banner = '/**\n * <%= pkg.homepage %>\n * Copyright (c) <%= grunt.template.today("yyyy") %>\n * This file is generated automatically. Do not edit.\n */\n'; 5 | // Project configuration 6 | grunt.initConfig( { 7 | 8 | pkg: grunt.file.readJSON( 'package.json' ), 9 | 10 | addtextdomain: { 11 | options: { 12 | textdomain: 'wp-graphiql', 13 | }, 14 | target: { 15 | files: { 16 | src: [ '*.php', '**/*.php', '!node_modules/**', '!php-tests/**', '!bin/**' ] 17 | } 18 | } 19 | }, 20 | 21 | wp_readme_to_markdown: { 22 | your_target: { 23 | files: { 24 | 'README.md': 'readme.txt' 25 | } 26 | }, 27 | }, 28 | 29 | makepot: { 30 | target: { 31 | options: { 32 | domainPath: '/languages', 33 | mainFile: 'wp-graphiql.php', 34 | potFilename: 'wp-graphiql.pot', 35 | potHeaders: { 36 | poedit: true, 37 | 'x-poedit-keywordslist': true 38 | }, 39 | type: 'wp-plugin', 40 | updateTimestamp: true 41 | } 42 | } 43 | }, 44 | } ); 45 | 46 | grunt.loadNpmTasks( 'grunt-wp-i18n' ); 47 | grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' ); 48 | grunt.registerTask( 'i18n', ['addtextdomain', 'makepot'] ); 49 | grunt.registerTask( 'readme', ['wp_readme_to_markdown'] ); 50 | 51 | grunt.util.linefeed = '\n'; 52 | 53 | }; 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DEPRECATED 2 | This project is deprecated as GraphiQL is now [built-in to WPGraphQL](https://github.com/wp-graphql/wp-graphql/releases/tag/v0.13.0). 3 | 4 | ## WPGraphiQL: GraphiQL IDE in the WP-Admin 5 | 6 | This plugin brings the power of the GraphiQL IDE to the WP-Admin. 7 | 8 | Activate this plugin – with WPGraphQL (https://github.com/wp-graphql/wp-graphql) also active – and you will be able to browse your WPGraphQL schema straight from the WP-Admin. 9 | 10 | Authentication works with your current session, so if you have proper permissions, you can run Mutations and Query 11 | for data that might be restricted to current users. 12 | 13 | WPGraphiQL - GraphiQL in the WP-Admin 14 | -------------------------------------------------------------------------------- /assets/app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # misc 10 | .DS_Store 11 | .env.local 12 | .env.development.local 13 | .env.test.local 14 | .env.production.local 15 | 16 | npm-debug.log* 17 | yarn-debug.log* 18 | yarn-error.log* 19 | -------------------------------------------------------------------------------- /assets/app/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "static/css/main.aafb6422.css", 3 | "main.css.map": "static/css/main.aafb6422.css.map", 4 | "main.js": "static/js/main.fe7dc498.js", 5 | "main.js.map": "static/js/main.fe7dc498.js.map", 6 | "static/media/GraphQLLanguageService.js.flow": "static/media/GraphQLLanguageService.js.5ab204b9.flow", 7 | "static/media/autocompleteUtils.js.flow": "static/media/autocompleteUtils.js.4ce7ba19.flow", 8 | "static/media/getAutocompleteSuggestions.js.flow": "static/media/getAutocompleteSuggestions.js.7f98f032.flow", 9 | "static/media/getDefinition.js.flow": "static/media/getDefinition.js.4dbec62f.flow", 10 | "static/media/getDiagnostics.js.flow": "static/media/getDiagnostics.js.65b0979a.flow", 11 | "static/media/getHoverInformation.js.flow": "static/media/getHoverInformation.js.d9411837.flow", 12 | "static/media/getOutline.js.flow": "static/media/getOutline.js.c04e3998.flow", 13 | "static/media/index.js.flow": "static/media/index.js.02c24280.flow" 14 | } -------------------------------------------------------------------------------- /assets/app/build/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/app/build/service-worker.js: -------------------------------------------------------------------------------- 1 | "use strict";var precacheConfig=[["/index.html","f02ac2a25a9ce8af204e4965d44a28f3"],["/static/css/main.aafb6422.css","31bb002b1eb5fb77cd3334ded1e7a5e0"],["/static/js/main.fe7dc498.js","0df7a19b313676d3a5124d6041845f31"],["/static/media/GraphQLLanguageService.js.5ab204b9.flow","5ab204b9b95c06640dbefae9a65b1db2"],["/static/media/autocompleteUtils.js.4ce7ba19.flow","4ce7ba191f7ebee4426768f246b2f0e0"],["/static/media/getAutocompleteSuggestions.js.7f98f032.flow","7f98f032085704c8943ec2d1925c7c84"],["/static/media/getDefinition.js.4dbec62f.flow","4dbec62f1d8e8417afb9cbd19f1268c3"],["/static/media/getDiagnostics.js.65b0979a.flow","65b0979ac23feca49e4411883fd8eaab"],["/static/media/getHoverInformation.js.d9411837.flow","d94118379d362fc161aa1246bcc14d43"],["/static/media/getOutline.js.c04e3998.flow","c04e3998712b37a96f0bfd283fa06b52"],["/static/media/index.js.02c24280.flow","02c24280c5e4a7eb3c6cfcb079a8f1e3"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(t){return t.redirected?("body"in t?Promise.resolve(t.body):t.blob()).then(function(e){return new Response(e,{headers:t.headers,status:t.status,statusText:t.statusText})}):Promise.resolve(t)},createCacheKey=function(e,t,n,a){var r=new URL(e);return a&&r.pathname.match(a)||(r.search+=(r.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),r.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,n){var t=new URL(e);return t.hash="",t.search=t.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(t){return n.every(function(e){return!e.test(t[0])})}).map(function(e){return e.join("=")}).join("&"),t.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],a=new URL(t,self.location),r=createCacheKey(a,hashParamName,n,/\.\w{8}\./);return[a.toString(),r]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(a){return setOfCachedUrls(a).then(function(n){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(t){if(!n.has(t)){var e=new Request(t,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+t+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return a.put(t,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var n=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(t){return t.keys().then(function(e){return Promise.all(e.map(function(e){if(!n.has(e.url))return t.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(t){if("GET"===t.request.method){var e,n=stripIgnoredUrlParameters(t.request.url,ignoreUrlParametersMatching),a="index.html";(e=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,a),e=urlsToCacheKeys.has(n));var r="/index.html";!e&&"navigate"===t.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],t.request.url)&&(n=new URL(r,self.location).toString(),e=urlsToCacheKeys.has(n)),e&&t.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',t.request.url,e),fetch(t.request)}))}}); -------------------------------------------------------------------------------- /assets/app/build/static/css/main.aafb6422.css: -------------------------------------------------------------------------------- 1 | .graphiql-container,.graphiql-container button,.graphiql-container input{color:#141823;font-family:system,-apple-system,San Francisco,\.SFNSDisplay-Regular,Segoe UI,Segoe,Segoe WP,Helvetica Neue,helvetica,Lucida Grande,arial,sans-serif;font-size:14px}.graphiql-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;margin:0;overflow:hidden;width:100%}.graphiql-container .editorWrap{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1 1;flex:1 1;overflow-x:hidden}.graphiql-container .title{font-size:18px}.graphiql-container .title em{font-family:georgia;font-size:19px}.graphiql-container .topBarWrap{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.graphiql-container .topBar{-ms-flex-align:center;align-items:center;background:-webkit-gradient(linear,left top,left bottom,from(#f7f7f7),to(#e2e2e2));background:-webkit-linear-gradient(#f7f7f7,#e2e2e2);background:-o-linear-gradient(#f7f7f7,#e2e2e2);background:linear-gradient(#f7f7f7,#e2e2e2);border-bottom:1px solid #d0d0d0;cursor:default;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex:1 1;flex:1 1;height:34px;overflow-y:visible;padding:7px 14px 6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.graphiql-container .toolbar{overflow-x:visible;display:-ms-flexbox;display:flex}.graphiql-container .docExplorerShow,.graphiql-container .historyShow{background:-webkit-gradient(linear,left top,left bottom,from(#f7f7f7),to(#e2e2e2));background:-webkit-linear-gradient(#f7f7f7,#e2e2e2);background:-o-linear-gradient(#f7f7f7,#e2e2e2);background:linear-gradient(#f7f7f7,#e2e2e2);border-radius:0;border-bottom:1px solid #d0d0d0;border-right:none;border-top:none;color:#3b5998;cursor:pointer;font-size:14px;margin:0;outline:0;padding:2px 20px 0 18px}.graphiql-container .docExplorerShow{border-left:1px solid rgba(0,0,0,.2)}.graphiql-container .historyShow{border-right:1px solid rgba(0,0,0,.2);border-left:0}.graphiql-container .docExplorerShow:before{border-left:2px solid #3b5998;border-top:2px solid #3b5998;content:"";display:inline-block;height:9px;margin:0 3px -1px 0;position:relative;-ms-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);transform:rotate(-45deg);width:9px}.graphiql-container .editorBar{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex:1 1;flex:1 1}.graphiql-container .queryWrap,.graphiql-container .resultWrap{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1 1;flex:1 1}.graphiql-container .resultWrap{border-left:1px solid #e0e0e0;position:relative}.graphiql-container .docExplorerWrap,.graphiql-container .historyPaneWrap{background:#fff;-webkit-box-shadow:0 0 8px rgba(0,0,0,.15);box-shadow:0 0 8px rgba(0,0,0,.15);position:relative;z-index:3}.graphiql-container .historyPaneWrap{min-width:230px;z-index:5}.graphiql-container .docExplorerResizer{cursor:col-resize;height:100%;left:-5px;position:absolute;top:0;width:10px;z-index:10}.graphiql-container .docExplorerHide{cursor:pointer;font-size:18px;margin:-7px -8px -6px 0;padding:18px 16px 15px 12px}.graphiql-container div .query-editor{-ms-flex:1 1;flex:1 1;position:relative}.graphiql-container .variable-editor{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:30px;position:relative}.graphiql-container .variable-editor-title{background:#eee;border-bottom:1px solid #d6d6d6;border-top:1px solid #e0e0e0;color:#777;font-variant:small-caps;font-weight:700;letter-spacing:1px;line-height:14px;padding:6px 0 8px 43px;text-transform:lowercase;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.graphiql-container .codemirrorWrap,.graphiql-container .result-window{-ms-flex:1 1;flex:1 1;height:100%;position:relative}.graphiql-container .footer{background:#f6f7f8;border-left:1px solid #e0e0e0;border-top:1px solid #e0e0e0;margin-left:12px;position:relative}.graphiql-container .footer:before{background:#eee;bottom:0;content:" ";left:-13px;position:absolute;top:-1px;width:12px}.result-window .CodeMirror{background:#f6f7f8}.graphiql-container .result-window .CodeMirror-gutters{background-color:#eee;border-color:#e0e0e0;cursor:col-resize}.graphiql-container .result-window .CodeMirror-foldgutter,.graphiql-container .result-window .CodeMirror-foldgutter-folded:after,.graphiql-container .result-window .CodeMirror-foldgutter-open:after{padding-left:3px}.graphiql-container .toolbar-button{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));background:-webkit-linear-gradient(#f9f9f9,#ececec);background:-o-linear-gradient(#f9f9f9,#ececec);background:linear-gradient(#f9f9f9,#ececec);border-radius:3px;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.2),0 1px 0 hsla(0,0%,100%,.7),inset 0 1px #fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2),0 1px 0 hsla(0,0%,100%,.7),inset 0 1px #fff;color:#555;cursor:pointer;display:inline-block;margin:0 5px;padding:3px 11px 5px;text-decoration:none;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;max-width:150px}.graphiql-container .toolbar-button:active{background:-webkit-gradient(linear,left top,left bottom,from(#ececec),to(#d5d5d5));background:-webkit-linear-gradient(#ececec,#d5d5d5);background:-o-linear-gradient(#ececec,#d5d5d5);background:linear-gradient(#ececec,#d5d5d5);-webkit-box-shadow:0 1px 0 hsla(0,0%,100%,.7),inset 0 0 0 1px rgba(0,0,0,.1),inset 0 1px 1px 1px rgba(0,0,0,.12),inset 0 0 5px rgba(0,0,0,.1);box-shadow:0 1px 0 hsla(0,0%,100%,.7),inset 0 0 0 1px rgba(0,0,0,.1),inset 0 1px 1px 1px rgba(0,0,0,.12),inset 0 0 5px rgba(0,0,0,.1)}.graphiql-container .toolbar-button.error{background:-webkit-gradient(linear,left top,left bottom,from(#fdf3f3),to(#e6d6d7));background:-webkit-linear-gradient(#fdf3f3,#e6d6d7);background:-o-linear-gradient(#fdf3f3,#e6d6d7);background:linear-gradient(#fdf3f3,#e6d6d7);color:#b00}.graphiql-container .toolbar-button-group{margin:0 5px;white-space:nowrap}.graphiql-container .toolbar-button-group>*{margin:0}.graphiql-container .toolbar-button-group>:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.graphiql-container .toolbar-button-group>:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.graphiql-container .execute-button-wrap{height:34px;margin:0 14px 0 28px;position:relative}.graphiql-container .execute-button{background:-webkit-gradient(linear,left top,left bottom,from(#fdfdfd),to(#d2d3d6));background:-webkit-linear-gradient(#fdfdfd,#d2d3d6);background:-o-linear-gradient(#fdfdfd,#d2d3d6);background:linear-gradient(#fdfdfd,#d2d3d6);border-radius:17px;border:1px solid rgba(0,0,0,.25);-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;cursor:pointer;fill:#444;height:34px;margin:0;padding:0;width:34px}.graphiql-container .execute-button svg{pointer-events:none}.graphiql-container .execute-button:active{background:-webkit-gradient(linear,left top,left bottom,from(#e6e6e6),to(#c3c3c3));background:-webkit-linear-gradient(#e6e6e6,#c3c3c3);background:-o-linear-gradient(#e6e6e6,#c3c3c3);background:linear-gradient(#e6e6e6,#c3c3c3);-webkit-box-shadow:0 1px 0 #fff,inset 0 0 2px rgba(0,0,0,.2),inset 0 0 6px rgba(0,0,0,.1);box-shadow:0 1px 0 #fff,inset 0 0 2px rgba(0,0,0,.2),inset 0 0 6px rgba(0,0,0,.1)}.graphiql-container .execute-button:focus{outline:0}.graphiql-container .toolbar-menu,.graphiql-container .toolbar-select{position:relative}.graphiql-container .execute-options,.graphiql-container .toolbar-menu-items,.graphiql-container .toolbar-select-options{background:#fff;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.1),0 2px 4px rgba(0,0,0,.25);box-shadow:0 0 0 1px rgba(0,0,0,.1),0 2px 4px rgba(0,0,0,.25);margin:0;padding:6px 0;position:absolute;z-index:100}.graphiql-container .execute-options{min-width:100px;top:37px;left:-1px}.graphiql-container .toolbar-menu-items{left:1px;margin-top:-1px;min-width:110%;top:100%;visibility:hidden}.graphiql-container .toolbar-menu-items.open{visibility:visible}.graphiql-container .toolbar-select-options{left:0;min-width:100%;top:-5px;visibility:hidden}.graphiql-container .toolbar-select-options.open{visibility:visible}.graphiql-container .execute-options>li,.graphiql-container .toolbar-menu-items>li,.graphiql-container .toolbar-select-options>li{cursor:pointer;display:block;margin:none;max-width:300px;overflow:hidden;padding:2px 20px 4px 11px;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}.graphiql-container .execute-options>li.selected,.graphiql-container .history-contents>p:active,.graphiql-container .history-contents>p:hover,.graphiql-container .toolbar-menu-items>li.hover,.graphiql-container .toolbar-menu-items>li:active,.graphiql-container .toolbar-menu-items>li:hover,.graphiql-container .toolbar-select-options>li.hover,.graphiql-container .toolbar-select-options>li:active,.graphiql-container .toolbar-select-options>li:hover{background:#e10098;color:#fff}.graphiql-container .toolbar-select-options>li>svg{display:inline;fill:#666;margin:0 -6px 0 6px;pointer-events:none;vertical-align:middle}.graphiql-container .toolbar-select-options>li.hover>svg,.graphiql-container .toolbar-select-options>li:active>svg,.graphiql-container .toolbar-select-options>li:hover>svg{fill:#fff}.graphiql-container .CodeMirror-scroll{overflow-scrolling:touch}.graphiql-container .CodeMirror{color:#141823;font-family:Consolas,Inconsolata,Droid Sans Mono,Monaco,monospace;font-size:13px;height:100%;left:0;position:absolute;top:0;width:100%}.graphiql-container .CodeMirror-lines{padding:20px 0}.CodeMirror-hint-information .content{box-orient:vertical;color:#141823;display:-ms-flexbox;display:flex;font-family:system,-apple-system,San Francisco,\.SFNSDisplay-Regular,Segoe UI,Segoe,Segoe WP,Helvetica Neue,helvetica,Lucida Grande,arial,sans-serif;font-size:13px;line-clamp:3;line-height:16px;max-height:48px;overflow:hidden;-o-text-overflow:-o-ellipsis-lastline;text-overflow:-o-ellipsis-lastline}.CodeMirror-hint-information .content p:first-child{margin-top:0}.CodeMirror-hint-information .content p:last-child{margin-bottom:0}.CodeMirror-hint-information .infoType{color:#ca9800;cursor:pointer;display:inline;margin-right:.5em}.autoInsertedLeaf.cm-property{-webkit-animation-duration:6s;animation-duration:6s;-webkit-animation-name:insertionFade;animation-name:insertionFade;border-bottom:2px solid hsla(0,0%,100%,0);border-radius:2px;margin:-2px -4px -1px;padding:2px 4px 1px}@-webkit-keyframes insertionFade{0%,to{background:hsla(0,0%,100%,0);border-color:hsla(0,0%,100%,0)}15%,85%{background:#fbffc9;border-color:#f0f3c0}}@keyframes insertionFade{0%,to{background:hsla(0,0%,100%,0);border-color:hsla(0,0%,100%,0)}15%,85%{background:#fbffc9;border-color:#f0f3c0}}div.CodeMirror-lint-tooltip{background-color:#fff;border-radius:2px;border:0;color:#141823;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.45);box-shadow:0 1px 3px rgba(0,0,0,.45);font-size:13px;line-height:16px;max-width:430px;opacity:0;padding:8px 10px;-webkit-transition:opacity .15s;-o-transition:opacity .15s;transition:opacity .15s;white-space:pre-wrap}div.CodeMirror-lint-tooltip>*{padding-left:23px}div.CodeMirror-lint-tooltip>*+*{margin-top:12px}.graphiql-container .CodeMirror-foldmarker{border-radius:4px;background:#08f;background:-webkit-gradient(linear,left top,left bottom,from(#43a8ff),to(#0f83e8));background:-webkit-linear-gradient(#43a8ff,#0f83e8);background:-o-linear-gradient(#43a8ff,#0f83e8);background:linear-gradient(#43a8ff,#0f83e8);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.2),inset 0 0 0 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.2),inset 0 0 0 1px rgba(0,0,0,.1);color:#fff;font-family:arial;font-size:12px;line-height:0;margin:0 3px;padding:0 4px 1px;text-shadow:0 -1px rgba(0,0,0,.1)}.graphiql-container div.CodeMirror span.CodeMirror-matchingbracket{color:#555;text-decoration:underline}.graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket{color:red}.cm-comment{color:#999}.cm-punctuation{color:#555}.cm-keyword{color:#b11a04}.cm-def{color:#d2054e}.cm-property{color:#1f61a0}.cm-qualifier{color:#1c92a9}.cm-attribute{color:#8b2bb9}.cm-number{color:#2882f9}.cm-string{color:#d64292}.cm-builtin{color:#d47509}.cm-string-2{color:#0b7fc7}.cm-variable{color:#397d13}.cm-meta{color:#b33086}.cm-atom{color:#ca9800}.CodeMirror{color:#000;font-family:monospace;height:300px}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{color:#999;min-width:20px;padding:0 3px 0 5px;text-align:right;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror .CodeMirror-cursor{border-left:1px solid #000}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{background:#7e7;border:0;width:auto}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;border:0;width:auto}@-webkit-keyframes blink{0%{background:#7e7}50%{background:none}to{background:#7e7}}@keyframes blink{0%{background:#7e7}50%{background:none}to{background:#7e7}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff;overflow:hidden;position:relative}.CodeMirror-scroll{height:100%;margin-bottom:-30px;margin-right:-30px;outline:none;overflow:scroll!important;padding-bottom:30px;position:relative}.CodeMirror-sizer{border-right:30px solid transparent;position:relative}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{display:none;position:absolute;z-index:6}.CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:scroll;right:0;top:0}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-x:scroll;overflow-y:hidden}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{min-height:100%;position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{display:inline-block;height:100%;margin-bottom:-30px;vertical-align:top;white-space:normal;*zoom:1;*display:inline}.CodeMirror-gutter-wrapper{background:none!important;border:none!important;position:absolute;z-index:4}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{cursor:default;position:absolute;z-index:4}.CodeMirror-gutter-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-webkit-tap-highlight-color:transparent;background:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;line-height:inherit;margin:0;overflow:visible;position:relative;white-space:pre;word-wrap:normal;z-index:2}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{overflow:auto;position:relative;z-index:2}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-webkit-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{position:relative;visibility:hidden;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.CodeMirror-dialog{background:inherit;color:inherit;left:0;right:0;overflow:hidden;padding:.1em .8em;position:absolute;z-index:15}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{background:transparent;border:1px solid #d3d6db;color:inherit;font-family:monospace;outline:none;width:20em}.CodeMirror-dialog button{font-size:70%}.graphiql-container .doc-explorer{background:#fff}.graphiql-container .doc-explorer-title-bar,.graphiql-container .history-title-bar{cursor:default;display:-ms-flexbox;display:flex;height:34px;line-height:14px;padding:8px 8px 5px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.graphiql-container .doc-explorer-title,.graphiql-container .history-title{-ms-flex:1 1;flex:1 1;font-weight:700;overflow-x:hidden;padding:10px 0 10px 10px;text-align:center;-o-text-overflow:ellipsis;text-overflow:ellipsis;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;white-space:nowrap}.graphiql-container .doc-explorer-back{color:#3b5998;cursor:pointer;margin:-7px 0 -6px -8px;overflow-x:hidden;padding:17px 12px 16px 16px;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}.doc-explorer-narrow .doc-explorer-back{width:0}.graphiql-container .doc-explorer-back:before{border-left:2px solid #3b5998;border-top:2px solid #3b5998;content:"";display:inline-block;height:9px;margin:0 3px -1px 0;position:relative;-ms-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);transform:rotate(-45deg);width:9px}.graphiql-container .doc-explorer-rhs{position:relative}.graphiql-container .doc-explorer-contents,.graphiql-container .history-contents{background-color:#fff;border-top:1px solid #d6d6d6;bottom:0;left:0;overflow-y:auto;padding:20px 15px;position:absolute;right:0;top:47px}.graphiql-container .doc-explorer-contents{min-width:300px}.graphiql-container .doc-type-description blockquote:first-child,.graphiql-container .doc-type-description p:first-child{margin-top:0}.graphiql-container .doc-explorer-contents a{cursor:pointer;text-decoration:none}.graphiql-container .doc-explorer-contents a:hover{text-decoration:underline}.graphiql-container .doc-value-description>:first-child{margin-top:4px}.graphiql-container .doc-value-description>:last-child{margin-bottom:4px}.graphiql-container .doc-category{margin:20px 0}.graphiql-container .doc-category-title{border-bottom:1px solid #e0e0e0;color:#777;cursor:default;font-size:14px;font-variant:small-caps;font-weight:700;letter-spacing:1px;margin:0 -15px 10px 0;padding:10px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.graphiql-container .doc-category-item{margin:12px 0;color:#555}.graphiql-container .keyword{color:#b11a04}.graphiql-container .type-name{color:#ca9800}.graphiql-container .field-name{color:#1f61a0}.graphiql-container .field-short-description{color:#999;margin-left:5px;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.graphiql-container .enum-value{color:#0b7fc7}.graphiql-container .arg-name{color:#8b2bb9}.graphiql-container .arg{display:block;margin-left:1em}.graphiql-container .arg:first-child:last-child,.graphiql-container .arg:first-child:nth-last-child(2),.graphiql-container .arg:first-child:nth-last-child(2)~.arg{display:inherit;margin:inherit}.graphiql-container .arg:first-child:nth-last-child(2):after{content:", "}.graphiql-container .arg-default-value{color:#43a047}.graphiql-container .doc-deprecation{background:#fffae8;-webkit-box-shadow:inset 0 0 1px #bfb063;box-shadow:inset 0 0 1px #bfb063;color:#867f70;line-height:16px;margin:8px -8px;max-height:80px;overflow:hidden;padding:8px;border-radius:3px}.graphiql-container .doc-deprecation:before{content:"Deprecated:";color:#c79b2e;cursor:default;display:block;font-size:9px;font-weight:700;letter-spacing:1px;line-height:1;padding-bottom:5px;text-transform:uppercase;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.graphiql-container .doc-deprecation>:first-child{margin-top:0}.graphiql-container .doc-deprecation>:last-child{margin-bottom:0}.graphiql-container .show-btn{-webkit-appearance:initial;display:block;border-radius:3px;border:1px solid #ccc;text-align:center;padding:8px 12px 10px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background:#fbfcfc;color:#555;cursor:pointer}.graphiql-container .search-box{border-bottom:1px solid #d3d6db;display:block;font-size:14px;margin:-15px -15px 12px 0;position:relative}.graphiql-container .search-box:before{content:"\26B2";display:block;font-size:24px;top:-2px;-ms-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.graphiql-container .search-box .search-box-clear,.graphiql-container .search-box:before{cursor:pointer;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.graphiql-container .search-box .search-box-clear{background-color:#d0d0d0;border-radius:12px;color:#fff;font-size:11px;padding:1px 5px 2px;right:3px;top:8px}.graphiql-container .search-box .search-box-clear:hover{background-color:#b9b9b9}.graphiql-container .search-box>input{border:none;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px;outline:none;padding:6px 24px 8px 20px;width:100%}.graphiql-container .error-container{font-weight:700;left:0;letter-spacing:1px;opacity:.5;position:absolute;right:0;text-align:center;text-transform:uppercase;top:50%;-ms-transform:translateY(-50%);-webkit-transform:translateY(-50%);transform:translateY(-50%)}.CodeMirror-foldmarker{color:blue;cursor:pointer;font-family:arial;line-height:.3;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-folded,.CodeMirror-foldgutter-open{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25BE"}.CodeMirror-foldgutter-folded:after{content:"\25B8"}.graphiql-container .history-contents,.graphiql-container .history-contents input{font-family:Consolas,Inconsolata,Droid Sans Mono,Monaco,monospace;padding:0}.graphiql-container .history-contents p{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;font-size:12px;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;margin:0;padding:8px;border-bottom:1px solid #e0e0e0}.graphiql-container .history-contents p.editable{padding-bottom:6px;padding-top:7px}.graphiql-container .history-contents input{-ms-flex-positive:1;flex-grow:1;font-size:12px}.graphiql-container .history-contents p:hover{cursor:pointer}.graphiql-container .history-contents p span.history-label{-ms-flex-positive:1;flex-grow:1;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.CodeMirror-info{background:#fff;border-radius:2px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.45);box-shadow:0 1px 3px rgba(0,0,0,.45);-webkit-box-sizing:border-box;box-sizing:border-box;color:#555;font-family:system,-apple-system,San Francisco,\.SFNSDisplay-Regular,Segoe UI,Segoe,Segoe WP,Helvetica Neue,helvetica,Lucida Grande,arial,sans-serif;font-size:13px;line-height:16px;margin:8px -8px;max-width:400px;opacity:0;overflow:hidden;padding:8px;position:fixed;-webkit-transition:opacity .15s;-o-transition:opacity .15s;transition:opacity .15s;z-index:50}.CodeMirror-info :first-child{margin-top:0}.CodeMirror-info :last-child{margin-bottom:0}.CodeMirror-info p{margin:1em 0}.CodeMirror-info .info-description{color:#777;line-height:16px;margin-top:1em;max-height:80px;overflow:hidden}.CodeMirror-info .info-deprecation{background:#fffae8;-webkit-box-shadow:inset 0 1px 1px -1px #bfb063;box-shadow:inset 0 1px 1px -1px #bfb063;color:#867f70;line-height:16px;margin:-8px;margin-top:8px;max-height:80px;overflow:hidden;padding:8px}.CodeMirror-info .info-deprecation-label{color:#c79b2e;cursor:default;display:block;font-size:9px;font-weight:700;letter-spacing:1px;line-height:1;padding-bottom:5px;text-transform:uppercase;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.CodeMirror-info .info-deprecation-label+*{margin-top:0}.CodeMirror-info a{text-decoration:none}.CodeMirror-info a:hover{text-decoration:underline}.CodeMirror-info .type-name{color:#ca9800}.CodeMirror-info .field-name{color:#1f61a0}.CodeMirror-info .enum-value{color:#0b7fc7}.CodeMirror-info .arg-name{color:#8b2bb9}.CodeMirror-info .directive-name{color:#b33086}.CodeMirror-jump-token{text-decoration:underline;cursor:pointer}.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:infobackground;border-radius:4px 4px 4px 4px;border:1px solid #000;color:infotext;font-family:monospace;font-size:10pt;max-width:600px;opacity:0;overflow:hidden;padding:2px 5px;position:fixed;-webkit-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;white-space:pre-wrap;z-index:100}.CodeMirror-lint-mark-error,.CodeMirror-lint-mark-warning{background-position:0 100%;background-repeat:repeat-x}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{background-position:50%;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;position:relative;vertical-align:middle;width:16px}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{background-position:0 0;background-repeat:no-repeat;padding-left:18px}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-multiple{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");background-position:100% 100%;background-repeat:no-repeat;width:100%;height:100%}.graphiql-container .spinner-container{height:36px;left:50%;position:absolute;top:50%;-ms-transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:36px;z-index:10}.graphiql-container .spinner{-webkit-animation:rotation .6s infinite linear;animation:rotation .6s infinite linear;border-bottom:6px solid hsla(0,0%,59%,.15);border-left:6px solid hsla(0,0%,59%,.15);border-radius:100%;border-right:6px solid hsla(0,0%,59%,.15);border-top:6px solid hsla(0,0%,59%,.8);display:inline-block;height:24px;position:absolute;vertical-align:middle;width:24px}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.CodeMirror-hints{background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.45);box-shadow:0 1px 3px rgba(0,0,0,.45);font-family:Consolas,Inconsolata,Droid Sans Mono,Monaco,monospace;font-size:13px;list-style:none;margin-left:-6px;margin:0;max-height:14.5em;overflow-y:auto;overflow:hidden;padding:0;position:absolute;z-index:10}.CodeMirror-hint{border-top:1px solid #f7f7f7;color:#141823;cursor:pointer;margin:0;max-width:300px;overflow:hidden;padding:2px 6px;white-space:pre}li.CodeMirror-hint-active{background-color:#08f;border-top-color:#fff;color:#fff}.CodeMirror-hint-information{border-top:1px solid silver;max-width:300px;padding:4px 6px;position:relative;z-index:1}.CodeMirror-hint-information:first-child{border-bottom:1px solid silver;border-top:none;margin-bottom:-1px}.CodeMirror-hint-deprecation{background:#fffae8;-webkit-box-shadow:inset 0 1px 1px -1px #bfb063;box-shadow:inset 0 1px 1px -1px #bfb063;color:#867f70;font-family:system,-apple-system,San Francisco,\.SFNSDisplay-Regular,Segoe UI,Segoe,Segoe WP,Helvetica Neue,helvetica,Lucida Grande,arial,sans-serif;font-size:13px;line-height:16px;margin-top:4px;max-height:80px;overflow:hidden;padding:6px}.CodeMirror-hint-deprecation .deprecation-label{color:#c79b2e;cursor:default;display:block;font-size:9px;font-weight:700;letter-spacing:1px;line-height:1;padding-bottom:5px;text-transform:uppercase;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.CodeMirror-hint-deprecation .deprecation-label+*{margin-top:0}.CodeMirror-hint-deprecation :last-child{margin-bottom:0}#wp-graphiql{display:-ms-flexbox;display:flex;-ms-flex:1 1;flex:1 1}#wp-graphiql .spinner{visibility:visible;background:none}.graphiql-code-exporter .CodeMirror{position:relative;font-size:11px;background:transparent}.graphiql-code-exporter .CodeMirror-lines{padding-top:0} 2 | /*# sourceMappingURL=main.aafb6422.css.map*/ -------------------------------------------------------------------------------- /assets/app/build/static/css/main.aafb6422.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../node_modules/graphiql/graphiql.css","app.css","../node_modules/graphiql-code-exporter/CodeExporter.css"],"names":[],"mappings":"AAAA,yEAGE,cACA,qJAaA,cAAgB,CAGlB,oBACE,oBACA,aACA,uBACI,mBACJ,YACA,SACA,gBACA,UAAY,CAGd,gCACE,oBACA,aACA,0BACI,sBACJ,aACI,SACJ,iBAAmB,CAGrB,2BACE,cAAgB,CAGlB,8BACE,oBACA,cAAgB,CAGlB,gCACE,oBACA,aACA,uBACI,kBAAoB,CAG1B,4BACE,sBACI,mBACJ,mFACA,oDACA,+CACA,4CACA,gCACA,eACA,oBACA,aACA,uBACI,mBACJ,aACI,SACJ,YACA,mBACA,qBACA,yBACG,sBACC,qBACI,gBAAkB,CAG5B,6BACE,mBACA,oBACA,YAAc,CAGhB,sEAEE,mFACA,oDACA,+CACA,4CACA,gBACA,gCACA,kBACA,gBACA,cACA,eACA,eACA,SACA,UACA,uBAAyB,CAG3B,qCACE,oCAA0C,CAG5C,iCACE,sCACA,aAAe,CAGjB,4CACE,8BACA,6BACA,WACA,qBACA,WACA,oBACA,kBACA,6BACI,iCACI,yBACR,SAAW,CAGb,+BACE,oBACA,aACA,uBACI,mBACJ,aACI,QAAU,CAYhB,+DARE,oBACA,aACA,0BACI,sBACJ,aACI,QAAU,CAYf,gCARC,8BAOA,iBAAmB,CAGrB,0EAEE,gBACA,2CACQ,mCACR,kBACA,SAAW,CAGb,qCACE,gBACA,SAAW,CAGb,wCACE,kBACA,YACA,UACA,kBACA,MACA,WACA,UAAY,CAGd,qCACE,eACA,eACA,wBACA,2BAA6B,CAG/B,sCACE,aACI,SACJ,iBAAmB,CAGrB,qCACE,oBACA,aACA,0BACI,sBACJ,YACA,iBAAmB,CAGrB,2CACE,gBACA,gCACA,6BACA,WACA,wBACA,gBACA,mBACA,iBACA,uBACA,yBACA,yBACG,sBACC,qBACI,gBAAkB,CAU5B,uEACE,aACI,SACJ,YACA,iBAAmB,CAGrB,4BACE,mBACA,8BACA,6BACA,iBACA,iBAAmB,CAGrB,mCACE,gBACA,SACA,YACA,WACA,kBACA,SACA,UAAY,CAId,2BACE,kBAAoB,CAGtB,uDACE,sBACA,qBACA,iBAAmB,CAGrB,sMAGE,gBAAkB,CAGpB,oCACE,mBACA,mFACA,oDACA,+CACA,4CACA,kBACA,8FAIQ,sFAIR,WACA,eACA,qBACA,aACA,qBACA,qBACA,0BACG,uBACH,mBACA,eAAiB,CAGnB,2CACE,mFACA,oDACA,+CACA,4CACA,8IAKQ,qIAI2B,CAGrC,0CACE,mFACA,oDACA,+CACA,4CACA,UAAY,CAGd,0CACE,aACA,kBAAoB,CAGtB,4CACE,QAAU,CAGZ,4DACE,0BACA,4BAA8B,CAGhC,6DACE,yBACA,4BACA,gBAAkB,CAGpB,yCACE,YACA,qBACA,iBAAmB,CAGrB,oCACE,mFACA,oDACA,+CACA,4CACA,mBACA,iCACA,gCACQ,wBACR,eACA,UACA,YACA,SACA,UACA,UAAY,CAGd,wCACE,mBAAqB,CAGvB,2CACE,mFACA,oDACA,+CACA,4CACA,0FAIQ,iFAG2B,CAGrC,0CACE,SAAW,CAGb,sEAEE,iBAAmB,CAGrB,yHAGE,gBACA,sEAGQ,8DAGR,SACA,cACA,kBACA,WAAa,CAGf,qCACE,gBACA,SACA,SAAW,CAGb,wCACE,SACA,gBACA,eACA,SACA,iBAAmB,CAGrB,6CACE,kBAAoB,CAGtB,4CACE,OACA,eACA,SACA,iBAAmB,CAGrB,iDACE,kBAAoB,CAGtB,kIAGE,eACA,cACA,YACA,gBACA,gBACA,0BACA,0BACG,uBACH,kBAAoB,CAGtB,kcASE,mBACA,UAAY,CAGd,mDACE,eACA,UACA,oBACA,oBACA,qBAAuB,CAGzB,4KAGE,SAAW,CAGb,uCACE,wBAA0B,CAG5B,gCACE,cACA,kEAMA,eACA,YACA,OACA,kBACA,MACA,UAAY,CAGd,sCACE,cAAgB,CAGlB,sCACE,oBACA,cACA,oBACA,aACA,qJACA,eACA,aACA,iBACA,gBACA,gBACA,sCACG,kCAAoC,CAGzC,oDACE,YAAc,CAGhB,mDACE,eAAiB,CAGnB,uCACE,cACA,eACA,eACA,iBAAoB,CAGtB,8BACE,8BACQ,sBACR,qCACQ,6BACR,0CACA,kBACA,sBACA,mBAAqB,CAGvB,iCACE,MACE,6BACA,8BAAqC,CAGvC,QACE,mBACA,oBAAsB,CACvB,CAGH,yBACE,MACE,6BACA,8BAAqC,CAGvC,QACE,mBACA,oBAAsB,CACvB,CAGH,4BACE,sBACA,kBACA,SACA,cACA,6CACQ,qCACR,eACA,iBACA,gBACA,UACA,iBACA,gCACA,2BACA,wBACA,oBAAsB,CAGxB,8BACE,iBAAmB,CAGrB,gCACE,eAAiB,CAKnB,2CACE,kBACA,gBACA,mFACA,oDACA,+CACA,4CACA,2EAGQ,mEAGR,WACA,kBACA,eACA,cACA,aACA,kBACA,iCAAuC,CAGzC,mEACE,WACA,yBAA2B,CAG7B,sEACE,SAAY,CAId,YACE,UAAY,CAId,gBACE,UAAY,CAId,YACE,aAAe,CAIjB,QACE,aAAe,CAIjB,aACE,aAAe,CAIjB,cACE,aAAe,CAIjB,cACE,aAAe,CAIjB,WACE,aAAe,CAIjB,WACE,aAAe,CAIjB,YACE,aAAe,CAIjB,aACE,aAAe,CAIjB,aACE,aAAe,CAIjB,SACE,aAAe,CAIjB,SACE,aAAe,CAIjB,YAEE,WACA,sBACA,YAAc,CAKhB,kBACE,aAAe,CAEjB,gBACE,aAAe,CAGjB,uDACE,qBAAwB,CAK1B,oBACE,4BACA,yBACA,kBAAoB,CAGtB,uBACE,WACA,eACA,oBACA,iBACA,kBAAoB,CAGtB,yBAA2B,UAAa,CACxC,gCAAkC,UAAY,CAI9C,+BACE,0BAA6B,CAG/B,2CACE,4BAA8B,CAEhC,gDACE,gBACA,SACA,UAAY,CAEd,iDACE,SAAW,CAGb,uBACE,gDACQ,wCACR,SACA,UAAY,CAEd,yBACE,GAAK,eAAiB,CACtB,IAAM,eAAiB,CACvB,GAAO,eAAiB,CAAE,CAE5B,iBACE,GAAK,eAAiB,CACtB,IAAM,eAAiB,CACvB,GAAO,eAAiB,CAAE,CAM5B,QAAU,qBAAuB,uBAAyB,CAE1D,kBACE,2BACA,iBAAmB,CAKrB,0BAA2B,UAAY,CACvC,uBAAwB,UAAY,CACpC,yBAA0B,UAAY,CACtC,sBAAuB,UAAY,CAKnC,6BAA8B,UAAY,CAC1C,6BAA8B,UAAY,CAC1C,0BAA2B,UAAY,CACvC,yBAA0B,UAAY,CACtC,2BAA4B,UAAY,CAExC,mDAA6B,UAAY,CACzC,0BAA2B,UAAY,CACvC,0BAA2B,UAAY,CACvC,sBAAuB,UAAY,CACnC,4BAA6B,UAAY,CACzC,yBAA0B,UAAY,CACtC,wBAAyB,UAAY,CACrC,qBAAsB,UAAY,CAClC,uBAAwB,UAAY,CAEpC,aAAc,UAAY,CAC1B,aAAc,UAAY,CAC1B,sBAAwB,eAAkB,CAC1C,OAAQ,iBAAmB,CAC3B,SAAU,yBAA2B,CACrC,kBAAmB,4BAA8B,CAGjD,wCAAiB,SAAY,CAE7B,sBAAwB,uBAAyB,CAIjD,+CAAgD,UAAY,CAC5D,kDAAmD,UAAY,CAC/D,wBAA0B,6BAAkC,CAC5D,kCAAmC,kBAAoB,CAOvD,YACE,gBACA,gBACA,iBAAmB,CAGrB,mBACE,YAGA,oBAAsB,mBACtB,aACA,0BACA,oBACA,iBAAmB,CAErB,kBACE,oCACA,iBAAmB,CAMrB,qGACE,aACA,kBACA,SAAW,CAEb,uBACE,kBACA,kBACA,QAAU,KAAO,CAEnB,uBACE,SAAW,OACX,kBACA,iBAAmB,CAErB,6BACE,QAAU,QAAU,CAEtB,0BACE,OAAS,QAAU,CAGrB,oBACE,gBACA,kBAAoB,OAAS,MAC7B,SAAW,CAEb,mBACE,qBACA,YACA,oBACA,mBACA,mBAAoB,CAEpB,OAAQ,CACR,cAAgB,CAElB,2BACE,0BACA,sBACA,kBACA,SAAW,CAEb,8BACE,kBACA,MAAQ,SACR,SAAW,CAEb,uBACE,eACA,kBACA,SAAW,CAEb,2BACE,yBACG,sBACC,qBACI,gBAAkB,CAG5B,kBACE,YACA,cAAgB,CAElB,gBACE,wCAEA,uBACA,gBACA,eACA,cACA,oBACA,kBACA,oCACQ,4BACR,oBACA,SACA,iBACA,kBACA,gBACA,iBACA,SAAW,CAEb,qBACE,qBACA,qBACA,iBAAmB,CAGrB,2BACE,kBACA,OAAS,QAAU,MAAQ,SAC3B,SAAW,CAGb,uBACE,cACA,kBACA,SAAW,CAKb,iBACE,YAAc,CAIhB,mGAKE,+BACQ,sBAAwB,CAGlC,oBACE,SACA,gBACA,kBACA,kBACA,UAAY,CAGd,mBAAqB,iBAAmB,CACxC,wBAA0B,eAAiB,CAE3C,uBACE,kBACA,kBACA,SAAW,CAMb,sEACE,kBAAoB,CAGtB,qBAAuB,kBAAoB,CAC3C,yCAA2C,kBAAoB,CAC/D,sBAAwB,gBAAkB,CAE1C,mGAA6G,kBAAoB,CACjI,kHAA4H,kBAAoB,CAEhJ,cACE,gBACA,6BAAkC,CAIpC,kBAAmB,0BAA6B,CAGhD,iBAAmB,kBAAoB,CAEvC,aAEE,mCACE,iBAAmB,CACpB,CAIH,wBAA0B,UAAY,CAGtC,6BAA+B,eAAiB,CAEhD,mBACE,mBACA,cACA,OAAS,QACT,gBACA,kBACA,kBACA,UAAY,CAGd,uBACE,6BACA,KAAO,CAGT,0BACE,0BACA,QAAU,CAGZ,yBACE,uBACA,yBACA,cACA,sBACA,aACA,UAAY,CAGd,0BACE,aAAe,CAEjB,kCACE,eAAkB,CAGpB,mFAEE,eACA,oBACA,aACA,YACA,iBACA,oBACA,kBACA,yBACG,sBACC,qBACI,gBAAkB,CAG5B,2EAEE,aACI,SACJ,gBACA,kBACA,yBACA,kBACA,0BACG,uBACH,yBACG,sBACC,qBACI,iBACR,kBAAoB,CAGtB,uCACE,cACA,eACA,wBACA,kBACA,4BACA,0BACG,uBACH,kBAAoB,CAGtB,wCACE,OAAS,CAGX,8CACE,8BACA,6BACA,WACA,qBACA,WACA,oBACA,kBACA,6BACI,iCACI,yBACR,SAAW,CAGb,sCACE,iBAAmB,CAGrB,iFAEE,sBACA,6BACA,SACA,OACA,gBACA,kBACA,kBACA,QACA,QAAU,CAGZ,2CACE,eAAiB,CAGnB,yHAEE,YAAc,CAGhB,6CACE,eACA,oBAAsB,CAGxB,mDACE,yBAA2B,CAG7B,wDACE,cAAgB,CAGlB,uDACE,iBAAmB,CAGrB,kCACE,aAAe,CAGjB,wCACE,gCACA,WACA,eACA,eACA,wBACA,gBACA,mBACA,sBACA,eACA,yBACG,sBACC,qBACI,gBAAkB,CAG5B,uCACE,cACA,UAAY,CAGd,6BACE,aAAe,CAGjB,+BACE,aAAe,CAGjB,gCACE,aAAe,CAGjB,6CACE,WACA,gBACA,gBACA,0BACG,sBAAwB,CAG7B,gCACE,aAAe,CAGjB,8BACE,aAAe,CAGjB,yBACE,cACA,eAAiB,CAGnB,mKAGE,gBACA,cAAgB,CAGlB,6DACE,YAAc,CAGhB,uCACE,aAAe,CAGjB,qCACE,mBACA,yCACQ,iCACR,cACA,iBACA,gBACA,gBACA,gBACA,YACA,iBAAmB,CAGrB,4CACE,sBACA,cACA,eACA,cACA,cACA,gBACA,mBACA,cACA,mBACA,yBACA,yBACG,sBACC,qBACI,gBAAkB,CAG5B,kDACE,YAAc,CAGhB,iDACE,eAAiB,CAGnB,8BACE,2BACA,cACA,kBACA,sBACA,kBACA,sBACA,WACA,8BACQ,sBACR,mBACA,WACA,cAAgB,CAGlB,gCACE,gCACA,cACA,eACA,0BACA,iBAAmB,CAGrB,uCACE,gBAEA,cACA,eAEA,SACA,6BACI,iCACI,wBAA0B,CAOpC,yFAdE,eAGA,kBAKA,yBACG,sBACC,qBACI,gBAAkB,CAiB3B,kDAbC,yBACA,mBACA,WAEA,eACA,oBAEA,UACA,OAAS,CAOX,wDACE,wBAA0B,CAG5B,sCACE,YACA,8BACQ,sBACR,eACA,aACA,0BACA,UAAY,CAGd,qCACE,gBACA,OACA,mBACA,WACA,kBACA,QACA,kBACA,yBACA,QACA,+BACI,mCACI,0BAA8B,CAExC,uBACE,WACA,eACA,kBACA,eACA,mFAAwF,CAE1F,uBACE,UAAY,CAEd,0DAEE,cAAgB,CAElB,kCACE,eAAiB,CAEnB,oCACE,eAAiB,CAEnB,kFAEE,kEACA,SAAW,CAGb,wCACE,sBACI,mBACJ,oBACA,aACA,eACA,gBACA,0BACG,uBACH,mBACA,SACA,YACA,+BAAiC,CAGnC,iDACE,mBACA,eAAiB,CAGnB,4CACE,oBACI,YACJ,cAAgB,CAGlB,8CACE,cAAgB,CAGlB,2DACE,oBACI,YACJ,gBACA,0BACG,sBAAwB,CAC5B,iBACC,gBACA,kBACA,6CACQ,qCACR,8BACQ,sBACR,WACA,qJAaA,eACA,iBACA,gBACA,gBACA,UACA,gBACA,YACA,eACA,gCACA,2BACA,wBACA,UAAY,CAGd,8BACE,YAAc,CAGhB,6BACE,eAAiB,CAGnB,mBACE,YAAc,CAGhB,mCACE,WACA,iBACA,eACA,gBACA,eAAiB,CAGnB,mCACE,mBACA,gDACQ,wCACR,cACA,iBACA,YACA,eACA,gBACA,gBACA,WAAa,CAGf,yCACE,cACA,eACA,cACA,cACA,gBACA,mBACA,cACA,mBACA,yBACA,yBACG,sBACC,qBACI,gBAAkB,CAG5B,2CACE,YAAc,CAGhB,mBACE,oBAAsB,CAGxB,yBACE,yBAA2B,CAG7B,4BACE,aAAe,CAGjB,6BACE,aAAe,CAGjB,6BACE,aAAe,CAGjB,2BACE,aAAe,CAGjB,iCACE,aAAe,CAEjB,uBACE,0BACA,cAAgB,CAGlB,yBACE,UAAY,CAGd,yBACE,gCACA,8BACA,sBACA,eACA,sBACA,eACA,gBACA,UACA,gBACA,gBACA,eACA,+BACA,0BACA,uBACA,qBACA,WAAa,CAGf,0DACE,2BACA,0BAA4B,CAG9B,4BACE,kTAEC,CAGH,8BACE,8UAAgV,CAGlV,8DACE,wBACA,4BACA,eACA,qBACA,YACA,kBACA,sBACA,UAAY,CAGd,gEACE,wBACA,4BACA,iBAAmB,CAGrB,6DACE,kTAAoT,CAGtT,iEACE,sWAAwW,CAG1W,iCACE,uNACA,8BACA,4BACA,WAAa,WAAa,CAE5B,uCACE,YACA,SACA,kBACA,QACA,mCACI,uCACI,+BACR,WACA,UAAY,CAGd,6BACE,+CACQ,uCACR,2CACA,yCACA,mBACA,0CACA,uCACA,qBACA,YACA,kBACA,sBACA,UAAY,CAGd,4BACE,GAAO,+BAAiC,sBAAwB,CAChE,GAAK,iCAAmC,wBAA0B,CAAE,CAGtE,oBACE,GAAO,+BAAiC,sBAAwB,CAChE,GAAK,iCAAmC,wBAA0B,CAAE,CAEtE,kBACE,gBACA,6CACQ,qCACR,kEACA,eACA,gBACA,iBACA,SACA,kBACA,gBACA,gBACA,UACA,kBACA,UAAY,CAGd,iBACE,6BACA,cACA,eACA,SACA,gBACA,gBACA,gBACA,eAAiB,CAGnB,0BACE,sBACA,sBACA,UAAa,CAGf,6BACE,4BACA,gBACA,gBACA,kBACA,SAAW,CAGb,yCACE,+BACA,gBACA,kBAAoB,CAGtB,6BACE,mBACA,gDACQ,wCACR,cACA,qJAaA,eACA,iBACA,eACA,gBACA,gBACA,WAAa,CAGf,gDACE,cACA,eACA,cACA,cACA,gBACA,mBACA,cACA,mBACA,yBACA,yBACG,sBACC,qBACI,gBAAkB,CAG5B,kDACE,YAAc,CAGhB,yCACE,eAAiB,CC/sDnB,aACI,oBACA,aACA,aACI,QAAU,CAGlB,sBACI,mBACA,eAAiB,CCTrB,oCACE,kBACA,eACA,sBAAwB,CAE1B,0CACE,aAAe","file":"static/css/main.aafb6422.css","sourcesContent":[".graphiql-container,\n.graphiql-container button,\n.graphiql-container input {\n color: #141823;\n font-family:\n system,\n -apple-system,\n 'San Francisco',\n '.SFNSDisplay-Regular',\n 'Segoe UI',\n Segoe,\n 'Segoe WP',\n 'Helvetica Neue',\n helvetica,\n 'Lucida Grande',\n arial,\n sans-serif;\n font-size: 14px;\n}\n\n.graphiql-container {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n height: 100%;\n margin: 0;\n overflow: hidden;\n width: 100%;\n}\n\n.graphiql-container .editorWrap {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n -ms-flex: 1 1;\n flex: 1 1;\n overflow-x: hidden;\n}\n\n.graphiql-container .title {\n font-size: 18px;\n}\n\n.graphiql-container .title em {\n font-family: georgia;\n font-size: 19px;\n}\n\n.graphiql-container .topBarWrap {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n\n.graphiql-container .topBar {\n -ms-flex-align: center;\n align-items: center;\n background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#e2e2e2));\n background: -webkit-linear-gradient(#f7f7f7, #e2e2e2);\n background: -o-linear-gradient(#f7f7f7, #e2e2e2);\n background: linear-gradient(#f7f7f7, #e2e2e2);\n border-bottom: 1px solid #d0d0d0;\n cursor: default;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex: 1 1;\n flex: 1 1;\n height: 34px;\n overflow-y: visible;\n padding: 7px 14px 6px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.graphiql-container .toolbar {\n overflow-x: visible;\n display: -ms-flexbox;\n display: flex;\n}\n\n.graphiql-container .docExplorerShow,\n.graphiql-container .historyShow {\n background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#e2e2e2));\n background: -webkit-linear-gradient(#f7f7f7, #e2e2e2);\n background: -o-linear-gradient(#f7f7f7, #e2e2e2);\n background: linear-gradient(#f7f7f7, #e2e2e2);\n border-radius: 0;\n border-bottom: 1px solid #d0d0d0;\n border-right: none;\n border-top: none;\n color: #3B5998;\n cursor: pointer;\n font-size: 14px;\n margin: 0;\n outline: 0;\n padding: 2px 20px 0 18px;\n}\n\n.graphiql-container .docExplorerShow {\n border-left: 1px solid rgba(0, 0, 0, 0.2);\n}\n\n.graphiql-container .historyShow {\n border-right: 1px solid rgba(0, 0, 0, 0.2);\n border-left: 0;\n}\n\n.graphiql-container .docExplorerShow:before {\n border-left: 2px solid #3B5998;\n border-top: 2px solid #3B5998;\n content: '';\n display: inline-block;\n height: 9px;\n margin: 0 3px -1px 0;\n position: relative;\n -ms-transform: rotate(-45deg);\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n width: 9px;\n}\n\n.graphiql-container .editorBar {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex: 1 1;\n flex: 1 1;\n}\n\n.graphiql-container .queryWrap {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n -ms-flex: 1 1;\n flex: 1 1;\n}\n\n.graphiql-container .resultWrap {\n border-left: solid 1px #e0e0e0;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n -ms-flex: 1 1;\n flex: 1 1;\n position: relative;\n}\n\n.graphiql-container .docExplorerWrap,\n.graphiql-container .historyPaneWrap {\n background: white;\n -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 3;\n}\n\n.graphiql-container .historyPaneWrap {\n min-width: 230px;\n z-index: 5;\n}\n\n.graphiql-container .docExplorerResizer {\n cursor: col-resize;\n height: 100%;\n left: -5px;\n position: absolute;\n top: 0;\n width: 10px;\n z-index: 10;\n}\n\n.graphiql-container .docExplorerHide {\n cursor: pointer;\n font-size: 18px;\n margin: -7px -8px -6px 0;\n padding: 18px 16px 15px 12px;\n}\n\n.graphiql-container div .query-editor {\n -ms-flex: 1 1;\n flex: 1 1;\n position: relative;\n}\n\n.graphiql-container .variable-editor {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n height: 30px;\n position: relative;\n}\n\n.graphiql-container .variable-editor-title {\n background: #eeeeee;\n border-bottom: 1px solid #d6d6d6;\n border-top: 1px solid #e0e0e0;\n color: #777;\n font-variant: small-caps;\n font-weight: bold;\n letter-spacing: 1px;\n line-height: 14px;\n padding: 6px 0 8px 43px;\n text-transform: lowercase;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.graphiql-container .codemirrorWrap {\n -ms-flex: 1 1;\n flex: 1 1;\n height: 100%;\n position: relative;\n}\n\n.graphiql-container .result-window {\n -ms-flex: 1 1;\n flex: 1 1;\n height: 100%;\n position: relative;\n}\n\n.graphiql-container .footer {\n background: #f6f7f8;\n border-left: 1px solid #e0e0e0;\n border-top: 1px solid #e0e0e0;\n margin-left: 12px;\n position: relative;\n}\n\n.graphiql-container .footer:before {\n background: #eeeeee;\n bottom: 0;\n content: \" \";\n left: -13px;\n position: absolute;\n top: -1px;\n width: 12px;\n}\n\n/* No `.graphiql-container` here so themes can overwrite */\n.result-window .CodeMirror {\n background: #f6f7f8;\n}\n\n.graphiql-container .result-window .CodeMirror-gutters {\n background-color: #eeeeee;\n border-color: #e0e0e0;\n cursor: col-resize;\n}\n\n.graphiql-container .result-window .CodeMirror-foldgutter,\n.graphiql-container .result-window .CodeMirror-foldgutter-open:after,\n.graphiql-container .result-window .CodeMirror-foldgutter-folded:after {\n padding-left: 3px;\n}\n\n.graphiql-container .toolbar-button {\n background: #fdfdfd;\n background: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));\n background: -webkit-linear-gradient(#f9f9f9, #ececec);\n background: -o-linear-gradient(#f9f9f9, #ececec);\n background: linear-gradient(#f9f9f9, #ececec);\n border-radius: 3px;\n -webkit-box-shadow:\n inset 0 0 0 1px rgba(0,0,0,0.20),\n 0 1px 0 rgba(255,255,255, 0.7),\n inset 0 1px #fff;\n box-shadow:\n inset 0 0 0 1px rgba(0,0,0,0.20),\n 0 1px 0 rgba(255,255,255, 0.7),\n inset 0 1px #fff;\n color: #555;\n cursor: pointer;\n display: inline-block;\n margin: 0 5px;\n padding: 3px 11px 5px;\n text-decoration: none;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 150px;\n}\n\n.graphiql-container .toolbar-button:active {\n background: -webkit-gradient(linear, left top, left bottom, from(#ececec), to(#d5d5d5));\n background: -webkit-linear-gradient(#ececec, #d5d5d5);\n background: -o-linear-gradient(#ececec, #d5d5d5);\n background: linear-gradient(#ececec, #d5d5d5);\n -webkit-box-shadow:\n 0 1px 0 rgba(255, 255, 255, 0.7),\n inset 0 0 0 1px rgba(0,0,0,0.10),\n inset 0 1px 1px 1px rgba(0, 0, 0, 0.12),\n inset 0 0 5px rgba(0, 0, 0, 0.1);\n box-shadow:\n 0 1px 0 rgba(255, 255, 255, 0.7),\n inset 0 0 0 1px rgba(0,0,0,0.10),\n inset 0 1px 1px 1px rgba(0, 0, 0, 0.12),\n inset 0 0 5px rgba(0, 0, 0, 0.1);\n}\n\n.graphiql-container .toolbar-button.error {\n background: -webkit-gradient(linear, left top, left bottom, from(#fdf3f3), to(#e6d6d7));\n background: -webkit-linear-gradient(#fdf3f3, #e6d6d7);\n background: -o-linear-gradient(#fdf3f3, #e6d6d7);\n background: linear-gradient(#fdf3f3, #e6d6d7);\n color: #b00;\n}\n\n.graphiql-container .toolbar-button-group {\n margin: 0 5px;\n white-space: nowrap;\n}\n\n.graphiql-container .toolbar-button-group > * {\n margin: 0;\n}\n\n.graphiql-container .toolbar-button-group > *:not(:last-child) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.graphiql-container .toolbar-button-group > *:not(:first-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px;\n}\n\n.graphiql-container .execute-button-wrap {\n height: 34px;\n margin: 0 14px 0 28px;\n position: relative;\n}\n\n.graphiql-container .execute-button {\n background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#d2d3d6));\n background: -webkit-linear-gradient(#fdfdfd, #d2d3d6);\n background: -o-linear-gradient(#fdfdfd, #d2d3d6);\n background: linear-gradient(#fdfdfd, #d2d3d6);\n border-radius: 17px;\n border: 1px solid rgba(0,0,0,0.25);\n -webkit-box-shadow: 0 1px 0 #fff;\n box-shadow: 0 1px 0 #fff;\n cursor: pointer;\n fill: #444;\n height: 34px;\n margin: 0;\n padding: 0;\n width: 34px;\n}\n\n.graphiql-container .execute-button svg {\n pointer-events: none;\n}\n\n.graphiql-container .execute-button:active {\n background: -webkit-gradient(linear, left top, left bottom, from(#e6e6e6), to(#c3c3c3));\n background: -webkit-linear-gradient(#e6e6e6, #c3c3c3);\n background: -o-linear-gradient(#e6e6e6, #c3c3c3);\n background: linear-gradient(#e6e6e6, #c3c3c3);\n -webkit-box-shadow:\n 0 1px 0 #fff,\n inset 0 0 2px rgba(0, 0, 0, 0.2),\n inset 0 0 6px rgba(0, 0, 0, 0.1);\n box-shadow:\n 0 1px 0 #fff,\n inset 0 0 2px rgba(0, 0, 0, 0.2),\n inset 0 0 6px rgba(0, 0, 0, 0.1);\n}\n\n.graphiql-container .execute-button:focus {\n outline: 0;\n}\n\n.graphiql-container .toolbar-menu,\n.graphiql-container .toolbar-select {\n position: relative;\n}\n\n.graphiql-container .execute-options,\n.graphiql-container .toolbar-menu-items,\n.graphiql-container .toolbar-select-options {\n background: #fff;\n -webkit-box-shadow:\n 0 0 0 1px rgba(0,0,0,0.1),\n 0 2px 4px rgba(0,0,0,0.25);\n box-shadow:\n 0 0 0 1px rgba(0,0,0,0.1),\n 0 2px 4px rgba(0,0,0,0.25);\n margin: 0;\n padding: 6px 0;\n position: absolute;\n z-index: 100;\n}\n\n.graphiql-container .execute-options {\n min-width: 100px;\n top: 37px;\n left: -1px;\n}\n\n.graphiql-container .toolbar-menu-items {\n left: 1px;\n margin-top: -1px;\n min-width: 110%;\n top: 100%;\n visibility: hidden;\n}\n\n.graphiql-container .toolbar-menu-items.open {\n visibility: visible;\n}\n\n.graphiql-container .toolbar-select-options {\n left: 0;\n min-width: 100%;\n top: -5px;\n visibility: hidden;\n}\n\n.graphiql-container .toolbar-select-options.open {\n visibility: visible;\n}\n\n.graphiql-container .execute-options > li,\n.graphiql-container .toolbar-menu-items > li,\n.graphiql-container .toolbar-select-options > li {\n cursor: pointer;\n display: block;\n margin: none;\n max-width: 300px;\n overflow: hidden;\n padding: 2px 20px 4px 11px;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.graphiql-container .execute-options > li.selected,\n.graphiql-container .toolbar-menu-items > li.hover,\n.graphiql-container .toolbar-menu-items > li:active,\n.graphiql-container .toolbar-menu-items > li:hover,\n.graphiql-container .toolbar-select-options > li.hover,\n.graphiql-container .toolbar-select-options > li:active,\n.graphiql-container .toolbar-select-options > li:hover,\n.graphiql-container .history-contents > p:hover,\n.graphiql-container .history-contents > p:active {\n background: #e10098;\n color: #fff;\n}\n\n.graphiql-container .toolbar-select-options > li > svg {\n display: inline;\n fill: #666;\n margin: 0 -6px 0 6px;\n pointer-events: none;\n vertical-align: middle;\n}\n\n.graphiql-container .toolbar-select-options > li.hover > svg,\n.graphiql-container .toolbar-select-options > li:active > svg,\n.graphiql-container .toolbar-select-options > li:hover > svg {\n fill: #fff;\n}\n\n.graphiql-container .CodeMirror-scroll {\n overflow-scrolling: touch;\n}\n\n.graphiql-container .CodeMirror {\n color: #141823;\n font-family:\n 'Consolas',\n 'Inconsolata',\n 'Droid Sans Mono',\n 'Monaco',\n monospace;\n font-size: 13px;\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n}\n\n.graphiql-container .CodeMirror-lines {\n padding: 20px 0;\n}\n\n.CodeMirror-hint-information .content {\n box-orient: vertical;\n color: #141823;\n display: -ms-flexbox;\n display: flex;\n font-family: system, -apple-system, 'San Francisco', '.SFNSDisplay-Regular', 'Segoe UI', Segoe, 'Segoe WP', 'Helvetica Neue', helvetica, 'Lucida Grande', arial, sans-serif;\n font-size: 13px;\n line-clamp: 3;\n line-height: 16px;\n max-height: 48px;\n overflow: hidden;\n -o-text-overflow: -o-ellipsis-lastline;\n text-overflow: -o-ellipsis-lastline;\n}\n\n.CodeMirror-hint-information .content p:first-child {\n margin-top: 0;\n}\n\n.CodeMirror-hint-information .content p:last-child {\n margin-bottom: 0;\n}\n\n.CodeMirror-hint-information .infoType {\n color: #CA9800;\n cursor: pointer;\n display: inline;\n margin-right: 0.5em;\n}\n\n.autoInsertedLeaf.cm-property {\n -webkit-animation-duration: 6s;\n animation-duration: 6s;\n -webkit-animation-name: insertionFade;\n animation-name: insertionFade;\n border-bottom: 2px solid rgba(255, 255, 255, 0);\n border-radius: 2px;\n margin: -2px -4px -1px;\n padding: 2px 4px 1px;\n}\n\n@-webkit-keyframes insertionFade {\n from, to {\n background: rgba(255, 255, 255, 0);\n border-color: rgba(255, 255, 255, 0);\n }\n\n 15%, 85% {\n background: #fbffc9;\n border-color: #f0f3c0;\n }\n}\n\n@keyframes insertionFade {\n from, to {\n background: rgba(255, 255, 255, 0);\n border-color: rgba(255, 255, 255, 0);\n }\n\n 15%, 85% {\n background: #fbffc9;\n border-color: #f0f3c0;\n }\n}\n\ndiv.CodeMirror-lint-tooltip {\n background-color: white;\n border-radius: 2px;\n border: 0;\n color: #141823;\n -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);\n font-size: 13px;\n line-height: 16px;\n max-width: 430px;\n opacity: 0;\n padding: 8px 10px;\n -webkit-transition: opacity 0.15s;\n -o-transition: opacity 0.15s;\n transition: opacity 0.15s;\n white-space: pre-wrap;\n}\n\ndiv.CodeMirror-lint-tooltip > * {\n padding-left: 23px;\n}\n\ndiv.CodeMirror-lint-tooltip > * + * {\n margin-top: 12px;\n}\n\n/* COLORS */\n\n.graphiql-container .CodeMirror-foldmarker {\n border-radius: 4px;\n background: #08f;\n background: -webkit-gradient(linear, left top, left bottom, from(#43A8FF), to(#0F83E8));\n background: -webkit-linear-gradient(#43A8FF, #0F83E8);\n background: -o-linear-gradient(#43A8FF, #0F83E8);\n background: linear-gradient(#43A8FF, #0F83E8);\n -webkit-box-shadow:\n 0 1px 1px rgba(0, 0, 0, 0.2),\n inset 0 0 0 1px rgba(0, 0, 0, 0.1);\n box-shadow:\n 0 1px 1px rgba(0, 0, 0, 0.2),\n inset 0 0 0 1px rgba(0, 0, 0, 0.1);\n color: white;\n font-family: arial;\n font-size: 12px;\n line-height: 0;\n margin: 0 3px;\n padding: 0px 4px 1px;\n text-shadow: 0 -1px rgba(0, 0, 0, 0.1);\n}\n\n.graphiql-container div.CodeMirror span.CodeMirror-matchingbracket {\n color: #555;\n text-decoration: underline;\n}\n\n.graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket {\n color: #f00;\n}\n\n/* Comment */\n.cm-comment {\n color: #999;\n}\n\n/* Punctuation */\n.cm-punctuation {\n color: #555;\n}\n\n/* Keyword */\n.cm-keyword {\n color: #B11A04;\n}\n\n/* OperationName, FragmentName */\n.cm-def {\n color: #D2054E;\n}\n\n/* FieldName */\n.cm-property {\n color: #1F61A0;\n}\n\n/* FieldAlias */\n.cm-qualifier {\n color: #1C92A9;\n}\n\n/* ArgumentName and ObjectFieldName */\n.cm-attribute {\n color: #8B2BB9;\n}\n\n/* Number */\n.cm-number {\n color: #2882F9;\n}\n\n/* String */\n.cm-string {\n color: #D64292;\n}\n\n/* Boolean */\n.cm-builtin {\n color: #D47509;\n}\n\n/* EnumValue */\n.cm-string-2 {\n color: #0B7FC7;\n}\n\n/* Variable */\n.cm-variable {\n color: #397D13;\n}\n\n/* Directive */\n.cm-meta {\n color: #B33086;\n}\n\n/* Type */\n.cm-atom {\n color: #CA9800;\n}\n/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n color: black;\n font-family: monospace;\n height: 300px;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre {\n padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n color: #999;\n min-width: 20px;\n padding: 0 3px 0 5px;\n text-align: right;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror .CodeMirror-cursor {\n border-left: 1px solid black;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver;\n}\n.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {\n background: #7e7;\n border: 0;\n width: auto;\n}\n.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1;\n}\n\n.cm-animate-fat-cursor {\n -webkit-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite;\n border: 0;\n width: auto;\n}\n@-webkit-keyframes blink {\n 0% { background: #7e7; }\n 50% { background: none; }\n 100% { background: #7e7; }\n}\n@keyframes blink {\n 0% { background: #7e7; }\n 50% { background: none; }\n 100% { background: #7e7; }\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\ndiv.CodeMirror-overwrite div.CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3 {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n background: white;\n overflow: hidden;\n position: relative;\n}\n\n.CodeMirror-scroll {\n height: 100%;\n /* 30px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -30px; margin-right: -30px;\n outline: none; /* Prevent dragging from highlighting the element */\n overflow: scroll !important; /* Things will break if this is overridden */\n padding-bottom: 30px;\n position: relative;\n}\n.CodeMirror-sizer {\n border-right: 30px solid transparent;\n position: relative;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n display: none;\n position: absolute;\n z-index: 6;\n}\n.CodeMirror-vscrollbar {\n overflow-x: hidden;\n overflow-y: scroll;\n right: 0; top: 0;\n}\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-x: scroll;\n overflow-y: hidden;\n}\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n min-height: 100%;\n position: absolute; left: 0; top: 0;\n z-index: 3;\n}\n.CodeMirror-gutter {\n display: inline-block;\n height: 100%;\n margin-bottom: -30px;\n vertical-align: top;\n white-space: normal;\n /* Hack to make IE7 behave */\n *zoom:1;\n *display:inline;\n}\n.CodeMirror-gutter-wrapper {\n background: none !important;\n border: none !important;\n position: absolute;\n z-index: 4;\n}\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n.CodeMirror-gutter-elt {\n cursor: default;\n position: absolute;\n z-index: 4;\n}\n.CodeMirror-gutter-wrapper {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre {\n -webkit-tap-highlight-color: transparent;\n /* Reset some styles that the rest of the page might have set */\n background: transparent;\n border-radius: 0;\n border-width: 0;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n line-height: inherit;\n margin: 0;\n overflow: visible;\n position: relative;\n white-space: pre;\n word-wrap: normal;\n z-index: 2;\n}\n.CodeMirror-wrap pre {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n overflow: auto;\n position: relative;\n z-index: 2;\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n height: 0;\n overflow: hidden;\n position: absolute;\n visibility: hidden;\n width: 100%;\n}\n\n.CodeMirror-cursor { position: absolute; }\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n position: relative;\n visibility: hidden;\n z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background: #ffa;\n background: rgba(255, 255, 0, .4);\n}\n\n/* IE7 hack to prevent it from returning funny offsetTops on the spans */\n.CodeMirror span { *vertical-align: text-bottom; }\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n\n.CodeMirror-dialog {\n background: inherit;\n color: inherit;\n left: 0; right: 0;\n overflow: hidden;\n padding: .1em .8em;\n position: absolute;\n z-index: 15;\n}\n\n.CodeMirror-dialog-top {\n border-bottom: 1px solid #eee;\n top: 0;\n}\n\n.CodeMirror-dialog-bottom {\n border-top: 1px solid #eee;\n bottom: 0;\n}\n\n.CodeMirror-dialog input {\n background: transparent;\n border: 1px solid #d3d6db;\n color: inherit;\n font-family: monospace;\n outline: none;\n width: 20em;\n}\n\n.CodeMirror-dialog button {\n font-size: 70%;\n}\n.graphiql-container .doc-explorer {\n background: white;\n}\n\n.graphiql-container .doc-explorer-title-bar,\n.graphiql-container .history-title-bar {\n cursor: default;\n display: -ms-flexbox;\n display: flex;\n height: 34px;\n line-height: 14px;\n padding: 8px 8px 5px;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.graphiql-container .doc-explorer-title,\n.graphiql-container .history-title {\n -ms-flex: 1 1;\n flex: 1 1;\n font-weight: bold;\n overflow-x: hidden;\n padding: 10px 0 10px 10px;\n text-align: center;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n white-space: nowrap;\n}\n\n.graphiql-container .doc-explorer-back {\n color: #3B5998;\n cursor: pointer;\n margin: -7px 0 -6px -8px;\n overflow-x: hidden;\n padding: 17px 12px 16px 16px;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.doc-explorer-narrow .doc-explorer-back {\n width: 0;\n}\n\n.graphiql-container .doc-explorer-back:before {\n border-left: 2px solid #3B5998;\n border-top: 2px solid #3B5998;\n content: '';\n display: inline-block;\n height: 9px;\n margin: 0 3px -1px 0;\n position: relative;\n -ms-transform: rotate(-45deg);\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n width: 9px;\n}\n\n.graphiql-container .doc-explorer-rhs {\n position: relative;\n}\n\n.graphiql-container .doc-explorer-contents,\n.graphiql-container .history-contents {\n background-color: #ffffff;\n border-top: 1px solid #d6d6d6;\n bottom: 0;\n left: 0;\n overflow-y: auto;\n padding: 20px 15px;\n position: absolute;\n right: 0;\n top: 47px;\n}\n\n.graphiql-container .doc-explorer-contents {\n min-width: 300px;\n}\n\n.graphiql-container .doc-type-description p:first-child ,\n.graphiql-container .doc-type-description blockquote:first-child {\n margin-top: 0;\n}\n\n.graphiql-container .doc-explorer-contents a {\n cursor: pointer;\n text-decoration: none;\n}\n\n.graphiql-container .doc-explorer-contents a:hover {\n text-decoration: underline;\n}\n\n.graphiql-container .doc-value-description > :first-child {\n margin-top: 4px;\n}\n\n.graphiql-container .doc-value-description > :last-child {\n margin-bottom: 4px;\n}\n\n.graphiql-container .doc-category {\n margin: 20px 0;\n}\n\n.graphiql-container .doc-category-title {\n border-bottom: 1px solid #e0e0e0;\n color: #777;\n cursor: default;\n font-size: 14px;\n font-variant: small-caps;\n font-weight: bold;\n letter-spacing: 1px;\n margin: 0 -15px 10px 0;\n padding: 10px 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.graphiql-container .doc-category-item {\n margin: 12px 0;\n color: #555;\n}\n\n.graphiql-container .keyword {\n color: #B11A04;\n}\n\n.graphiql-container .type-name {\n color: #CA9800;\n}\n\n.graphiql-container .field-name {\n color: #1F61A0;\n}\n\n.graphiql-container .field-short-description {\n color: #999;\n margin-left: 5px;\n overflow: hidden;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n}\n\n.graphiql-container .enum-value {\n color: #0B7FC7;\n}\n\n.graphiql-container .arg-name {\n color: #8B2BB9;\n}\n\n.graphiql-container .arg {\n display: block;\n margin-left: 1em;\n}\n\n.graphiql-container .arg:first-child:last-child,\n.graphiql-container .arg:first-child:nth-last-child(2),\n.graphiql-container .arg:first-child:nth-last-child(2) ~ .arg {\n display: inherit;\n margin: inherit;\n}\n\n.graphiql-container .arg:first-child:nth-last-child(2):after {\n content: ', ';\n}\n\n.graphiql-container .arg-default-value {\n color: #43A047;\n}\n\n.graphiql-container .doc-deprecation {\n background: #fffae8;\n -webkit-box-shadow: inset 0 0 1px #bfb063;\n box-shadow: inset 0 0 1px #bfb063;\n color: #867F70;\n line-height: 16px;\n margin: 8px -8px;\n max-height: 80px;\n overflow: hidden;\n padding: 8px;\n border-radius: 3px;\n}\n\n.graphiql-container .doc-deprecation:before {\n content: 'Deprecated:';\n color: #c79b2e;\n cursor: default;\n display: block;\n font-size: 9px;\n font-weight: bold;\n letter-spacing: 1px;\n line-height: 1;\n padding-bottom: 5px;\n text-transform: uppercase;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.graphiql-container .doc-deprecation > :first-child {\n margin-top: 0;\n}\n\n.graphiql-container .doc-deprecation > :last-child {\n margin-bottom: 0;\n}\n\n.graphiql-container .show-btn {\n -webkit-appearance: initial;\n display: block;\n border-radius: 3px;\n border: solid 1px #ccc;\n text-align: center;\n padding: 8px 12px 10px;\n width: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background: #fbfcfc;\n color: #555;\n cursor: pointer;\n}\n\n.graphiql-container .search-box {\n border-bottom: 1px solid #d3d6db;\n display: block;\n font-size: 14px;\n margin: -15px -15px 12px 0;\n position: relative;\n}\n\n.graphiql-container .search-box:before {\n content: '\\26b2';\n cursor: pointer;\n display: block;\n font-size: 24px;\n position: absolute;\n top: -2px;\n -ms-transform: rotate(-45deg);\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.graphiql-container .search-box .search-box-clear {\n background-color: #d0d0d0;\n border-radius: 12px;\n color: #fff;\n cursor: pointer;\n font-size: 11px;\n padding: 1px 5px 2px;\n position: absolute;\n right: 3px;\n top: 8px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.graphiql-container .search-box .search-box-clear:hover {\n background-color: #b9b9b9;\n}\n\n.graphiql-container .search-box > input {\n border: none;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-size: 14px;\n outline: none;\n padding: 6px 24px 8px 20px;\n width: 100%;\n}\n\n.graphiql-container .error-container {\n font-weight: bold;\n left: 0;\n letter-spacing: 1px;\n opacity: 0.5;\n position: absolute;\n right: 0;\n text-align: center;\n text-transform: uppercase;\n top: 50%;\n -ms-transform: translate(0, -50%);\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n}\n.CodeMirror-foldmarker {\n color: blue;\n cursor: pointer;\n font-family: arial;\n line-height: .3;\n text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;\n}\n.CodeMirror-foldgutter {\n width: .7em;\n}\n.CodeMirror-foldgutter-open,\n.CodeMirror-foldgutter-folded {\n cursor: pointer;\n}\n.CodeMirror-foldgutter-open:after {\n content: \"\\25BE\";\n}\n.CodeMirror-foldgutter-folded:after {\n content: \"\\25B8\";\n}\n.graphiql-container .history-contents,\n.graphiql-container .history-contents input {\n font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace;\n padding: 0;\n}\n\n.graphiql-container .history-contents p {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n font-size: 12px;\n overflow: hidden;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: 0;\n padding: 8px;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.graphiql-container .history-contents p.editable {\n padding-bottom: 6px;\n padding-top: 7px;\n}\n\n.graphiql-container .history-contents input {\n -ms-flex-positive: 1;\n flex-grow: 1;\n font-size: 12px;\n}\n\n.graphiql-container .history-contents p:hover {\n cursor: pointer;\n}\n\n.graphiql-container .history-contents p span.history-label {\n -ms-flex-positive: 1;\n flex-grow: 1;\n overflow: hidden;\n -o-text-overflow: ellipsis;\n text-overflow: ellipsis;\n}.CodeMirror-info {\n background: white;\n border-radius: 2px;\n -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #555;\n font-family:\n system,\n -apple-system,\n 'San Francisco',\n '.SFNSDisplay-Regular',\n 'Segoe UI',\n Segoe,\n 'Segoe WP',\n 'Helvetica Neue',\n helvetica,\n 'Lucida Grande',\n arial,\n sans-serif;\n font-size: 13px;\n line-height: 16px;\n margin: 8px -8px;\n max-width: 400px;\n opacity: 0;\n overflow: hidden;\n padding: 8px 8px;\n position: fixed;\n -webkit-transition: opacity 0.15s;\n -o-transition: opacity 0.15s;\n transition: opacity 0.15s;\n z-index: 50;\n}\n\n.CodeMirror-info :first-child {\n margin-top: 0;\n}\n\n.CodeMirror-info :last-child {\n margin-bottom: 0;\n}\n\n.CodeMirror-info p {\n margin: 1em 0;\n}\n\n.CodeMirror-info .info-description {\n color: #777;\n line-height: 16px;\n margin-top: 1em;\n max-height: 80px;\n overflow: hidden;\n}\n\n.CodeMirror-info .info-deprecation {\n background: #fffae8;\n -webkit-box-shadow: inset 0 1px 1px -1px #bfb063;\n box-shadow: inset 0 1px 1px -1px #bfb063;\n color: #867F70;\n line-height: 16px;\n margin: -8px;\n margin-top: 8px;\n max-height: 80px;\n overflow: hidden;\n padding: 8px;\n}\n\n.CodeMirror-info .info-deprecation-label {\n color: #c79b2e;\n cursor: default;\n display: block;\n font-size: 9px;\n font-weight: bold;\n letter-spacing: 1px;\n line-height: 1;\n padding-bottom: 5px;\n text-transform: uppercase;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.CodeMirror-info .info-deprecation-label + * {\n margin-top: 0;\n}\n\n.CodeMirror-info a {\n text-decoration: none;\n}\n\n.CodeMirror-info a:hover {\n text-decoration: underline;\n}\n\n.CodeMirror-info .type-name {\n color: #CA9800;\n}\n\n.CodeMirror-info .field-name {\n color: #1F61A0;\n}\n\n.CodeMirror-info .enum-value {\n color: #0B7FC7;\n}\n\n.CodeMirror-info .arg-name {\n color: #8B2BB9;\n}\n\n.CodeMirror-info .directive-name {\n color: #B33086;\n}\n.CodeMirror-jump-token {\n text-decoration: underline;\n cursor: pointer;\n}\n/* The lint marker gutter */\n.CodeMirror-lint-markers {\n width: 16px;\n}\n\n.CodeMirror-lint-tooltip {\n background-color: infobackground;\n border-radius: 4px 4px 4px 4px;\n border: 1px solid black;\n color: infotext;\n font-family: monospace;\n font-size: 10pt;\n max-width: 600px;\n opacity: 0;\n overflow: hidden;\n padding: 2px 5px;\n position: fixed;\n -webkit-transition: opacity .4s;\n -o-transition: opacity .4s;\n transition: opacity .4s;\n white-space: pre-wrap;\n z-index: 100;\n}\n\n.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {\n background-position: left bottom;\n background-repeat: repeat-x;\n}\n\n.CodeMirror-lint-mark-error {\n background-image:\n url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==\")\n ;\n}\n\n.CodeMirror-lint-mark-warning {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {\n background-position: center center;\n background-repeat: no-repeat;\n cursor: pointer;\n display: inline-block;\n height: 16px;\n position: relative;\n vertical-align: middle;\n width: 16px;\n}\n\n.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {\n background-position: top left;\n background-repeat: no-repeat;\n padding-left: 18px;\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-multiple {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC\");\n background-position: right bottom;\n background-repeat: no-repeat;\n width: 100%; height: 100%;\n}\n.graphiql-container .spinner-container {\n height: 36px;\n left: 50%;\n position: absolute;\n top: 50%;\n -ms-transform: translate(-50%, -50%);\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 36px;\n z-index: 10;\n}\n\n.graphiql-container .spinner {\n -webkit-animation: rotation .6s infinite linear;\n animation: rotation .6s infinite linear;\n border-bottom: 6px solid rgba(150, 150, 150, .15);\n border-left: 6px solid rgba(150, 150, 150, .15);\n border-radius: 100%;\n border-right: 6px solid rgba(150, 150, 150, .15);\n border-top: 6px solid rgba(150, 150, 150, .8);\n display: inline-block;\n height: 24px;\n position: absolute;\n vertical-align: middle;\n width: 24px;\n}\n\n@-webkit-keyframes rotation {\n from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n to { -webkit-transform: rotate(359deg); transform: rotate(359deg); }\n}\n\n@keyframes rotation {\n from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }\n to { -webkit-transform: rotate(359deg); transform: rotate(359deg); }\n}\n.CodeMirror-hints {\n background: white;\n -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);\n font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace;\n font-size: 13px;\n list-style: none;\n margin-left: -6px;\n margin: 0;\n max-height: 14.5em;\n overflow-y: auto;\n overflow: hidden;\n padding: 0;\n position: absolute;\n z-index: 10;\n}\n\n.CodeMirror-hint {\n border-top: solid 1px #f7f7f7;\n color: #141823;\n cursor: pointer;\n margin: 0;\n max-width: 300px;\n overflow: hidden;\n padding: 2px 6px;\n white-space: pre;\n}\n\nli.CodeMirror-hint-active {\n background-color: #08f;\n border-top-color: white;\n color: white;\n}\n\n.CodeMirror-hint-information {\n border-top: solid 1px #c0c0c0;\n max-width: 300px;\n padding: 4px 6px;\n position: relative;\n z-index: 1;\n}\n\n.CodeMirror-hint-information:first-child {\n border-bottom: solid 1px #c0c0c0;\n border-top: none;\n margin-bottom: -1px;\n}\n\n.CodeMirror-hint-deprecation {\n background: #fffae8;\n -webkit-box-shadow: inset 0 1px 1px -1px #bfb063;\n box-shadow: inset 0 1px 1px -1px #bfb063;\n color: #867F70;\n font-family:\n system,\n -apple-system,\n 'San Francisco',\n '.SFNSDisplay-Regular',\n 'Segoe UI',\n Segoe,\n 'Segoe WP',\n 'Helvetica Neue',\n helvetica,\n 'Lucida Grande',\n arial,\n sans-serif;\n font-size: 13px;\n line-height: 16px;\n margin-top: 4px;\n max-height: 80px;\n overflow: hidden;\n padding: 6px;\n}\n\n.CodeMirror-hint-deprecation .deprecation-label {\n color: #c79b2e;\n cursor: default;\n display: block;\n font-size: 9px;\n font-weight: bold;\n letter-spacing: 1px;\n line-height: 1;\n padding-bottom: 5px;\n text-transform: uppercase;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.CodeMirror-hint-deprecation .deprecation-label + * {\n margin-top: 0;\n}\n\n.CodeMirror-hint-deprecation :last-child {\n margin-bottom: 0;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/graphiql/graphiql.css","#wp-graphiql {\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 1 1;\n flex: 1 1;\n}\n\n#wp-graphiql .spinner{\n visibility: visible;\n background: none;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app.css",".graphiql-code-exporter .CodeMirror {\n position: relative;\n font-size: 11px;\n background: transparent;\n}\n.graphiql-code-exporter .CodeMirror-lines {\n padding-top: 0;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/graphiql-code-exporter/CodeExporter.css"],"sourceRoot":""} -------------------------------------------------------------------------------- /assets/app/build/static/media/GraphQLLanguageService.js.5ab204b9.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | * 8 | * @flow 9 | */ 10 | 11 | import type { 12 | DocumentNode, 13 | FragmentSpreadNode, 14 | FragmentDefinitionNode, 15 | OperationDefinitionNode, 16 | TypeDefinitionNode, 17 | NamedTypeNode, 18 | } from 'graphql'; 19 | import type { 20 | CompletionItem, 21 | DefinitionQueryResult, 22 | Diagnostic, 23 | GraphQLCache, 24 | GraphQLConfig, 25 | GraphQLProjectConfig, 26 | Uri, 27 | } from 'graphql-language-service-types'; 28 | import type {Position} from 'graphql-language-service-utils'; 29 | import type {Hover} from 'vscode-languageserver-types'; 30 | 31 | import {Kind, parse, print} from 'graphql'; 32 | import {getAutocompleteSuggestions} from './getAutocompleteSuggestions'; 33 | import {getHoverInformation} from './getHoverInformation'; 34 | import {validateQuery, getRange, SEVERITY} from './getDiagnostics'; 35 | import { 36 | getDefinitionQueryResultForFragmentSpread, 37 | getDefinitionQueryResultForDefinitionNode, 38 | getDefinitionQueryResultForNamedType, 39 | } from './getDefinition'; 40 | import {getASTNodeAtPosition} from 'graphql-language-service-utils'; 41 | 42 | const { 43 | FRAGMENT_DEFINITION, 44 | OBJECT_TYPE_DEFINITION, 45 | INTERFACE_TYPE_DEFINITION, 46 | ENUM_TYPE_DEFINITION, 47 | UNION_TYPE_DEFINITION, 48 | SCALAR_TYPE_DEFINITION, 49 | INPUT_OBJECT_TYPE_DEFINITION, 50 | SCALAR_TYPE_EXTENSION, 51 | OBJECT_TYPE_EXTENSION, 52 | INTERFACE_TYPE_EXTENSION, 53 | UNION_TYPE_EXTENSION, 54 | ENUM_TYPE_EXTENSION, 55 | INPUT_OBJECT_TYPE_EXTENSION, 56 | DIRECTIVE_DEFINITION, 57 | FRAGMENT_SPREAD, 58 | OPERATION_DEFINITION, 59 | NAMED_TYPE, 60 | } = Kind; 61 | 62 | export class GraphQLLanguageService { 63 | _graphQLCache: GraphQLCache; 64 | _graphQLConfig: GraphQLConfig; 65 | 66 | constructor(cache: GraphQLCache) { 67 | this._graphQLCache = cache; 68 | this._graphQLConfig = cache.getGraphQLConfig(); 69 | } 70 | 71 | async getDiagnostics( 72 | query: string, 73 | uri: Uri, 74 | isRelayCompatMode?: boolean, 75 | ): Promise> { 76 | // Perform syntax diagnostics first, as this doesn't require 77 | // schema/fragment definitions, even the project configuration. 78 | let queryHasExtensions = false; 79 | const projectConfig = this._graphQLConfig.getConfigForFile(uri); 80 | const schemaPath = projectConfig.schemaPath; 81 | try { 82 | const queryAST = parse(query); 83 | if (!schemaPath || uri !== schemaPath) { 84 | queryHasExtensions = queryAST.definitions.some(definition => { 85 | switch (definition.kind) { 86 | case OBJECT_TYPE_DEFINITION: 87 | case INTERFACE_TYPE_DEFINITION: 88 | case ENUM_TYPE_DEFINITION: 89 | case UNION_TYPE_DEFINITION: 90 | case SCALAR_TYPE_DEFINITION: 91 | case INPUT_OBJECT_TYPE_DEFINITION: 92 | case SCALAR_TYPE_EXTENSION: 93 | case OBJECT_TYPE_EXTENSION: 94 | case INTERFACE_TYPE_EXTENSION: 95 | case UNION_TYPE_EXTENSION: 96 | case ENUM_TYPE_EXTENSION: 97 | case INPUT_OBJECT_TYPE_EXTENSION: 98 | case DIRECTIVE_DEFINITION: 99 | return true; 100 | } 101 | return false; 102 | }); 103 | } 104 | } catch (error) { 105 | const range = getRange(error.locations[0], query); 106 | return [ 107 | { 108 | severity: SEVERITY.ERROR, 109 | message: error.message, 110 | source: 'GraphQL: Syntax', 111 | range, 112 | }, 113 | ]; 114 | } 115 | 116 | // If there's a matching config, proceed to prepare to run validation 117 | let source = query; 118 | const fragmentDefinitions = await this._graphQLCache.getFragmentDefinitions( 119 | projectConfig, 120 | ); 121 | const fragmentDependencies = await this._graphQLCache.getFragmentDependencies( 122 | query, 123 | fragmentDefinitions, 124 | ); 125 | const dependenciesSource = fragmentDependencies.reduce( 126 | (prev, cur) => `${prev} ${print(cur.definition)}`, 127 | '', 128 | ); 129 | 130 | source = `${source} ${dependenciesSource}`; 131 | 132 | let validationAst = null; 133 | try { 134 | validationAst = parse(source); 135 | } catch (error) { 136 | // the query string is already checked to be parsed properly - errors 137 | // from this parse must be from corrupted fragment dependencies. 138 | // For IDEs we don't care for errors outside of the currently edited 139 | // query, so we return an empty array here. 140 | return []; 141 | } 142 | 143 | // Check if there are custom validation rules to be used 144 | let customRules; 145 | const customRulesModulePath = 146 | projectConfig.extensions.customValidationRules; 147 | if (customRulesModulePath) { 148 | /* eslint-disable no-implicit-coercion */ 149 | const rulesPath = require.resolve(`${customRulesModulePath}`); 150 | if (rulesPath) { 151 | customRules = require(`${rulesPath}`)(this._graphQLConfig); 152 | } 153 | /* eslint-enable no-implicit-coercion */ 154 | } 155 | 156 | const schema = await this._graphQLCache 157 | .getSchema(projectConfig.projectName, queryHasExtensions) 158 | .catch(() => null); 159 | 160 | if (!schema) { 161 | return []; 162 | } 163 | 164 | return validateQuery(validationAst, schema, customRules, isRelayCompatMode); 165 | } 166 | 167 | async getAutocompleteSuggestions( 168 | query: string, 169 | position: Position, 170 | filePath: Uri, 171 | ): Promise> { 172 | const projectConfig = this._graphQLConfig.getConfigForFile(filePath); 173 | const schema = await this._graphQLCache 174 | .getSchema(projectConfig.projectName) 175 | .catch(() => null); 176 | 177 | if (schema) { 178 | return getAutocompleteSuggestions(schema, query, position); 179 | } 180 | return []; 181 | } 182 | 183 | async getHoverInformation( 184 | query: string, 185 | position: Position, 186 | filePath: Uri, 187 | ): Promise { 188 | const projectConfig = this._graphQLConfig.getConfigForFile(filePath); 189 | const schema = await this._graphQLCache 190 | .getSchema(projectConfig.projectName) 191 | .catch(() => null); 192 | 193 | if (schema) { 194 | return getHoverInformation(schema, query, position); 195 | } 196 | return ''; 197 | } 198 | 199 | async getDefinition( 200 | query: string, 201 | position: Position, 202 | filePath: Uri, 203 | ): Promise { 204 | const projectConfig = this._graphQLConfig.getConfigForFile(filePath); 205 | 206 | let ast; 207 | try { 208 | ast = parse(query); 209 | } catch (error) { 210 | return null; 211 | } 212 | 213 | const node = getASTNodeAtPosition(query, ast, position); 214 | if (node) { 215 | switch (node.kind) { 216 | case FRAGMENT_SPREAD: 217 | return this._getDefinitionForFragmentSpread( 218 | query, 219 | ast, 220 | node, 221 | filePath, 222 | projectConfig, 223 | ); 224 | case FRAGMENT_DEFINITION: 225 | case OPERATION_DEFINITION: 226 | return getDefinitionQueryResultForDefinitionNode( 227 | filePath, 228 | query, 229 | (node: FragmentDefinitionNode | OperationDefinitionNode), 230 | ); 231 | case NAMED_TYPE: 232 | return this._getDefinitionForNamedType( 233 | query, 234 | ast, 235 | node, 236 | filePath, 237 | projectConfig, 238 | ); 239 | } 240 | } 241 | return null; 242 | } 243 | 244 | async _getDefinitionForNamedType( 245 | query: string, 246 | ast: DocumentNode, 247 | node: NamedTypeNode, 248 | filePath: Uri, 249 | projectConfig: GraphQLProjectConfig, 250 | ): Promise { 251 | const objectTypeDefinitions = await this._graphQLCache.getObjectTypeDefinitions( 252 | projectConfig, 253 | ); 254 | 255 | const dependencies = await this._graphQLCache.getObjectTypeDependenciesForAST( 256 | ast, 257 | objectTypeDefinitions, 258 | ); 259 | 260 | const localObjectTypeDefinitions = ast.definitions.filter( 261 | definition => 262 | definition.kind === OBJECT_TYPE_DEFINITION || 263 | definition.kind === INPUT_OBJECT_TYPE_DEFINITION || 264 | definition.kind === ENUM_TYPE_DEFINITION, 265 | ); 266 | 267 | const typeCastedDefs = ((localObjectTypeDefinitions: any): Array< 268 | TypeDefinitionNode, 269 | >); 270 | 271 | const localOperationDefinationInfos = typeCastedDefs.map( 272 | (definition: TypeDefinitionNode) => ({ 273 | filePath, 274 | content: query, 275 | definition, 276 | }), 277 | ); 278 | 279 | const result = await getDefinitionQueryResultForNamedType( 280 | query, 281 | node, 282 | dependencies.concat(localOperationDefinationInfos), 283 | ); 284 | 285 | return result; 286 | } 287 | 288 | async _getDefinitionForFragmentSpread( 289 | query: string, 290 | ast: DocumentNode, 291 | node: FragmentSpreadNode, 292 | filePath: Uri, 293 | projectConfig: GraphQLProjectConfig, 294 | ): Promise { 295 | const fragmentDefinitions = await this._graphQLCache.getFragmentDefinitions( 296 | projectConfig, 297 | ); 298 | 299 | const dependencies = await this._graphQLCache.getFragmentDependenciesForAST( 300 | ast, 301 | fragmentDefinitions, 302 | ); 303 | 304 | const localFragDefinitions = ast.definitions.filter( 305 | definition => definition.kind === FRAGMENT_DEFINITION, 306 | ); 307 | 308 | const typeCastedDefs = ((localFragDefinitions: any): Array< 309 | FragmentDefinitionNode, 310 | >); 311 | 312 | const localFragInfos = typeCastedDefs.map( 313 | (definition: FragmentDefinitionNode) => ({ 314 | filePath, 315 | content: query, 316 | definition, 317 | }), 318 | ); 319 | 320 | const result = await getDefinitionQueryResultForFragmentSpread( 321 | query, 322 | node, 323 | dependencies.concat(localFragInfos), 324 | ); 325 | 326 | return result; 327 | } 328 | } 329 | -------------------------------------------------------------------------------- /assets/app/build/static/media/autocompleteUtils.js.4ce7ba19.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | * 8 | * @flow 9 | */ 10 | 11 | import type {GraphQLField, GraphQLSchema, GraphQLType} from 'graphql'; 12 | import {isCompositeType} from 'graphql'; 13 | import { 14 | SchemaMetaFieldDef, 15 | TypeMetaFieldDef, 16 | TypeNameMetaFieldDef, 17 | } from 'graphql/type/introspection'; 18 | import type { 19 | CompletionItem, 20 | ContextToken, 21 | State, 22 | TypeInfo, 23 | } from 'graphql-language-service-types'; 24 | 25 | // Utility for returning the state representing the Definition this token state 26 | // is within, if any. 27 | export function getDefinitionState(tokenState: State): ?State { 28 | let definitionState; 29 | 30 | forEachState(tokenState, state => { 31 | switch (state.kind) { 32 | case 'Query': 33 | case 'ShortQuery': 34 | case 'Mutation': 35 | case 'Subscription': 36 | case 'FragmentDefinition': 37 | definitionState = state; 38 | break; 39 | } 40 | }); 41 | 42 | return definitionState; 43 | } 44 | 45 | // Gets the field definition given a type and field name 46 | export function getFieldDef( 47 | schema: GraphQLSchema, 48 | type: GraphQLType, 49 | fieldName: string, 50 | ): ?GraphQLField<*, *> { 51 | if (fieldName === SchemaMetaFieldDef.name && schema.getQueryType() === type) { 52 | return SchemaMetaFieldDef; 53 | } 54 | if (fieldName === TypeMetaFieldDef.name && schema.getQueryType() === type) { 55 | return TypeMetaFieldDef; 56 | } 57 | if (fieldName === TypeNameMetaFieldDef.name && isCompositeType(type)) { 58 | return TypeNameMetaFieldDef; 59 | } 60 | if (type.getFields && typeof type.getFields === 'function') { 61 | return (type.getFields()[fieldName]: any); 62 | } 63 | 64 | return null; 65 | } 66 | 67 | // Utility for iterating through a CodeMirror parse state stack bottom-up. 68 | export function forEachState( 69 | stack: State, 70 | fn: (state: State) => ?TypeInfo, 71 | ): void { 72 | const reverseStateStack = []; 73 | let state = stack; 74 | while (state && state.kind) { 75 | reverseStateStack.push(state); 76 | state = state.prevState; 77 | } 78 | for (let i = reverseStateStack.length - 1; i >= 0; i--) { 79 | fn(reverseStateStack[i]); 80 | } 81 | } 82 | 83 | export function objectValues(object: Object): Array { 84 | const keys = Object.keys(object); 85 | const len = keys.length; 86 | const values = new Array(len); 87 | for (let i = 0; i < len; ++i) { 88 | values[i] = object[keys[i]]; 89 | } 90 | return values; 91 | } 92 | 93 | // Create the expected hint response given a possible list and a token 94 | export function hintList( 95 | token: ContextToken, 96 | list: Array, 97 | ): Array { 98 | return filterAndSortList(list, normalizeText(token.string)); 99 | } 100 | 101 | // Given a list of hint entries and currently typed text, sort and filter to 102 | // provide a concise list. 103 | function filterAndSortList( 104 | list: Array, 105 | text: string, 106 | ): Array { 107 | if (!text) { 108 | return filterNonEmpty(list, entry => !entry.isDeprecated); 109 | } 110 | 111 | const byProximity = list.map(entry => ({ 112 | proximity: getProximity(normalizeText(entry.label), text), 113 | entry, 114 | })); 115 | 116 | const conciseMatches = filterNonEmpty( 117 | filterNonEmpty(byProximity, pair => pair.proximity <= 2), 118 | pair => !pair.entry.isDeprecated, 119 | ); 120 | 121 | const sortedMatches = conciseMatches.sort( 122 | (a, b) => 123 | (a.entry.isDeprecated ? 1 : 0) - (b.entry.isDeprecated ? 1 : 0) || 124 | a.proximity - b.proximity || 125 | a.entry.label.length - b.entry.label.length, 126 | ); 127 | 128 | return sortedMatches.map(pair => pair.entry); 129 | } 130 | 131 | // Filters the array by the predicate, unless it results in an empty array, 132 | // in which case return the original array. 133 | function filterNonEmpty( 134 | array: Array, 135 | predicate: (entry: Object) => boolean, 136 | ): Array { 137 | const filtered = array.filter(predicate); 138 | return filtered.length === 0 ? array : filtered; 139 | } 140 | 141 | function normalizeText(text: string): string { 142 | return text.toLowerCase().replace(/\W/g, ''); 143 | } 144 | 145 | // Determine a numeric proximity for a suggestion based on current text. 146 | function getProximity(suggestion: string, text: string): number { 147 | // start with lexical distance 148 | let proximity = lexicalDistance(text, suggestion); 149 | if (suggestion.length > text.length) { 150 | // do not penalize long suggestions. 151 | proximity -= suggestion.length - text.length - 1; 152 | // penalize suggestions not starting with this phrase 153 | proximity += suggestion.indexOf(text) === 0 ? 0 : 0.5; 154 | } 155 | return proximity; 156 | } 157 | 158 | /** 159 | * Computes the lexical distance between strings A and B. 160 | * 161 | * The "distance" between two strings is given by counting the minimum number 162 | * of edits needed to transform string A into string B. An edit can be an 163 | * insertion, deletion, or substitution of a single character, or a swap of two 164 | * adjacent characters. 165 | * 166 | * This distance can be useful for detecting typos in input or sorting 167 | * 168 | * @param {string} a 169 | * @param {string} b 170 | * @return {int} distance in number of edits 171 | */ 172 | function lexicalDistance(a: string, b: string): number { 173 | let i; 174 | let j; 175 | const d = []; 176 | const aLength = a.length; 177 | const bLength = b.length; 178 | 179 | for (i = 0; i <= aLength; i++) { 180 | d[i] = [i]; 181 | } 182 | 183 | for (j = 1; j <= bLength; j++) { 184 | d[0][j] = j; 185 | } 186 | 187 | for (i = 1; i <= aLength; i++) { 188 | for (j = 1; j <= bLength; j++) { 189 | const cost = a[i - 1] === b[j - 1] ? 0 : 1; 190 | 191 | d[i][j] = Math.min( 192 | d[i - 1][j] + 1, 193 | d[i][j - 1] + 1, 194 | d[i - 1][j - 1] + cost, 195 | ); 196 | 197 | if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { 198 | d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost); 199 | } 200 | } 201 | } 202 | 203 | return d[aLength][bLength]; 204 | } 205 | -------------------------------------------------------------------------------- /assets/app/build/static/media/getAutocompleteSuggestions.js.7f98f032.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | * 8 | * @flow 9 | */ 10 | 11 | import type { 12 | FragmentDefinitionNode, 13 | GraphQLDirective, 14 | GraphQLSchema, 15 | } from 'graphql'; 16 | import type { 17 | CompletionItem, 18 | ContextToken, 19 | State, 20 | TypeInfo, 21 | } from 'graphql-language-service-types'; 22 | import type {Position} from 'graphql-language-service-utils'; 23 | 24 | import { 25 | GraphQLBoolean, 26 | GraphQLEnumType, 27 | GraphQLInputObjectType, 28 | GraphQLList, 29 | SchemaMetaFieldDef, 30 | TypeMetaFieldDef, 31 | TypeNameMetaFieldDef, 32 | assertAbstractType, 33 | doTypesOverlap, 34 | getNamedType, 35 | getNullableType, 36 | isAbstractType, 37 | isCompositeType, 38 | isInputType, 39 | } from 'graphql'; 40 | import {CharacterStream, onlineParser} from 'graphql-language-service-parser'; 41 | import { 42 | forEachState, 43 | getDefinitionState, 44 | getFieldDef, 45 | hintList, 46 | objectValues, 47 | } from './autocompleteUtils'; 48 | 49 | /** 50 | * Given GraphQLSchema, queryText, and context of the current position within 51 | * the source text, provide a list of typeahead entries. 52 | */ 53 | export function getAutocompleteSuggestions( 54 | schema: GraphQLSchema, 55 | queryText: string, 56 | cursor: Position, 57 | contextToken?: ContextToken, 58 | ): Array { 59 | const token = contextToken || getTokenAtPosition(queryText, cursor); 60 | 61 | const state = 62 | token.state.kind === 'Invalid' ? token.state.prevState : token.state; 63 | 64 | // relieve flow errors by checking if `state` exists 65 | if (!state) { 66 | return []; 67 | } 68 | 69 | const kind = state.kind; 70 | const step = state.step; 71 | const typeInfo = getTypeInfo(schema, token.state); 72 | 73 | // Definition kinds 74 | if (kind === 'Document') { 75 | return hintList(token, [ 76 | {label: 'query'}, 77 | {label: 'mutation'}, 78 | {label: 'subscription'}, 79 | {label: 'fragment'}, 80 | {label: '{'}, 81 | ]); 82 | } 83 | 84 | // Field names 85 | if (kind === 'SelectionSet' || kind === 'Field' || kind === 'AliasedField') { 86 | return getSuggestionsForFieldNames(token, typeInfo, schema); 87 | } 88 | 89 | // Argument names 90 | if (kind === 'Arguments' || (kind === 'Argument' && step === 0)) { 91 | const argDefs = typeInfo.argDefs; 92 | if (argDefs) { 93 | return hintList( 94 | token, 95 | argDefs.map(argDef => ({ 96 | label: argDef.name, 97 | detail: String(argDef.type), 98 | documentation: argDef.description, 99 | })), 100 | ); 101 | } 102 | } 103 | 104 | // Input Object fields 105 | if (kind === 'ObjectValue' || (kind === 'ObjectField' && step === 0)) { 106 | if (typeInfo.objectFieldDefs) { 107 | const objectFields = objectValues(typeInfo.objectFieldDefs); 108 | return hintList( 109 | token, 110 | objectFields.map(field => ({ 111 | label: field.name, 112 | detail: String(field.type), 113 | documentation: field.description, 114 | })), 115 | ); 116 | } 117 | } 118 | 119 | // Input values: Enum and Boolean 120 | if ( 121 | kind === 'EnumValue' || 122 | (kind === 'ListValue' && step === 1) || 123 | (kind === 'ObjectField' && step === 2) || 124 | (kind === 'Argument' && step === 2) 125 | ) { 126 | return getSuggestionsForInputValues(token, typeInfo); 127 | } 128 | 129 | // Fragment type conditions 130 | if ( 131 | (kind === 'TypeCondition' && step === 1) || 132 | (kind === 'NamedType' && 133 | state.prevState != null && 134 | state.prevState.kind === 'TypeCondition') 135 | ) { 136 | return getSuggestionsForFragmentTypeConditions(token, typeInfo, schema); 137 | } 138 | 139 | // Fragment spread names 140 | if (kind === 'FragmentSpread' && step === 1) { 141 | return getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText); 142 | } 143 | 144 | // Variable definition types 145 | if ( 146 | (kind === 'VariableDefinition' && step === 2) || 147 | (kind === 'ListType' && step === 1) || 148 | (kind === 'NamedType' && 149 | state.prevState && 150 | (state.prevState.kind === 'VariableDefinition' || 151 | state.prevState.kind === 'ListType')) 152 | ) { 153 | return getSuggestionsForVariableDefinition(token, schema); 154 | } 155 | 156 | // Directive names 157 | if (kind === 'Directive') { 158 | return getSuggestionsForDirective(token, state, schema); 159 | } 160 | 161 | return []; 162 | } 163 | 164 | // Helper functions to get suggestions for each kinds 165 | function getSuggestionsForFieldNames( 166 | token: ContextToken, 167 | typeInfo: TypeInfo, 168 | schema: GraphQLSchema, 169 | ): Array { 170 | if (typeInfo.parentType) { 171 | const parentType = typeInfo.parentType; 172 | const fields = 173 | parentType.getFields instanceof Function 174 | ? objectValues(parentType.getFields()) 175 | : []; 176 | if (isAbstractType(parentType)) { 177 | fields.push(TypeNameMetaFieldDef); 178 | } 179 | if (parentType === schema.getQueryType()) { 180 | fields.push(SchemaMetaFieldDef, TypeMetaFieldDef); 181 | } 182 | return hintList( 183 | token, 184 | fields.map(field => ({ 185 | label: field.name, 186 | detail: String(field.type), 187 | documentation: field.description, 188 | isDeprecated: field.isDeprecated, 189 | deprecationReason: field.deprecationReason, 190 | })), 191 | ); 192 | } 193 | return []; 194 | } 195 | 196 | function getSuggestionsForInputValues( 197 | token: ContextToken, 198 | typeInfo: TypeInfo, 199 | ): Array { 200 | const namedInputType = getNamedType(typeInfo.inputType); 201 | if (namedInputType instanceof GraphQLEnumType) { 202 | const values = namedInputType.getValues(); 203 | return hintList( 204 | token, 205 | values.map(value => ({ 206 | label: value.name, 207 | detail: String(namedInputType), 208 | documentation: value.description, 209 | isDeprecated: value.isDeprecated, 210 | deprecationReason: value.deprecationReason, 211 | })), 212 | ); 213 | } else if (namedInputType === GraphQLBoolean) { 214 | return hintList(token, [ 215 | { 216 | label: 'true', 217 | detail: String(GraphQLBoolean), 218 | documentation: 'Not false.', 219 | }, 220 | { 221 | label: 'false', 222 | detail: String(GraphQLBoolean), 223 | documentation: 'Not true.', 224 | }, 225 | ]); 226 | } 227 | 228 | return []; 229 | } 230 | 231 | function getSuggestionsForFragmentTypeConditions( 232 | token: ContextToken, 233 | typeInfo: TypeInfo, 234 | schema: GraphQLSchema, 235 | ): Array { 236 | let possibleTypes; 237 | if (typeInfo.parentType) { 238 | if (isAbstractType(typeInfo.parentType)) { 239 | const abstractType = assertAbstractType(typeInfo.parentType); 240 | // Collect both the possible Object types as well as the interfaces 241 | // they implement. 242 | const possibleObjTypes = schema.getPossibleTypes(abstractType); 243 | const possibleIfaceMap = Object.create(null); 244 | possibleObjTypes.forEach(type => { 245 | type.getInterfaces().forEach(iface => { 246 | possibleIfaceMap[iface.name] = iface; 247 | }); 248 | }); 249 | possibleTypes = possibleObjTypes.concat(objectValues(possibleIfaceMap)); 250 | } else { 251 | // The parent type is a non-abstract Object type, so the only possible 252 | // type that can be used is that same type. 253 | possibleTypes = [typeInfo.parentType]; 254 | } 255 | } else { 256 | const typeMap = schema.getTypeMap(); 257 | possibleTypes = objectValues(typeMap).filter(isCompositeType); 258 | } 259 | return hintList( 260 | token, 261 | possibleTypes.map(type => { 262 | const namedType = getNamedType(type); 263 | return { 264 | label: String(type), 265 | documentation: (namedType && namedType.description) || '', 266 | }; 267 | }), 268 | ); 269 | } 270 | 271 | function getSuggestionsForFragmentSpread( 272 | token: ContextToken, 273 | typeInfo: TypeInfo, 274 | schema: GraphQLSchema, 275 | queryText: string, 276 | ): Array { 277 | const typeMap = schema.getTypeMap(); 278 | const defState = getDefinitionState(token.state); 279 | const fragments = getFragmentDefinitions(queryText); 280 | 281 | // Filter down to only the fragments which may exist here. 282 | const relevantFrags = fragments.filter( 283 | frag => 284 | // Only include fragments with known types. 285 | typeMap[frag.typeCondition.name.value] && 286 | // Only include fragments which are not cyclic. 287 | !( 288 | defState && 289 | defState.kind === 'FragmentDefinition' && 290 | defState.name === frag.name.value 291 | ) && 292 | // Only include fragments which could possibly be spread here. 293 | isCompositeType(typeInfo.parentType) && 294 | isCompositeType(typeMap[frag.typeCondition.name.value]) && 295 | doTypesOverlap( 296 | schema, 297 | typeInfo.parentType, 298 | typeMap[frag.typeCondition.name.value], 299 | ), 300 | ); 301 | 302 | return hintList( 303 | token, 304 | relevantFrags.map(frag => ({ 305 | label: frag.name.value, 306 | detail: String(typeMap[frag.typeCondition.name.value]), 307 | documentation: `fragment ${frag.name.value} on ${ 308 | frag.typeCondition.name.value 309 | }`, 310 | })), 311 | ); 312 | } 313 | 314 | function getFragmentDefinitions( 315 | queryText: string, 316 | ): Array { 317 | const fragmentDefs = []; 318 | runOnlineParser(queryText, (_, state) => { 319 | if (state.kind === 'FragmentDefinition' && state.name && state.type) { 320 | fragmentDefs.push({ 321 | kind: 'FragmentDefinition', 322 | name: { 323 | kind: 'Name', 324 | value: state.name, 325 | }, 326 | selectionSet: { 327 | kind: 'SelectionSet', 328 | selections: [], 329 | }, 330 | typeCondition: { 331 | kind: 'NamedType', 332 | name: { 333 | kind: 'Name', 334 | value: state.type, 335 | }, 336 | }, 337 | }); 338 | } 339 | }); 340 | 341 | return fragmentDefs; 342 | } 343 | 344 | function getSuggestionsForVariableDefinition( 345 | token: ContextToken, 346 | schema: GraphQLSchema, 347 | ): Array { 348 | const inputTypeMap = schema.getTypeMap(); 349 | const inputTypes = objectValues(inputTypeMap).filter(isInputType); 350 | return hintList( 351 | token, 352 | inputTypes.map(type => ({ 353 | label: type.name, 354 | documentation: type.description, 355 | })), 356 | ); 357 | } 358 | 359 | function getSuggestionsForDirective( 360 | token: ContextToken, 361 | state: State, 362 | schema: GraphQLSchema, 363 | ): Array { 364 | if (state.prevState && state.prevState.kind) { 365 | const directives = schema 366 | .getDirectives() 367 | .filter(directive => canUseDirective(state.prevState, directive)); 368 | return hintList( 369 | token, 370 | directives.map(directive => ({ 371 | label: directive.name, 372 | documentation: directive.description || '', 373 | })), 374 | ); 375 | } 376 | return []; 377 | } 378 | 379 | export function getTokenAtPosition( 380 | queryText: string, 381 | cursor: Position, 382 | ): ContextToken { 383 | let styleAtCursor = null; 384 | let stateAtCursor = null; 385 | let stringAtCursor = null; 386 | const token = runOnlineParser(queryText, (stream, state, style, index) => { 387 | if (index === cursor.line) { 388 | if (stream.getCurrentPosition() >= cursor.character) { 389 | styleAtCursor = style; 390 | stateAtCursor = {...state}; 391 | stringAtCursor = stream.current(); 392 | return 'BREAK'; 393 | } 394 | } 395 | }); 396 | 397 | // Return the state/style of parsed token in case those at cursor aren't 398 | // available. 399 | return { 400 | start: token.start, 401 | end: token.end, 402 | string: stringAtCursor || token.string, 403 | state: stateAtCursor || token.state, 404 | style: styleAtCursor || token.style, 405 | }; 406 | } 407 | 408 | /** 409 | * Provides an utility function to parse a given query text and construct a 410 | * `token` context object. 411 | * A token context provides useful information about the token/style that 412 | * CharacterStream currently possesses, as well as the end state and style 413 | * of the token. 414 | */ 415 | type callbackFnType = ( 416 | stream: CharacterStream, 417 | state: State, 418 | style: string, 419 | index: number, 420 | ) => void | 'BREAK'; 421 | 422 | function runOnlineParser( 423 | queryText: string, 424 | callback: callbackFnType, 425 | ): ContextToken { 426 | const lines = queryText.split('\n'); 427 | const parser = onlineParser(); 428 | let state = parser.startState(); 429 | let style = ''; 430 | 431 | let stream: CharacterStream = new CharacterStream(''); 432 | 433 | for (let i = 0; i < lines.length; i++) { 434 | stream = new CharacterStream(lines[i]); 435 | while (!stream.eol()) { 436 | style = parser.token(stream, state); 437 | const code = callback(stream, state, style, i); 438 | if (code === 'BREAK') { 439 | break; 440 | } 441 | } 442 | 443 | // Above while loop won't run if there is an empty line. 444 | // Run the callback one more time to catch this. 445 | callback(stream, state, style, i); 446 | 447 | if (!state.kind) { 448 | state = parser.startState(); 449 | } 450 | } 451 | 452 | return { 453 | start: stream.getStartOfToken(), 454 | end: stream.getCurrentPosition(), 455 | string: stream.current(), 456 | state, 457 | style, 458 | }; 459 | } 460 | 461 | function canUseDirective( 462 | state: $PropertyType, 463 | directive: GraphQLDirective, 464 | ): boolean { 465 | if (!state || !state.kind) { 466 | return false; 467 | } 468 | const kind = state.kind; 469 | const locations = directive.locations; 470 | switch (kind) { 471 | case 'Query': 472 | return locations.indexOf('QUERY') !== -1; 473 | case 'Mutation': 474 | return locations.indexOf('MUTATION') !== -1; 475 | case 'Subscription': 476 | return locations.indexOf('SUBSCRIPTION') !== -1; 477 | case 'Field': 478 | case 'AliasedField': 479 | return locations.indexOf('FIELD') !== -1; 480 | case 'FragmentDefinition': 481 | return locations.indexOf('FRAGMENT_DEFINITION') !== -1; 482 | case 'FragmentSpread': 483 | return locations.indexOf('FRAGMENT_SPREAD') !== -1; 484 | case 'InlineFragment': 485 | return locations.indexOf('INLINE_FRAGMENT') !== -1; 486 | 487 | // Schema Definitions 488 | case 'SchemaDef': 489 | return locations.indexOf('SCHEMA') !== -1; 490 | case 'ScalarDef': 491 | return locations.indexOf('SCALAR') !== -1; 492 | case 'ObjectTypeDef': 493 | return locations.indexOf('OBJECT') !== -1; 494 | case 'FieldDef': 495 | return locations.indexOf('FIELD_DEFINITION') !== -1; 496 | case 'InterfaceDef': 497 | return locations.indexOf('INTERFACE') !== -1; 498 | case 'UnionDef': 499 | return locations.indexOf('UNION') !== -1; 500 | case 'EnumDef': 501 | return locations.indexOf('ENUM') !== -1; 502 | case 'EnumValue': 503 | return locations.indexOf('ENUM_VALUE') !== -1; 504 | case 'InputDef': 505 | return locations.indexOf('INPUT_OBJECT') !== -1; 506 | case 'InputValueDef': 507 | const prevStateKind = state.prevState && state.prevState.kind; 508 | switch (prevStateKind) { 509 | case 'ArgumentsDef': 510 | return locations.indexOf('ARGUMENT_DEFINITION') !== -1; 511 | case 'InputDef': 512 | return locations.indexOf('INPUT_FIELD_DEFINITION') !== -1; 513 | } 514 | } 515 | return false; 516 | } 517 | 518 | // Utility for collecting rich type information given any token's state 519 | // from the graphql-mode parser. 520 | export function getTypeInfo( 521 | schema: GraphQLSchema, 522 | tokenState: State, 523 | ): TypeInfo { 524 | let argDef; 525 | let argDefs; 526 | let directiveDef; 527 | let enumValue; 528 | let fieldDef; 529 | let inputType; 530 | let objectFieldDefs; 531 | let parentType; 532 | let type; 533 | 534 | forEachState(tokenState, state => { 535 | switch (state.kind) { 536 | case 'Query': 537 | case 'ShortQuery': 538 | type = schema.getQueryType(); 539 | break; 540 | case 'Mutation': 541 | type = schema.getMutationType(); 542 | break; 543 | case 'Subscription': 544 | type = schema.getSubscriptionType(); 545 | break; 546 | case 'InlineFragment': 547 | case 'FragmentDefinition': 548 | if (state.type) { 549 | type = schema.getType(state.type); 550 | } 551 | break; 552 | case 'Field': 553 | case 'AliasedField': 554 | if (!type || !state.name) { 555 | fieldDef = null; 556 | } else { 557 | fieldDef = parentType 558 | ? getFieldDef(schema, parentType, state.name) 559 | : null; 560 | type = fieldDef ? fieldDef.type : null; 561 | } 562 | break; 563 | case 'SelectionSet': 564 | parentType = getNamedType(type); 565 | break; 566 | case 'Directive': 567 | directiveDef = state.name ? schema.getDirective(state.name) : null; 568 | break; 569 | case 'Arguments': 570 | if (!state.prevState) { 571 | argDefs = null; 572 | } else { 573 | switch (state.prevState.kind) { 574 | case 'Field': 575 | argDefs = fieldDef && fieldDef.args; 576 | break; 577 | case 'Directive': 578 | argDefs = directiveDef && directiveDef.args; 579 | break; 580 | case 'AliasedField': 581 | const name = state.prevState && state.prevState.name; 582 | if (!name) { 583 | argDefs = null; 584 | break; 585 | } 586 | const field = parentType 587 | ? getFieldDef(schema, parentType, name) 588 | : null; 589 | if (!field) { 590 | argDefs = null; 591 | break; 592 | } 593 | argDefs = field.args; 594 | break; 595 | default: 596 | argDefs = null; 597 | break; 598 | } 599 | } 600 | break; 601 | case 'Argument': 602 | if (argDefs) { 603 | for (let i = 0; i < argDefs.length; i++) { 604 | if (argDefs[i].name === state.name) { 605 | argDef = argDefs[i]; 606 | break; 607 | } 608 | } 609 | } 610 | inputType = argDef && argDef.type; 611 | break; 612 | case 'EnumValue': 613 | const enumType = getNamedType(inputType); 614 | enumValue = 615 | enumType instanceof GraphQLEnumType 616 | ? find(enumType.getValues(), val => val.value === state.name) 617 | : null; 618 | break; 619 | case 'ListValue': 620 | const nullableType = getNullableType(inputType); 621 | inputType = 622 | nullableType instanceof GraphQLList ? nullableType.ofType : null; 623 | break; 624 | case 'ObjectValue': 625 | const objectType = getNamedType(inputType); 626 | objectFieldDefs = 627 | objectType instanceof GraphQLInputObjectType 628 | ? objectType.getFields() 629 | : null; 630 | break; 631 | case 'ObjectField': 632 | const objectField = 633 | state.name && objectFieldDefs ? objectFieldDefs[state.name] : null; 634 | inputType = objectField && objectField.type; 635 | break; 636 | case 'NamedType': 637 | if (state.name) { 638 | type = schema.getType(state.name); 639 | } 640 | break; 641 | } 642 | }); 643 | 644 | return { 645 | argDef, 646 | argDefs, 647 | directiveDef, 648 | enumValue, 649 | fieldDef, 650 | inputType, 651 | objectFieldDefs, 652 | parentType, 653 | type, 654 | }; 655 | } 656 | 657 | // Returns the first item in the array which causes predicate to return truthy. 658 | function find(array, predicate) { 659 | for (let i = 0; i < array.length; i++) { 660 | if (predicate(array[i])) { 661 | return array[i]; 662 | } 663 | } 664 | return null; 665 | } 666 | -------------------------------------------------------------------------------- /assets/app/build/static/media/getDefinition.js.4dbec62f.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | * 8 | * @flow 9 | */ 10 | 11 | import type { 12 | ASTNode, 13 | FragmentSpreadNode, 14 | FragmentDefinitionNode, 15 | OperationDefinitionNode, 16 | NamedTypeNode, 17 | TypeDefinitionNode, 18 | } from 'graphql'; 19 | import type { 20 | Definition, 21 | DefinitionQueryResult, 22 | FragmentInfo, 23 | Position, 24 | Range, 25 | Uri, 26 | ObjectTypeInfo, 27 | } from 'graphql-language-service-types'; 28 | import {locToRange, offsetToPosition} from 'graphql-language-service-utils'; 29 | import invariant from 'assert'; 30 | 31 | export const LANGUAGE = 'GraphQL'; 32 | 33 | function getRange(text: string, node: ASTNode): Range { 34 | const location = node.loc; 35 | invariant(location, 'Expected ASTNode to have a location.'); 36 | return locToRange(text, location); 37 | } 38 | 39 | function getPosition(text: string, node: ASTNode): Position { 40 | const location = node.loc; 41 | invariant(location, 'Expected ASTNode to have a location.'); 42 | return offsetToPosition(text, location.start); 43 | } 44 | 45 | export async function getDefinitionQueryResultForNamedType( 46 | text: string, 47 | node: NamedTypeNode, 48 | dependencies: Array, 49 | ): Promise { 50 | const name = node.name.value; 51 | const defNodes = dependencies.filter( 52 | ({definition}) => definition.name && definition.name.value === name, 53 | ); 54 | if (defNodes.length === 0) { 55 | process.stderr.write(`Definition not found for GraphQL type ${name}`); 56 | return {queryRange: [], definitions: []}; 57 | } 58 | const definitions: Array = defNodes.map( 59 | ({filePath, content, definition}) => 60 | getDefinitionForNodeDefinition(filePath || '', content, definition), 61 | ); 62 | return { 63 | definitions, 64 | queryRange: definitions.map(_ => getRange(text, node)), 65 | }; 66 | } 67 | 68 | export async function getDefinitionQueryResultForFragmentSpread( 69 | text: string, 70 | fragment: FragmentSpreadNode, 71 | dependencies: Array, 72 | ): Promise { 73 | const name = fragment.name.value; 74 | const defNodes = dependencies.filter( 75 | ({definition}) => definition.name.value === name, 76 | ); 77 | if (defNodes.length === 0) { 78 | process.stderr.write(`Definition not found for GraphQL fragment ${name}`); 79 | return {queryRange: [], definitions: []}; 80 | } 81 | const definitions: Array = defNodes.map( 82 | ({filePath, content, definition}) => 83 | getDefinitionForFragmentDefinition(filePath || '', content, definition), 84 | ); 85 | return { 86 | definitions, 87 | queryRange: definitions.map(_ => getRange(text, fragment)), 88 | }; 89 | } 90 | 91 | export function getDefinitionQueryResultForDefinitionNode( 92 | path: Uri, 93 | text: string, 94 | definition: FragmentDefinitionNode | OperationDefinitionNode, 95 | ): DefinitionQueryResult { 96 | return { 97 | definitions: [getDefinitionForFragmentDefinition(path, text, definition)], 98 | queryRange: definition.name ? [getRange(text, definition.name)] : [], 99 | }; 100 | } 101 | 102 | function getDefinitionForFragmentDefinition( 103 | path: Uri, 104 | text: string, 105 | definition: FragmentDefinitionNode | OperationDefinitionNode, 106 | ): Definition { 107 | const name = definition.name; 108 | invariant(name, 'Expected ASTNode to have a Name.'); 109 | return { 110 | path, 111 | position: getPosition(text, definition), 112 | range: getRange(text, definition), 113 | name: name.value || '', 114 | language: LANGUAGE, 115 | // This is a file inside the project root, good enough for now 116 | projectRoot: path, 117 | }; 118 | } 119 | 120 | function getDefinitionForNodeDefinition( 121 | path: Uri, 122 | text: string, 123 | definition: TypeDefinitionNode, 124 | ): Definition { 125 | const name = definition.name; 126 | invariant(name, 'Expected ASTNode to have a Name.'); 127 | return { 128 | path, 129 | position: getPosition(text, definition), 130 | range: getRange(text, definition), 131 | name: name.value || '', 132 | language: LANGUAGE, 133 | // This is a file inside the project root, good enough for now 134 | projectRoot: path, 135 | }; 136 | } 137 | -------------------------------------------------------------------------------- /assets/app/build/static/media/getDiagnostics.js.65b0979a.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | * 8 | * @flow 9 | */ 10 | 11 | import type { 12 | ASTNode, 13 | DocumentNode, 14 | GraphQLError, 15 | GraphQLSchema, 16 | Location, 17 | SourceLocation, 18 | } from 'graphql'; 19 | import type { 20 | Diagnostic, 21 | CustomValidationRule, 22 | } from 'graphql-language-service-types'; 23 | 24 | import invariant from 'assert'; 25 | import {findDeprecatedUsages, parse} from 'graphql'; 26 | import {CharacterStream, onlineParser} from 'graphql-language-service-parser'; 27 | import { 28 | Position, 29 | Range, 30 | validateWithCustomRules, 31 | } from 'graphql-language-service-utils'; 32 | 33 | export const SEVERITY = { 34 | ERROR: 1, 35 | WARNING: 2, 36 | INFORMATION: 3, 37 | HINT: 4, 38 | }; 39 | 40 | export function getDiagnostics( 41 | query: string, 42 | schema: ?GraphQLSchema = null, 43 | customRules?: Array, 44 | isRelayCompatMode?: boolean, 45 | ): Array { 46 | let ast = null; 47 | try { 48 | ast = parse(query); 49 | } catch (error) { 50 | const range = getRange(error.locations[0], query); 51 | return [ 52 | { 53 | severity: SEVERITY.ERROR, 54 | message: error.message, 55 | source: 'GraphQL: Syntax', 56 | range, 57 | }, 58 | ]; 59 | } 60 | 61 | return validateQuery(ast, schema, customRules, isRelayCompatMode); 62 | } 63 | 64 | export function validateQuery( 65 | ast: DocumentNode, 66 | schema: ?GraphQLSchema = null, 67 | customRules?: Array, 68 | isRelayCompatMode?: boolean, 69 | ): Array { 70 | // We cannot validate the query unless a schema is provided. 71 | if (!schema) { 72 | return []; 73 | } 74 | 75 | const validationErrorAnnotations = mapCat( 76 | validateWithCustomRules(schema, ast, customRules, isRelayCompatMode), 77 | error => annotations(error, SEVERITY.ERROR, 'Validation'), 78 | ); 79 | // Note: findDeprecatedUsages was added in graphql@0.9.0, but we want to 80 | // support older versions of graphql-js. 81 | const deprecationWarningAnnotations = !findDeprecatedUsages 82 | ? [] 83 | : mapCat(findDeprecatedUsages(schema, ast), error => 84 | annotations(error, SEVERITY.WARNING, 'Deprecation'), 85 | ); 86 | return validationErrorAnnotations.concat(deprecationWarningAnnotations); 87 | } 88 | 89 | // General utility for map-cating (aka flat-mapping). 90 | function mapCat( 91 | array: Array, 92 | mapper: (item: T) => Array, 93 | ): Array { 94 | return Array.prototype.concat.apply([], array.map(mapper)); 95 | } 96 | 97 | function annotations( 98 | error: GraphQLError, 99 | severity: number, 100 | type: string, 101 | ): Array { 102 | if (!error.nodes) { 103 | return []; 104 | } 105 | return error.nodes.map(node => { 106 | const highlightNode = 107 | node.kind !== 'Variable' && node.name 108 | ? node.name 109 | : node.variable 110 | ? node.variable 111 | : node; 112 | 113 | invariant(error.locations, 'GraphQL validation error requires locations.'); 114 | const loc = error.locations[0]; 115 | const highlightLoc = getLocation(highlightNode); 116 | const end = loc.column + (highlightLoc.end - highlightLoc.start); 117 | return { 118 | source: `GraphQL: ${type}`, 119 | message: error.message, 120 | severity, 121 | range: new Range( 122 | new Position(loc.line - 1, loc.column - 1), 123 | new Position(loc.line - 1, end), 124 | ), 125 | }; 126 | }); 127 | } 128 | 129 | export function getRange(location: SourceLocation, queryText: string) { 130 | const parser = onlineParser(); 131 | const state = parser.startState(); 132 | const lines = queryText.split('\n'); 133 | 134 | invariant( 135 | lines.length >= location.line, 136 | 'Query text must have more lines than where the error happened', 137 | ); 138 | 139 | let stream = null; 140 | 141 | for (let i = 0; i < location.line; i++) { 142 | stream = new CharacterStream(lines[i]); 143 | while (!stream.eol()) { 144 | const style = parser.token(stream, state); 145 | if (style === 'invalidchar') { 146 | break; 147 | } 148 | } 149 | } 150 | 151 | invariant(stream, 'Expected Parser stream to be available.'); 152 | 153 | const line = location.line - 1; 154 | const start = stream.getStartOfToken(); 155 | const end = stream.getCurrentPosition(); 156 | 157 | return new Range(new Position(line, start), new Position(line, end)); 158 | } 159 | 160 | /** 161 | * Get location info from a node in a type-safe way. 162 | * 163 | * The only way a node could not have a location is if we initialized the parser 164 | * (and therefore the lexer) with the `noLocation` option, but we always 165 | * call `parse` without options above. 166 | */ 167 | function getLocation(node: any): Location { 168 | const typeCastedNode = (node: ASTNode); 169 | const location = typeCastedNode.loc; 170 | invariant(location, 'Expected ASTNode to have a location.'); 171 | return location; 172 | } 173 | -------------------------------------------------------------------------------- /assets/app/build/static/media/getHoverInformation.js.d9411837.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | * 8 | * @flow 9 | */ 10 | 11 | /** 12 | * Ported from codemirror-graphql 13 | * https://github.com/graphql/codemirror-graphql/blob/master/src/info.js 14 | */ 15 | 16 | import type {GraphQLSchema} from 'graphql'; 17 | import type {ContextToken} from 'graphql-language-service-types'; 18 | import type {Hover} from 'vscode-languageserver-types'; 19 | import type {Position} from 'graphql-language-service-utils'; 20 | import {getTokenAtPosition, getTypeInfo} from './getAutocompleteSuggestions'; 21 | import {GraphQLNonNull, GraphQLList} from 'graphql'; 22 | 23 | export function getHoverInformation( 24 | schema: GraphQLSchema, 25 | queryText: string, 26 | cursor: Position, 27 | contextToken?: ContextToken, 28 | ): Hover.contents { 29 | const token = contextToken || getTokenAtPosition(queryText, cursor); 30 | 31 | if (!schema || !token || !token.state) { 32 | return []; 33 | } 34 | 35 | const state = token.state; 36 | const kind = state.kind; 37 | const step = state.step; 38 | const typeInfo = getTypeInfo(schema, token.state); 39 | const options = {schema}; 40 | 41 | // Given a Schema and a Token, produce the contents of an info tooltip. 42 | // To do this, create a div element that we will render "into" and then pass 43 | // it to various rendering functions. 44 | if ( 45 | (kind === 'Field' && step === 0 && typeInfo.fieldDef) || 46 | (kind === 'AliasedField' && step === 2 && typeInfo.fieldDef) 47 | ) { 48 | const into = []; 49 | renderField(into, typeInfo, options); 50 | renderDescription(into, options, typeInfo.fieldDef); 51 | return into.join('').trim(); 52 | } else if (kind === 'Directive' && step === 1 && typeInfo.directiveDef) { 53 | const into = []; 54 | renderDirective(into, typeInfo, options); 55 | renderDescription(into, options, typeInfo.directiveDef); 56 | return into.join('').trim(); 57 | } else if (kind === 'Argument' && step === 0 && typeInfo.argDef) { 58 | const into = []; 59 | renderArg(into, typeInfo, options); 60 | renderDescription(into, options, typeInfo.argDef); 61 | return into.join('').trim(); 62 | } else if ( 63 | kind === 'EnumValue' && 64 | typeInfo.enumValue && 65 | typeInfo.enumValue.description 66 | ) { 67 | const into = []; 68 | renderEnumValue(into, typeInfo, options); 69 | renderDescription(into, options, typeInfo.enumValue); 70 | return into.join('').trim(); 71 | } else if ( 72 | kind === 'NamedType' && 73 | typeInfo.type && 74 | typeInfo.type.description 75 | ) { 76 | const into = []; 77 | renderType(into, typeInfo, options, typeInfo.type); 78 | renderDescription(into, options, typeInfo.type); 79 | return into.join('').trim(); 80 | } 81 | } 82 | 83 | function renderField(into, typeInfo, options) { 84 | renderQualifiedField(into, typeInfo, options); 85 | renderTypeAnnotation(into, typeInfo, options, typeInfo.type); 86 | } 87 | 88 | function renderQualifiedField(into, typeInfo, options) { 89 | if (!typeInfo.fieldDef) { 90 | return; 91 | } 92 | const fieldName = (typeInfo.fieldDef.name: string); 93 | if (fieldName.slice(0, 2) !== '__') { 94 | renderType(into, typeInfo, options, typeInfo.parentType); 95 | text(into, '.'); 96 | } 97 | text(into, fieldName); 98 | } 99 | 100 | function renderDirective(into, typeInfo, options) { 101 | if (!typeInfo.directiveDef) { 102 | return; 103 | } 104 | const name = '@' + typeInfo.directiveDef.name; 105 | text(into, name); 106 | } 107 | 108 | function renderArg(into, typeInfo, options) { 109 | if (typeInfo.directiveDef) { 110 | renderDirective(into, typeInfo, options); 111 | } else if (typeInfo.fieldDef) { 112 | renderQualifiedField(into, typeInfo, options); 113 | } 114 | 115 | if (!typeInfo.argDef) { 116 | return; 117 | } 118 | 119 | const name = typeInfo.argDef.name; 120 | text(into, '('); 121 | text(into, name); 122 | renderTypeAnnotation(into, typeInfo, options, typeInfo.inputType); 123 | text(into, ')'); 124 | } 125 | 126 | function renderTypeAnnotation(into, typeInfo, options, t) { 127 | text(into, ': '); 128 | renderType(into, typeInfo, options, t); 129 | } 130 | 131 | function renderEnumValue(into, typeInfo, options) { 132 | if (!typeInfo.enumValue) { 133 | return; 134 | } 135 | const name = typeInfo.enumValue.name; 136 | renderType(into, typeInfo, options, typeInfo.inputType); 137 | text(into, '.'); 138 | text(into, name); 139 | } 140 | 141 | function renderType(into, typeInfo, options, t) { 142 | if (!t) { 143 | return; 144 | } 145 | if (t instanceof GraphQLNonNull) { 146 | renderType(into, typeInfo, options, t.ofType); 147 | text(into, '!'); 148 | } else if (t instanceof GraphQLList) { 149 | text(into, '['); 150 | renderType(into, typeInfo, options, t.ofType); 151 | text(into, ']'); 152 | } else { 153 | text(into, t.name); 154 | } 155 | } 156 | 157 | function renderDescription(into, options, def) { 158 | if (!def) { 159 | return; 160 | } 161 | const description = 162 | typeof def.description === 'string' ? def.description : null; 163 | if (description) { 164 | text(into, '\n\n'); 165 | text(into, description); 166 | } 167 | renderDeprecation(into, options, def); 168 | } 169 | 170 | function renderDeprecation(into, options, def) { 171 | if (!def) { 172 | return; 173 | } 174 | const reason = 175 | typeof def.deprecationReason === 'string' ? def.deprecationReason : null; 176 | if (!reason) { 177 | return; 178 | } 179 | text(into, '\n\n'); 180 | text(into, 'Deprecated: '); 181 | text(into, reason); 182 | } 183 | 184 | function text(into: string[], content: string) { 185 | into.push(content); 186 | } 187 | -------------------------------------------------------------------------------- /assets/app/build/static/media/getOutline.js.c04e3998.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | * 8 | * @flow 9 | */ 10 | 11 | import type { 12 | Outline, 13 | TextToken, 14 | TokenKind, 15 | } from 'graphql-language-service-types'; 16 | 17 | import {Kind, parse, visit} from 'graphql'; 18 | import {offsetToPosition} from 'graphql-language-service-utils'; 19 | 20 | const {INLINE_FRAGMENT} = Kind; 21 | 22 | const OUTLINEABLE_KINDS = { 23 | Field: true, 24 | OperationDefinition: true, 25 | Document: true, 26 | SelectionSet: true, 27 | Name: true, 28 | FragmentDefinition: true, 29 | FragmentSpread: true, 30 | InlineFragment: true, 31 | }; 32 | 33 | type OutlineTreeConverterType = {[name: string]: Function}; 34 | 35 | export function getOutline(queryText: string): ?Outline { 36 | let ast; 37 | try { 38 | ast = parse(queryText); 39 | } catch (error) { 40 | return null; 41 | } 42 | 43 | const visitorFns = outlineTreeConverter(queryText); 44 | const outlineTrees = visit(ast, { 45 | leave(node) { 46 | if ( 47 | OUTLINEABLE_KINDS.hasOwnProperty(node.kind) && 48 | visitorFns[node.kind] 49 | ) { 50 | return visitorFns[node.kind](node); 51 | } 52 | return null; 53 | }, 54 | }); 55 | return {outlineTrees}; 56 | } 57 | 58 | function outlineTreeConverter(docText: string): OutlineTreeConverterType { 59 | const meta = node => ({ 60 | representativeName: node.name, 61 | startPosition: offsetToPosition(docText, node.loc.start), 62 | endPosition: offsetToPosition(docText, node.loc.end), 63 | children: node.selectionSet || [], 64 | }); 65 | return { 66 | Field: node => { 67 | const tokenizedText = node.alias 68 | ? [buildToken('plain', node.alias), buildToken('plain', ': ')] 69 | : []; 70 | tokenizedText.push(buildToken('plain', node.name)); 71 | return {tokenizedText, ...meta(node)}; 72 | }, 73 | OperationDefinition: node => ({ 74 | tokenizedText: [ 75 | buildToken('keyword', node.operation), 76 | buildToken('whitespace', ' '), 77 | buildToken('class-name', node.name), 78 | ], 79 | ...meta(node), 80 | }), 81 | Document: node => node.definitions, 82 | SelectionSet: node => 83 | concatMap(node.selections, child => { 84 | return child.kind === INLINE_FRAGMENT ? child.selectionSet : child; 85 | }), 86 | Name: node => node.value, 87 | FragmentDefinition: node => ({ 88 | tokenizedText: [ 89 | buildToken('keyword', 'fragment'), 90 | buildToken('whitespace', ' '), 91 | buildToken('class-name', node.name), 92 | ], 93 | ...meta(node), 94 | }), 95 | FragmentSpread: node => ({ 96 | tokenizedText: [ 97 | buildToken('plain', '...'), 98 | buildToken('class-name', node.name), 99 | ], 100 | ...meta(node), 101 | }), 102 | InlineFragment: node => node.selectionSet, 103 | }; 104 | } 105 | 106 | function buildToken(kind: TokenKind, value: string): TextToken { 107 | return {kind, value}; 108 | } 109 | 110 | function concatMap(arr: Array, fn: Function): Array { 111 | const res = []; 112 | for (let i = 0; i < arr.length; i++) { 113 | const x = fn(arr[i], i); 114 | if (Array.isArray(x)) { 115 | res.push(...x); 116 | } else { 117 | res.push(x); 118 | } 119 | } 120 | return res; 121 | } 122 | -------------------------------------------------------------------------------- /assets/app/build/static/media/index.js.02c24280.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | * 8 | * @flow 9 | */ 10 | 11 | export { 12 | getDefinitionState, 13 | getFieldDef, 14 | forEachState, 15 | objectValues, 16 | hintList, 17 | } from './autocompleteUtils'; 18 | 19 | export {getAutocompleteSuggestions} from './getAutocompleteSuggestions'; 20 | 21 | export { 22 | LANGUAGE, 23 | getDefinitionQueryResultForFragmentSpread, 24 | getDefinitionQueryResultForDefinitionNode, 25 | } from './getDefinition'; 26 | 27 | export {getDiagnostics, validateQuery} from './getDiagnostics'; 28 | export {getOutline} from './getOutline'; 29 | export {getHoverInformation} from './getHoverInformation'; 30 | 31 | export {GraphQLLanguageService} from './GraphQLLanguageService'; 32 | -------------------------------------------------------------------------------- /assets/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wp-graphiql", 3 | "description": "This plugin provides the GraphiQL IDE as an admin page in WordPress, allowing the GraphQL WPGraphQL schema to be browsed from within WordPress.", 4 | "author": "WPGraphQL, Digital First Media, Jason Bahl", 5 | "homepage": "http://wpgraphql.com", 6 | "bugs": { 7 | "url": "https://github.com/wp-graphql/wp-graphiql/issues" 8 | }, 9 | "version": "1.0.0", 10 | "private": true, 11 | "devDependencies": { 12 | "react-scripts": "^1.1.4" 13 | }, 14 | "dependencies": { 15 | "graphiql": "^0.13.2", 16 | "graphiql-code-exporter": "^2.0.5", 17 | "graphiql-explorer": "^0.4.3", 18 | "graphql": "^14.4.2", 19 | "react": "^16.8.6", 20 | "react-dom": "^16.8.6", 21 | "whatwg-fetch": "^3.0.0" 22 | }, 23 | "scripts": { 24 | "start": "react-scripts start", 25 | "build": "react-scripts build", 26 | "test": "react-scripts test --env=jsdom", 27 | "eject": "react-scripts eject" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /assets/app/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-graphql/wp-graphiql/82518eafa5f383c5929111431e4a641caace3b57/assets/app/public/index.html -------------------------------------------------------------------------------- /assets/app/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import GraphiQL from "graphiql" 4 | import GraphiQLExplorer from "graphiql-explorer" 5 | import CodeExporter from "graphiql-code-exporter" 6 | import {getIntrospectionQuery, buildClientSchema, parse, print} from "graphql" 7 | import "whatwg-fetch" 8 | import snippets from "./snippets" 9 | 10 | /** 11 | * Style the app 12 | */ 13 | import 'graphiql/graphiql.css'; 14 | import './app.css'; 15 | import "graphiql-code-exporter/CodeExporter.css" 16 | 17 | const parameters = {} 18 | 19 | window.location.search 20 | .substr(1) 21 | .split(`&`) 22 | .forEach(function (entry) { 23 | var eq = entry.indexOf(`=`) 24 | if (eq >= 0) { 25 | parameters[decodeURIComponent(entry.slice(0, eq))] = decodeURIComponent(entry.slice(eq + 1).replace(/\+/g, '%20')) 26 | } 27 | }) 28 | 29 | // Produce a Location query string from a parameter object. 30 | function locationQuery(params) { 31 | return ( 32 | 'admin.php' + 33 | '?' + 34 | Object.keys(params) 35 | .map(function (key) { 36 | return encodeURIComponent(key) + `=` + encodeURIComponent(params[key]) 37 | }) 38 | .join(`&`) 39 | ) 40 | } 41 | 42 | // Derive a fetch URL from the current URL, sans the GraphQL parameters. 43 | const graphqlParamNames = { 44 | query: true, 45 | variables: true, 46 | operationName: true, 47 | explorerIsOpen: true, 48 | } 49 | 50 | const otherParams = {} 51 | 52 | for (var k in parameters) { 53 | if (parameters.hasOwnProperty(k) && graphqlParamNames[k] !== true) { 54 | otherParams[k] = parameters[k] 55 | } 56 | } 57 | 58 | let nonce = (window.wpGraphiQLSettings && window.wpGraphiQLSettings.nonce) ? window.wpGraphiQLSettings.nonce : null; 59 | let endpoint = (window.wpGraphiQLSettings && window.wpGraphiQLSettings.graphqlEndpoint) ? window.wpGraphiQLSettings.graphqlEndpoint : window.location.origin; 60 | 61 | 62 | function graphQLFetcher(graphQLParams) { 63 | return fetch(endpoint, { 64 | method: `post`, 65 | headers: { 66 | Accept: `application/json`, 67 | "Content-Type": `application/json`, 68 | 'X-WP-Nonce': nonce 69 | }, 70 | body: JSON.stringify(graphQLParams), 71 | credentials: `include`, 72 | }).then(function (response) { 73 | return response.json() 74 | }) 75 | } 76 | 77 | // When the query and variables string is edited, update the URL bar so 78 | // that it can be easily shared. 79 | function onEditVariables(newVariables) { 80 | parameters.variables = newVariables 81 | updateURL() 82 | } 83 | 84 | function onEditOperationName(newOperationName) { 85 | parameters.operationName = newOperationName 86 | updateURL() 87 | } 88 | 89 | function updateURL() { 90 | // eslint-disable-next-line 91 | history.replaceState(null, null, locationQuery(parameters)) 92 | } 93 | 94 | // We control query, so we need to recreate initial query text that show up 95 | // on visiting graphiql - in order it will be 96 | // - query from query string (if set) 97 | // - query stored in localStorage (which graphiql set when closing window) 98 | // - default empty query 99 | const DEFAULT_QUERY = 100 | parameters.query && print( parse( parameters.query ) ) || 101 | (window.localStorage && window.localStorage.getItem(`graphiql:query`)) || 102 | null 103 | 104 | const QUERY_EXAMPLE_SITEMETADATA_TITLE = `# { 105 | # generalSettings { 106 | # url 107 | # title 108 | # } 109 | # }` 110 | 111 | const QUERY_EXAMPLE_FALLBACK = `# { 112 | # posts { 113 | # nodes { 114 | # title 115 | # uri 116 | # } 117 | # } 118 | # }` 119 | 120 | function generateDefaultFallbackQuery(queryExample) { 121 | return `# Welcome to GraphiQL 122 | # 123 | # GraphiQL is an in-browser tool for writing, validating, and 124 | # testing GraphQL queries. 125 | # 126 | # Type queries into this side of the screen, and you will see intelligent 127 | # typeaheads aware of the current GraphQL type schema and live syntax and 128 | # validation errors highlighted within the text. 129 | # 130 | # GraphQL queries typically start with a "{" character. Lines that starts 131 | # with a # are ignored. 132 | # 133 | # An example GraphQL query might look like: 134 | # 135 | ${queryExample} 136 | # 137 | # Keyboard shortcuts: 138 | # 139 | # Prettify Query: Shift-Ctrl-P (or press the prettify button above) 140 | # 141 | # Merge Query: Shift-Ctrl-M (or press the merge button above) 142 | # 143 | # Run Query: Ctrl-Enter (or press the play button above) 144 | # 145 | # Auto Complete: Ctrl-Space (or just start typing) 146 | # 147 | ` 148 | } 149 | 150 | const storedExplorerPaneState = 151 | typeof parameters.explorerIsOpen !== `undefined` 152 | ? parameters.explorerIsOpen === `false` 153 | ? false 154 | : true 155 | : window.localStorage 156 | ? window.localStorage.getItem(`graphiql:graphiqlExplorerOpen`) !== `false` 157 | : true 158 | 159 | const storedCodeExporterPaneState = 160 | typeof parameters.codeExporterIsOpen !== `undefined` 161 | ? parameters.codeExporterIsOpen === `false` 162 | ? false 163 | : true 164 | : window.localStorage 165 | ? window.localStorage.getItem(`graphiql:graphiqlCodeExporterOpen`) === 166 | `true` 167 | : false 168 | 169 | class App extends React.Component { 170 | state = { 171 | schema: null, 172 | query: DEFAULT_QUERY, 173 | explorerIsOpen: storedExplorerPaneState, 174 | codeExporterIsOpen: storedCodeExporterPaneState, 175 | } 176 | 177 | componentDidMount() { 178 | graphQLFetcher({ 179 | query: getIntrospectionQuery(), 180 | }).then(result => { 181 | const newState = {schema: buildClientSchema(result.data)} 182 | 183 | if (this.state.query === null) { 184 | try { 185 | const siteMetadataType = result.data.__schema.types.find( 186 | type => type.name === `SiteSiteMetadata` && type.kind === `OBJECT` 187 | ) 188 | if (siteMetadataType) { 189 | const titleField = siteMetadataType.fields.find( 190 | field => 191 | field.name === `title` && 192 | field.type && 193 | field.type.kind === `SCALAR` && 194 | field.type.name === `String` 195 | ) 196 | 197 | if (titleField) { 198 | newState.query = generateDefaultFallbackQuery( 199 | QUERY_EXAMPLE_SITEMETADATA_TITLE 200 | ) 201 | } 202 | } 203 | // eslint-disable-next-line no-empty 204 | } catch (e) { 205 | console.error(e) 206 | } 207 | if (!newState.query) { 208 | newState.query = generateDefaultFallbackQuery(QUERY_EXAMPLE_FALLBACK) 209 | } 210 | } 211 | 212 | this.setState(newState) 213 | }) 214 | 215 | const editor = this._graphiql.getQueryEditor() 216 | editor.setOption(`extraKeys`, { 217 | ...(editor.options.extraKeys || {}), 218 | "Shift-Alt-LeftClick": this._handleInspectOperation, 219 | }) 220 | } 221 | 222 | _handleInspectOperation = (cm, mousePos) => { 223 | const parsedQuery = parse(this.state.query || ``) 224 | 225 | if (!parsedQuery) { 226 | console.error(`Couldn't parse query document`) 227 | return null 228 | } 229 | 230 | const token = cm.getTokenAt(mousePos) 231 | const start = {line: mousePos.line, ch: token.start} 232 | const end = {line: mousePos.line, ch: token.end} 233 | const relevantMousePos = { 234 | start: cm.indexFromPos(start), 235 | end: cm.indexFromPos(end), 236 | } 237 | 238 | const position = relevantMousePos 239 | 240 | const def = parsedQuery.definitions.find(definition => { 241 | if (!definition.loc) { 242 | console.log(`Missing location information for definition`) 243 | return false 244 | } 245 | 246 | const {start, end} = definition.loc 247 | return start <= position.start && end >= position.end 248 | }) 249 | 250 | if (!def) { 251 | console.error(`Unable to find definition corresponding to mouse position`) 252 | return null 253 | } 254 | 255 | const operationKind = 256 | def.kind === `OperationDefinition` 257 | ? def.operation 258 | : def.kind === `FragmentDefinition` 259 | ? `fragment` 260 | : `unknown` 261 | 262 | const operationName = 263 | def.kind === `OperationDefinition` && !!def.name 264 | ? def.name.value 265 | : def.kind === `FragmentDefinition` && !!def.name 266 | ? def.name.value 267 | : `unknown` 268 | 269 | const selector = `.graphiql-explorer-root #${operationKind}-${operationName}` 270 | 271 | const el = document.querySelector(selector) 272 | if (el) { 273 | el.scrollIntoView() 274 | return true 275 | } 276 | 277 | return false 278 | } 279 | 280 | _handleEditQuery = query => { 281 | parameters.query = query 282 | updateURL() 283 | this.setState({query}) 284 | } 285 | 286 | _handleToggleExplorer = () => { 287 | const newExplorerIsOpen = !this.state.explorerIsOpen 288 | if (window.localStorage) { 289 | window.localStorage.setItem( 290 | `graphiql:graphiqlExplorerOpen`, 291 | newExplorerIsOpen 292 | ) 293 | } 294 | parameters.explorerIsOpen = newExplorerIsOpen 295 | updateURL() 296 | this.setState({explorerIsOpen: newExplorerIsOpen}) 297 | } 298 | 299 | _handleToggleExporter = () => { 300 | const newCodeExporterIsOpen = !this.state.codeExporterIsOpen 301 | if (window.localStorage) { 302 | window.localStorage.setItem( 303 | `graphiql:graphiqlCodeExporterOpen`, 304 | newCodeExporterIsOpen 305 | ) 306 | } 307 | parameters.codeExporterIsOpen = newCodeExporterIsOpen 308 | updateURL() 309 | this.setState({ codeExporterIsOpen: newCodeExporterIsOpen }) 310 | } 311 | 312 | 313 | 314 | render() { 315 | const { query, schema, codeExporterIsOpen } = this.state 316 | const codeExporter = codeExporterIsOpen ? ( 317 | 323 | ) : null 324 | 325 | return ( 326 | 327 | 334 | this._graphiql.handleRunQuery(operationName) 335 | } 336 | /> 337 | (this._graphiql = ref)} 339 | fetcher={graphQLFetcher} 340 | schema={schema} 341 | query={query} 342 | onEditQuery={this._handleEditQuery} 343 | onEditVariables={onEditVariables} 344 | onEditOperationName={onEditOperationName} 345 | > 346 | 347 | this._graphiql.handlePrettifyQuery()} 349 | label="Prettify" 350 | title="Prettify Query (Shift-Ctrl-P)" 351 | /> 352 | this._graphiql.handleToggleHistory()} 354 | label="History" 355 | title="Show History" 356 | /> 357 | 362 | 367 | 368 | 369 | {codeExporter} 370 | 371 | ); 372 | } 373 | } 374 | 375 | export default App; 376 | -------------------------------------------------------------------------------- /assets/app/src/app.css: -------------------------------------------------------------------------------- 1 | #wp-graphiql { 2 | display: flex; 3 | flex: 1; 4 | } 5 | 6 | #wp-graphiql .spinner{ 7 | visibility: visible; 8 | background: none; 9 | } 10 | -------------------------------------------------------------------------------- /assets/app/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | ReactDOM.render(, document.getElementById('wp-graphiql')); 6 | -------------------------------------------------------------------------------- /assets/app/src/snippets.js: -------------------------------------------------------------------------------- 1 | const getQuery = (arg, spaceCount) => { 2 | const { operationDataList } = arg 3 | const { query } = operationDataList[0] 4 | const anonymousQuery = query.replace(/query\s.+{/gim, `{`) 5 | return ( 6 | ` `.repeat(spaceCount) + 7 | anonymousQuery.replace(/\n/g, `\n` + ` `.repeat(spaceCount)) 8 | ) 9 | } 10 | 11 | const pageQuery = { 12 | name: `Page query`, 13 | language: `Gatsby`, 14 | codeMirrorMode: `jsx`, 15 | options: [], 16 | generate: arg => `import React from "react" 17 | import { graphql } from "gatsby" 18 | 19 | const ComponentName = ({ data }) =>
{JSON.stringify(data, null, 4)}
20 | 21 | export const query = graphql\` 22 | ${getQuery(arg, 2)} 23 | \` 24 | 25 | export default ComponentName 26 | 27 | `, 28 | } 29 | 30 | const staticHook = { 31 | name: `StaticQuery hook`, 32 | language: `Gatsby`, 33 | codeMirrorMode: `jsx`, 34 | options: [], 35 | generate: arg => `import React from "react" 36 | import { useStaticQuery, graphql } from "gatsby" 37 | 38 | const ComponentName = () => { 39 | const data = useStaticQuery(graphql\` 40 | ${getQuery(arg, 4)} 41 | \`) 42 | return
{JSON.stringify(data, null, 4)}
43 | } 44 | 45 | export default ComponentName 46 | 47 | `, 48 | } 49 | 50 | const staticQuery = { 51 | name: `StaticQuery`, 52 | language: `Gatsby`, 53 | codeMirrorMode: `jsx`, 54 | options: [], 55 | generate: arg => `import React from "react" 56 | import { StaticQuery, graphql } from "gatsby" 57 | 58 | const ComponentName = () => ( 59 |
{JSON.stringify(data, null, 4)}
} 64 | >
65 | ) 66 | 67 | export default ComponentName 68 | 69 | `, 70 | } 71 | 72 | export default [pageQuery, staticHook, staticQuery] 73 | -------------------------------------------------------------------------------- /assets/img/wp-graphiql-wp-admin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wp-graphql/wp-graphiql/82518eafa5f383c5929111431e4a641caace3b57/assets/img/wp-graphiql-wp-admin.gif -------------------------------------------------------------------------------- /assets/js/wp-graphiql-helpers.js: -------------------------------------------------------------------------------- 1 | $j=jQuery.noConflict(); 2 | 3 | $j(document).ready(function(){ 4 | 5 | $j('.update-nag').hide(); 6 | $j('.error').hide(); 7 | 8 | $defaultHeight = '500px'; 9 | $wpWrapHeight = $j('#wpwrap').height(); 10 | $adminBarHeight = $j('#wpadminbar').height(); 11 | $footerHeight = $j('#wpfooter').height(); 12 | $height = ( $wpWrapHeight - $adminBarHeight - $footerHeight - 65 ); 13 | $graphiqlHeight = ( $defaultHeight < $height ) ? $defaultHeight : $height; 14 | $j('#wp-graphiql').css( 'height', $graphiqlHeight ); 15 | }); -------------------------------------------------------------------------------- /bin/install-wp-tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ $# -lt 3 ]; then 4 | echo "usage: $0 [db-host] [wp-version] [skip-database-creation]" 5 | exit 1 6 | fi 7 | 8 | DB_NAME=$1 9 | DB_USER=$2 10 | DB_PASS=$3 11 | DB_HOST=${4-localhost} 12 | WP_VERSION=${5-latest} 13 | SKIP_DB_CREATE=${6-false} 14 | 15 | WP_TESTS_DIR=${WP_TESTS_DIR-/tmp/wordpress-tests-lib} 16 | WP_CORE_DIR=${WP_CORE_DIR-/tmp/wordpress/} 17 | 18 | download() { 19 | if [ `which curl` ]; then 20 | curl -s "$1" > "$2"; 21 | elif [ `which wget` ]; then 22 | wget -nv -O "$2" "$1" 23 | fi 24 | } 25 | 26 | if [[ $WP_VERSION =~ [0-9]+\.[0-9]+(\.[0-9]+)? ]]; then 27 | WP_TESTS_TAG="tags/$WP_VERSION" 28 | elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then 29 | WP_TESTS_TAG="trunk" 30 | else 31 | # http serves a single offer, whereas https serves multiple. we only want one 32 | download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json 33 | grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json 34 | LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//') 35 | if [[ -z "$LATEST_VERSION" ]]; then 36 | echo "Latest WordPress version could not be found" 37 | exit 1 38 | fi 39 | WP_TESTS_TAG="tags/$LATEST_VERSION" 40 | fi 41 | 42 | set -ex 43 | 44 | install_wp() { 45 | 46 | if [ -d $WP_CORE_DIR ]; then 47 | return; 48 | fi 49 | 50 | mkdir -p $WP_CORE_DIR 51 | 52 | if [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then 53 | mkdir -p /tmp/wordpress-nightly 54 | download https://wordpress.org/nightly-builds/wordpress-latest.zip /tmp/wordpress-nightly/wordpress-nightly.zip 55 | unzip -q /tmp/wordpress-nightly/wordpress-nightly.zip -d /tmp/wordpress-nightly/ 56 | mv /tmp/wordpress-nightly/wordpress/* $WP_CORE_DIR 57 | else 58 | if [ $WP_VERSION == 'latest' ]; then 59 | local ARCHIVE_NAME='latest' 60 | else 61 | local ARCHIVE_NAME="wordpress-$WP_VERSION" 62 | fi 63 | download https://wordpress.org/${ARCHIVE_NAME}.tar.gz /tmp/wordpress.tar.gz 64 | tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR 65 | fi 66 | 67 | download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php 68 | } 69 | 70 | install_test_suite() { 71 | # portable in-place argument for both GNU sed and Mac OSX sed 72 | if [[ $(uname -s) == 'Darwin' ]]; then 73 | local ioption='-i .bak' 74 | else 75 | local ioption='-i' 76 | fi 77 | 78 | # set up testing suite if it doesn't yet exist 79 | if [ ! -d $WP_TESTS_DIR ]; then 80 | # set up testing suite 81 | mkdir -p $WP_TESTS_DIR 82 | svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes 83 | svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data 84 | fi 85 | 86 | if [ ! -f wp-tests-config.php ]; then 87 | download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php 88 | # remove all forward slashes in the end 89 | WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::") 90 | sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php 91 | sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php 92 | sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php 93 | sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php 94 | sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php 95 | fi 96 | 97 | } 98 | 99 | install_db() { 100 | 101 | if [ ${SKIP_DB_CREATE} = "true" ]; then 102 | return 0 103 | fi 104 | 105 | # parse DB_HOST for port or socket references 106 | local PARTS=(${DB_HOST//\:/ }) 107 | local DB_HOSTNAME=${PARTS[0]}; 108 | local DB_SOCK_OR_PORT=${PARTS[1]}; 109 | local EXTRA="" 110 | 111 | if ! [ -z $DB_HOSTNAME ] ; then 112 | if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then 113 | EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp" 114 | elif ! [ -z $DB_SOCK_OR_PORT ] ; then 115 | EXTRA=" --socket=$DB_SOCK_OR_PORT" 116 | elif ! [ -z $DB_HOSTNAME ] ; then 117 | EXTRA=" --host=$DB_HOSTNAME --protocol=tcp" 118 | fi 119 | fi 120 | 121 | # create database 122 | mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA 123 | } 124 | 125 | install_wp 126 | install_test_suite 127 | install_db 128 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wp-graphql/wp-graphiql", 3 | "description": "GraphiQL IDE in the WP-Admin. Works with the WPGraphQL plugin. https://github.com/wp-graphql/wp-graphql", 4 | "type": "wordpress-plugin", 5 | "license": "GPL-3.0+", 6 | "version": "1.0.1", 7 | "authors": [ 8 | { 9 | "name": "Jason Bahl", 10 | "email": "jasonbahl@mac.com" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "name": "wp-graphiql", 4 | "description": "This plugin provides the GraphiQL IDE as an admin page in WordPress, allowing the GraphQL WPGraphQL schema to be browsed from within WordPress.", 5 | "author": "WPGraphQL, Digital First Media, Jason Bahl", 6 | "homepage": "http://wpgraphql.com", 7 | "bugs": { 8 | "url": "https://github.com/wp-graphql/wp-graphiql/issues" 9 | }, 10 | "version": "1.0.0", 11 | "private": true, 12 | "main": "Gruntfile.js", 13 | "devDependencies": { 14 | "grunt": "~0.4.5", 15 | "grunt-wp-i18n": "~0.5.0", 16 | "grunt-wp-readme-to-markdown": "~1.0.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /phpcs.ruleset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Generally-applicable sniffs for WordPress plugins 4 | 5 | 6 | 7 | 8 | */node_modules/* 9 | */vendor/* 10 | 11 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | ./tests/ 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === WP GraphiQL === 2 | Contributors: (this should be a list of wordpress.org userid's) 3 | Donate link: http://example.com/ 4 | Tags: comments, spam 5 | Requires at least: 4.4 6 | Tested up to: 4.7.5 7 | Stable tag: 0.1.0 8 | License: GPLv3 9 | License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 | 11 | Brings the GraphiQL IDE to the WP-Admin 12 | 13 | == Description == 14 | 15 | Brings the GraphiQL IDE to the WP-Admin, with Authentication built-in. 16 | -------------------------------------------------------------------------------- /tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | assertTrue( true ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /wp-graphiql.php: -------------------------------------------------------------------------------- 1 | is_wpgraphql_active() ) { 50 | echo '
Loading ...
'; 51 | } else { 52 | echo '

This plugin requires WPGraphQL to be installed to work. Please install WPGraphQL (https://github.com/wp-graphql/wp-graphql) and visit this page again.

'; 53 | } 54 | 55 | } 56 | 57 | /** 58 | * Gets the contents of the Create React App manifest file 59 | * 60 | * @return array|bool|string 61 | */ 62 | public function get_app_manifest() { 63 | $manifest = file_get_contents( dirname( __FILE__ ) . '/assets/app/build/asset-manifest.json' ); 64 | $manifest = (array) json_decode( $manifest ); 65 | return $manifest; 66 | } 67 | 68 | /** 69 | * Gets the path to the stylesheet compiled by Create React App 70 | * 71 | * @return string 72 | */ 73 | public function get_app_stylesheet() { 74 | $manifest = $this->get_app_manifest(); 75 | if ( empty( $manifest['main.css'] ) ) { 76 | return ''; 77 | } 78 | return WPGRAPHIQL_PLUGIN_DIR . 'assets/app/build/' . $manifest['main.css']; 79 | } 80 | 81 | /** 82 | * Gets the path to the built javascript file compiled by Create React App 83 | * 84 | * @return string 85 | */ 86 | public function get_app_script() { 87 | $manifest = $this->get_app_manifest(); 88 | if ( empty( $manifest['main.js'] ) ) { 89 | return ''; 90 | } 91 | return WPGRAPHIQL_PLUGIN_DIR . 'assets/app/build/' . $manifest['main.js']; 92 | } 93 | 94 | public function get_app_script_helpers() { 95 | $manifest = $this->get_app_manifest(); 96 | if ( empty( $manifest['main.js'] ) ) { 97 | return ''; 98 | } 99 | return WPGRAPHIQL_PLUGIN_DIR . 'assets/js/wp-graphiql-helpers.js'; 100 | } 101 | 102 | /** 103 | * Enqueues the stylesheet and js for the WPGraphiQL app 104 | */ 105 | public function enqueue_react_app() { 106 | 107 | /** 108 | * Only enqueue the assets on the proper admin page, and only if WPGraphQL is also active 109 | */ 110 | if ( strpos( get_current_screen()->id, 'wp-graphiql/wp-graphiql' ) && $this->is_wpgraphql_active() ) { 111 | 112 | wp_enqueue_style( 'wp-graphiql', $this->get_app_stylesheet(), array(), false, false ); 113 | wp_enqueue_script( 'wp-graphiql-helpers', $this->get_app_script_helpers(), array( 'jquery' ), false, true ); 114 | wp_enqueue_script( 'wp-graphiql', $this->get_app_script(), array(), false, true ); 115 | 116 | /** 117 | * Create a nonce 118 | */ 119 | wp_localize_script( 120 | 'wp-graphiql', 121 | 'wpGraphiQLSettings', 122 | array( 123 | 'nonce' => wp_create_nonce( 'wp_rest' ), 124 | 'graphqlEndpoint' => trailingslashit( site_url() ) . 'index.php?' . \WPGraphQL\Router::$route, 125 | ) 126 | ); 127 | 128 | } 129 | } 130 | 131 | } 132 | 133 | endif; // End if class_exists() 134 | 135 | add_action( 'plugins_loaded', function() { 136 | 137 | $wp_graphiql = new WPGraphiQL(); 138 | $wp_graphiql->init(); 139 | 140 | } ); 141 | --------------------------------------------------------------------------------