Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Coffman <steve@khanacademy.org>
  • Loading branch information
StevenACoffman committed Jan 30, 2024
1 parent 4d8b6ed commit e174d59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ func Generate(cfg *config.Config, option ...Option) error {
for _, v := range cfg.Sources {
cfg.Federation.Version = 1
urlString := urlRegex.FindStringSubmatch(v.Input)
if urlString != nil && urlString[1] == "https://specs.apollo.dev/federation/v2.7" {
// e.g. urlString[1] == "https://specs.apollo.dev/federation/v2.7"
if urlString != nil {
matches := versionRegex.FindStringSubmatch(urlString[1])
if matches[1] == "2" {
cfg.Federation.Version = 2
Expand Down

0 comments on commit e174d59

Please sign in to comment.