| 
									
										
										
										
											2024-11-01 19:55:30 +05:30
										 |  |  | # GraphQL schema example
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | # https://gqlgen.com/getting-started/
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type Mutation
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-15 21:42:15 +05:30
										 |  |  | type Query
 | 
					
						
							| 
									
										
										
										
											2024-11-01 19:55:30 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-17 22:28:29 +05:30
										 |  |  | scalar UID
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | scalar Int64
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-01 19:55:30 +05:30
										 |  |  | """
 | 
					
						
							|  |  |  | Maps a Time GraphQL scalar to a Go time.Time struct.
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | scalar Time
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | type Map(Go type: map[string]interface{})
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | scalar Map
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | Go type interface{}
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | scalar Any
 | 
					
						
							| 
									
										
										
										
											2024-11-17 22:28:29 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-01 19:55:30 +05:30
										 |  |  | scalar Void
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | directive to map Go type
 | 
					
						
							|  |  |  | type User @goModel(model: "github.com/my/app/models.User") {
 | 
					
						
							|  |  |  | 	id: ID! @goField(name: "todoId")
 | 
					
						
							|  |  |  | 	name: String!
 | 
					
						
							|  |  |  | 		@goField(forceResolver: true)
 | 
					
						
							|  |  |  | 		@goTag(key: "xorm", value: "-")
 | 
					
						
							|  |  |  | 		@goTag(key: "yaml")
 | 
					
						
							|  |  |  | }
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | directive @goModel(
 | 
					
						
							|  |  |  | 	model: String
 | 
					
						
							|  |  |  | 	models: [String!]
 | 
					
						
							|  |  |  | 	forceGenerate: Boolean
 | 
					
						
							|  |  |  | ) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | directive to map Go type
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  | directive @goField(
 | 
					
						
							|  |  |  | 	forceResolver: Boolean
 | 
					
						
							|  |  |  | 	name: String
 | 
					
						
							|  |  |  | 	omittable: Boolean
 | 
					
						
							|  |  |  | ) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | directive @goTag(key: String!, value: String) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
 |