github.com/robertoortis/gqlgenm@v0.7.2/codegen/testserver/models.go (about) 1 package testserver 2 3 import ( 4 context "context" 5 "fmt" 6 ) 7 8 type ForcedResolver struct { 9 Field Circle 10 } 11 12 type ModelMethods struct { 13 } 14 15 func (m ModelMethods) NoContext() bool { 16 return true 17 } 18 19 func (m ModelMethods) WithContext(_ context.Context) bool { 20 return true 21 } 22 23 type Error struct { 24 ID string 25 } 26 27 func (Error) ErrorOnRequiredField() (string, error) { 28 return "", fmt.Errorf("boom") 29 } 30 31 func (Error) ErrorOnNonRequiredField() (string, error) { 32 return "", fmt.Errorf("boom") 33 } 34 35 func (Error) NilOnRequiredField() *string { 36 return nil 37 } 38 39 type EmbeddedPointerModel struct { 40 *EmbeddedPointer 41 ID string 42 } 43 44 type EmbeddedPointer struct { 45 Title string 46 }