You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Assign tag to fields which needed to be used for contracts.
[Tag("beta")] public string Country { get; set; }
Generate schema from code
var schema = await builder.Services .AddGraphQLServer() .UseField<FieldValidationMiddleware>() .ModifyRequestOptions(opt => opt.IncludeExceptionDetails = builder.Environment.IsDevelopment()) .AddApolloFederation() .AddQueryType<Query>() .AddMutationType<Mutation>() .AllowIntrospection(builder.Configuration.GetValue<bool>("AllowGraphQLIntrospection")) .BuildSchemaAsync();
In schema.graphql, the import array without @tag
schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@key", "FieldSet", "@shareable" ]) { query: Query mutation: Mutation }
which supposed to be
schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@key", "FieldSet", "@shareable", "@tag" ]) { query: Query mutation: Mutation }
Any idea?
I need the tag in import array for my Apollo contract filter configuration to work.
Beta Was this translation helpful? Give feedback.
All reactions