github.com/niko0xdev/gqlgen@v0.17.55-0.20240120102243-2ecff98c3e37/api/testdata/federation2/graph/federation.go (about) 1 // Code generated by github.com/niko0xdev/gqlgen, DO NOT EDIT. 2 3 package graph 4 5 import ( 6 "context" 7 "errors" 8 "strings" 9 10 "github.com/niko0xdev/gqlgen/plugin/federation/fedruntime" 11 ) 12 13 var ( 14 ErrUnknownType = errors.New("unknown type") 15 ErrTypeNotFound = errors.New("type not found") 16 ) 17 18 func (ec *executionContext) __resolve__service(ctx context.Context) (fedruntime.Service, error) { 19 if ec.DisableIntrospection { 20 return fedruntime.Service{}, errors.New("federated introspection disabled") 21 } 22 23 var sdl []string 24 25 for _, src := range sources { 26 if src.BuiltIn { 27 continue 28 } 29 sdl = append(sdl, src.Input) 30 } 31 32 return fedruntime.Service{ 33 SDL: strings.Join(sdl, "\n"), 34 }, nil 35 }