Can we allow to use "unsafe" in localPlugins? Thanks!

Hi Traefik team, we are trying to add some customized logic to filter GraphQL in our project.

Currently, I only found a package that can parse GraphQL query as AST tree GitHub - wundergraph/graphql-go-tools: GraphQL Router / API Gateway framework written in Golang, focussing on correctness, extensibility, and high-performance. Supports Federation v1 & v2, Subscriptions & more.

However, after I vendored it and run the plugin, I got the error

traefik.go:79: command traefik error: xx/traefik-plugin-filter-graphql: failed to import plugin code "xx/traefik-plugin-filter-graphql": 1:21: import "xx/traefik-plugin-filter-graphql" error: plugins-local/src/xx/traefik-plugin-filter-graphql/main.go:8:2: import "github.com/wundergraph/graphql-go-tools/pkg/astparser" error: plugins-local/src/xx/traefik-plugin-filter-graphql/vendor/github.com/wundergraph/graphql-go-tools/pkg/astparser/parser.go:8:2: import "github.com/wundergraph/graphql-go-tools/internal/pkg/unsafebytes" error: plugins-local/src/xx/traefik-plugin-filter-graphql/vendor/github.com/wundergraph/graphql-go-tools/internal/pkg/unsafebytes/unsafebytes.go:6:2: import "unsafe" error: unable to find source related to: "unsafe"

I know it makes sense that not allow using unsafe as a public plugin. However, can we allow using unsafe as a localPlugin? Thanks! :smiley:

That will unblock more potentials and possibilities!


Some related tickets:

https://community.traefik.io/t/how-to-import-plugin-that-uses-unsafe-package/11186