mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-10-31 07:55:06 +01:00 
			
		
		
		
	Update README.md
This commit is contained in:
		
							
								
								
									
										32
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								README.md
									
									
									
									
									
								
							| @@ -8,6 +8,38 @@ | |||||||
|  |  | ||||||
| There is a GraphQL PLayground for testing queries at http://localhost:8080/ . | There is a GraphQL PLayground for testing queries at http://localhost:8080/ . | ||||||
|  |  | ||||||
|  | Example Query: | ||||||
|  | ``` | ||||||
|  | query($filter: JobFilterList!, $sorting: OrderByInput!, $paging: PageRequest!) { | ||||||
|  |   jobs( | ||||||
|  |     filter: $filter | ||||||
|  |     order: $sorting | ||||||
|  |     page: $paging | ||||||
|  |   ) { | ||||||
|  |     count | ||||||
|  |     items { | ||||||
|  |       id | ||||||
|  |       jobId | ||||||
|  |       userId | ||||||
|  |       startTime | ||||||
|  |       duration | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | Using the Query variables: | ||||||
|  | ``` | ||||||
|  | { | ||||||
|  |   "filter": { "list": [ | ||||||
|  |     {"userId": {"contains": "unrz"}}, | ||||||
|  |     {"duration": {"from": 60, "to": 1000}}, | ||||||
|  |     {"startTime": {"from": "2019-06-01T00:00:00.00Z", "to": "2019-10-01T00:00:00.00Z"}}]},  | ||||||
|  |   "sorting": { "field": "start_time", "order": "ASC" }, | ||||||
|  |   "paging": { "itemsPerPage": 20, "page": 1 } | ||||||
|  | } | ||||||
|  | ``` | ||||||
|  |  | ||||||
| # Changing the GraphQL schema | # Changing the GraphQL schema | ||||||
|  |  | ||||||
| * Edit ```./graph/schema.graphqls``` | * Edit ```./graph/schema.graphqls``` | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user