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