mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	* Add GraphQL to languages.yml * Add graphql submodule * Add graphql to grammars.yml * Add GraphQL samples * Updating licensed information
		
			
				
	
	
		
			58 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			GraphQL
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			GraphQL
		
	
	
	
	
	
| # Copyright (c) 2015, Facebook, Inc.
 | |
| # All rights reserved.
 | |
| #
 | |
| # This source code is licensed under the BSD-style license found in the
 | |
| # LICENSE file in the root directory of this source tree. An additional grant
 | |
| # of patent rights can be found in the PATENTS file in the same directory.
 | |
| 
 | |
| query queryName($foo: ComplexType, $site: Site = MOBILE) {
 | |
|   whoever123is: node(id: [123, 456]) {
 | |
|     id ,
 | |
|     ... on User @defer {
 | |
|       field2 {
 | |
|         id ,
 | |
|         alias: field1(first:10, after:$foo,) @include(if: $foo) {
 | |
|           id,
 | |
|           ...frag
 | |
|         }
 | |
|       }
 | |
|     }
 | |
|     ... @skip(unless: $foo) {
 | |
|       id
 | |
|     }
 | |
|     ... {
 | |
|       id
 | |
|     }
 | |
|   }
 | |
| }
 | |
| 
 | |
| mutation likeStory {
 | |
|   like(story: 123) @defer {
 | |
|     story {
 | |
|       id
 | |
|     }
 | |
|   }
 | |
| }
 | |
| 
 | |
| subscription StoryLikeSubscription($input: StoryLikeSubscribeInput) {
 | |
|   storyLikeSubscribe(input: $input) {
 | |
|     story {
 | |
|       likers {
 | |
|         count
 | |
|       }
 | |
|       likeSentence {
 | |
|         text
 | |
|       }
 | |
|     }
 | |
|   }
 | |
| }
 | |
| 
 | |
| fragment frag on Friend {
 | |
|   foo(size: $size, bar: $b, obj: {key: "value"})
 | |
| }
 | |
| 
 | |
| {
 | |
|   unnamed(truthy: true, falsey: false),
 | |
|   query
 | |
| }
 |