99designs / gqlgen

go generate based graphql server library

Home Page:https://gqlgen.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@policy directive is not recognized while loading the schema to generate code

Sulbigar opened this issue · comments

What happened?

Created the schema with the new federation spec.

extend schema
  @link(
    url: "https://specs.apollo.dev/federation/v2.6",
    import: [
      "@key",
      "@policy"
    ]
  )

...
...
type Customer {
    ...
    last4ssn: String! @policy(policies: "testPolicy")
    ...
}
...
...

When I executed the generate command it failed with the below error.

failed to load schema: graph/customer.graphqls:21: Undefined directive policy.

versions

  • go run github.com/99designs/gqlgen version?
    v0.17.43
  • go version?
    go1.21.6 darwin/arm64

Should be resolved by #2876. It's not released yet but hopefully this week.