Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1972 - drafting @tag documentation. #1993

Closed
wants to merge 1 commit into from
Closed

1972 - drafting @tag documentation. #1993

wants to merge 1 commit into from

Conversation

jeffjakub
Copy link
Contributor

Creating a draft PR to iterate on the @tag directive spec.
This PR relates to: #1972

@apollo-cla
Copy link

@jeffjakub: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@netlify
Copy link

netlify bot commented Jul 18, 2022

Deploy Preview for apollo-federation-docs ready!

Name Link
🔨 Latest commit 40c11c5
🔍 Latest deploy log https://app.netlify.com/sites/apollo-federation-docs/deploys/62d5ceccf5014f000995a286
😎 Deploy Preview https://deploy-preview-1993--apollo-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

directive @tag(from: String!) on FIELD_DEFINITION | INTERFACE | OBJECT | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION
```

The `@tag` directive is used to provide a mechanism for applying arbitrary string metadata to the fields and types of a schema. This metadata is potentially useful throughout the schema’s lifecycle, including, but not limited to, processing, static analysis, and documentation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also link to https://www.apollographql.com/docs/studio/contracts as that is the primary use case?


```graphql
schema
@core(feature: "https://specs.apollo.dev/core/v0.2")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be @linked instead? i.e. nowhere else in the docs we mention @core directive in our examples

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, should be @link. @core was the old way. Also, we should get the @tag from the federation CoreFeature.

@link(url: "https://specs.apollo.dev/federation/v2.0", import: ["@tag"])

@jeffjakub jeffjakub self-assigned this Jul 20, 2022

The `@tag` directive is used to provide a mechanism for applying arbitrary string metadata to the fields and types of a schema. This metadata is potentially useful throughout the schema’s lifecycle, including, but not limited to, processing, static analysis, and documentation.

```graphql
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a sentence, saying that @tag will be propagated up to the supergraph automatically (as Phil mentioned in the @inaccessible spec)

@jeffjakub jeffjakub closed this Aug 2, 2022
@jeffjakub jeffjakub deleted the 1972-tag-spec branch August 2, 2022 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants