Skip to content

Commit

Permalink
EarlySourceInjector is deprecated. imprement EarlySoourcesIngjector
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamashou committed Oct 30, 2024
1 parent f59e8d1 commit 0ebd448
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ func Generate(ctx context.Context, cfg *config.Config, options ...api.Option) er
return fmt.Errorf("failed to create federation plugin: %w", err)
}

if fed, ok := fedPlugin.(plugin.EarlySourceInjector); ok {
if fed, ok := fedPlugin.(plugin.EarlySourcesInjector); ok {
if sources, err := fed.InjectSourcesEarly(); err == nil {
cfg.GQLConfig.Sources = append(cfg.GQLConfig.Sources, sources...)
} else {
return fmt.Errorf("failed to inject federation directives: %w", err)
}
} else if fed, ok := fedPlugin.(plugin.EarlySourceInjector); ok {
if source := fed.InjectSourceEarly(); source != nil {
cfg.GQLConfig.Sources = append(cfg.GQLConfig.Sources, source)
}
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/urfave/cli/v2"
)

const version = "0.25.3"
const version = "0.25.4"

var versionCmd = &cli.Command{
Name: "version",
Expand Down

0 comments on commit 0ebd448

Please sign in to comment.