github.com/kerryoscer/gqlgen@v0.17.29/plugin/modelgen/testdata/schema.graphql (about) 1 directive @goTag( 2 key: String! 3 value: String 4 ) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION 5 6 directive @goField( 7 forceResolver: Boolean 8 name: String 9 ) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION | INTERFACE 10 11 type Query { 12 thisShoudlntGetGenerated: Boolean 13 } 14 15 type Mutation { 16 thisShoudlntGetGenerated: Boolean 17 } 18 19 type Subscription { 20 thisShoudlntGetGenerated: Boolean 21 } 22 23 type MissingTypeNotNull implements MissingInterface & ExistingInterface { 24 name: String! 25 enum: MissingEnum! 26 int: MissingInterface! 27 existing: ExistingType! 28 missing2: MissingTypeNullable! 29 } 30 31 type MissingTypeNullable implements MissingInterface & ExistingInterface { 32 name: String 33 enum: MissingEnum 34 int: MissingInterface 35 existing: ExistingType 36 missing2: MissingTypeNotNull 37 } 38 39 input MissingInput { 40 name: String 41 enum: MissingEnum 42 } 43 44 enum MissingEnum { 45 Hello 46 Goodbye 47 } 48 49 interface MissingInterface { 50 name: String 51 } 52 53 union MissingUnion = MissingTypeNotNull | MissingTypeNullable | ExistingType 54 55 type ExistingType implements MissingInterface & ExistingInterface { 56 name: String 57 enum: ExistingEnum 58 int: ExistingInterface 59 existing: MissingTypeNullable 60 } 61 62 input ExistingInput { 63 name: String 64 enum: ExistingEnum 65 } 66 67 type FieldMutationHook { 68 name: String @goTag(key :"anotherTag", value: "tag") 69 enum: ExistingEnum @goTag(key: "yetAnotherTag", value: "12") 70 noVal: String @goTag(key: "yaml") @goTag(key : "repeated", value: "true") 71 repeated: String @goTag(key: "someTag", value: "value") @goTag(key : "repeated", value: "true") 72 73 } 74 75 enum ExistingEnum { 76 Hello 77 Goodbye 78 } 79 80 interface ExistingInterface { 81 name: String 82 } 83 84 union ExistingUnion = MissingTypeNotNull | MissingTypeNullable | ExistingType 85 86 "TypeWithDescription is a type with a description" 87 type TypeWithDescription { 88 name: String 89 } 90 91 "EnumWithDescription is an enum with a description" 92 enum EnumWithDescription { 93 CAT 94 DOG 95 } 96 97 "InterfaceWithDescription is an interface with a description" 98 interface InterfaceWithDescription { 99 name: String 100 } 101 102 "UnionWithDescription is an union with a description" 103 union UnionWithDescription = TypeWithDescription | ExistingType 104 105 106 interface Foo_Barer { 107 name: String! 108 } 109 110 type _Foo_Barr implements Foo_Barer { 111 name: String! 112 } 113 114 # https://spec.graphql.org/October2021/#sec-Interfaces 115 interface A { 116 a: String! 117 } 118 119 interface B { 120 b: Int! 121 } 122 123 interface C implements A { 124 a: String! 125 c: Boolean! 126 } 127 128 interface D implements A & B { 129 a: String! 130 b: Int! 131 d: String 132 } 133 134 type CDImplemented implements C & D & A & B { 135 a: String! 136 b: Int! 137 c: Boolean! 138 d: String 139 } 140 141 type CyclicalA { 142 field_one: CyclicalB 143 field_two: CyclicalB 144 field_three: CyclicalB 145 field_four: String! 146 } 147 148 type CyclicalB { 149 field_one: CyclicalA 150 field_two: CyclicalA 151 field_three: CyclicalA 152 field_four: CyclicalA 153 field_five: String! 154 } 155 156 type NotCyclicalA { 157 FieldOne: String! 158 FieldTwo: Int! 159 } 160 161 type NotCyclicalB { 162 FieldOne: String! 163 FieldTwo: NotCyclicalA! 164 } 165 166 type Recursive { 167 FieldOne: Recursive! 168 FieldTwo: Recursive! 169 FieldThree: Recursive! 170 FieldFour: String! 171 } 172 173 type RenameFieldTest { 174 badName: String! 175 otherField: String! 176 } 177 178 interface ArrayOfA { 179 trickyField: [A!]! 180 trickyFieldPointer: [A] 181 } 182 183 type ImplArrayOfA implements ArrayOfA { 184 trickyField: [CDImplemented!]! 185 trickyFieldPointer: [CDImplemented] 186 } 187 188 interface X { 189 Id: String! @goField(name: "Id") 190 } 191 192 type Xer implements X { 193 Id: String! @goField(name: "Id") 194 Name: String! 195 }