Extend schema @link - creating a resource to be imported

I’m trying to define a server that can be used with extend schema @link to import a set of types, so they can be used by multiple subgraphs - not Entity types to extend, more like custom scalars.

I tried adding an additional @link(url: after the standard federation 2 link:

  1. The schema name and version are supposed to be optional according to the spec at link v1.0, but they are actually required

GraphQLError: Missing path in feature url ‘http://localhost:8080/
GraphQLError: Expected a version string (of the form v1.2), got Name

  1. The server doesn’t seem to receive any calls to get the schema on offer (and the spec doesn’t state what is required - introspection request and response?)
  2. The types aren’t available to use in the subgraph

GraphQLError: Unknown type BasicType

What an I missing? And is there a spec for defining the server which provides a schema to be imported / linked?

1 Like

Hello :wave:
@link currently is used for internal federation logic and is not a generic mechanism for importing other schema elements. What you are trying to do is currently not supported.