1
0
mirror of synced 2025-12-20 02:19:14 -05:00

Update broken GraphQL site links (#49419)

This commit is contained in:
Sarita Iyer
2024-02-27 17:01:01 -05:00
committed by GitHub
parent fc5a0233b2
commit 58e074582b
13 changed files with 18 additions and 18 deletions

View File

@@ -114,7 +114,7 @@ For a real-world example, see "[Example mutation](#example-mutation)."
## Working with variables ## Working with variables
[Variables](https://graphql.github.io/learn/queries/#variables) can make queries more dynamic and powerful, and they can reduce complexity when passing mutation input objects. [Variables](https://graphql.org/learn/queries/#variables) can make queries more dynamic and powerful, and they can reduce complexity when passing mutation input objects.
{% note %} {% note %}
@@ -398,7 +398,7 @@ You may notice that the `content` field value in the earlier example (where it's
- When you use `content` directly in the mutation, the schema expects the value to be of type [`ReactionContent`](/graphql/reference/enums#reactioncontent), which is an _enum_, not a string. Schema validation will throw an error if you add quotes around the enum value, as quotes are reserved for strings. - When you use `content` directly in the mutation, the schema expects the value to be of type [`ReactionContent`](/graphql/reference/enums#reactioncontent), which is an _enum_, not a string. Schema validation will throw an error if you add quotes around the enum value, as quotes are reserved for strings.
- When you use `content` in a variable, the variables section must be valid JSON, so the quotes are required. Schema validation correctly interprets the `ReactionContent` type when the variable is passed into the mutation during execution. - When you use `content` in a variable, the variables section must be valid JSON, so the quotes are required. Schema validation correctly interprets the `ReactionContent` type when the variable is passed into the mutation during execution.
For more information on the difference between enums and strings, see the [official GraphQL spec](https://graphql.github.io/graphql-spec/June2018/#sec-Enums). For more information on the difference between enums and strings, see the [official GraphQL spec](https://spec.graphql.org/June2018/#sec-Enums).
{% endnote %} {% endnote %}

View File

@@ -18,14 +18,14 @@ The GitHub GraphQL API represents an architectural and conceptual shift from the
## Schema ## Schema
A schema defines a GraphQL API's type system. It describes the complete set of possible data (objects, fields, relationships, everything) that a client can access. Calls from the client are [validated](https://graphql.github.io/learn/validation/) and [executed](https://graphql.github.io/learn/execution/) against the schema. A client can find information about the schema via [introspection](#discovering-the-graphql-api). A schema resides on the GraphQL API server. For more information, see "[Discovering the GraphQL API](#discovering-the-graphql-api)." A schema defines a GraphQL API's type system. It describes the complete set of possible data (objects, fields, relationships, everything) that a client can access. Calls from the client are [validated](https://graphql.org/learn/validation/) and [executed](https://graphql.org/learn/execution/) against the schema. A client can find information about the schema via [introspection](#discovering-the-graphql-api). A schema resides on the GraphQL API server. For more information, see "[Discovering the GraphQL API](#discovering-the-graphql-api)."
## Field ## Field
A field is a unit of data you can retrieve from an object. As the [official GraphQL docs](https://graphql.github.io/learn/schema/) say: A field is a unit of data you can retrieve from an object. As the [official GraphQL docs](https://graphql.org/learn/schema/) say:
"The GraphQL query language is basically about selecting fields on objects." "The GraphQL query language is basically about selecting fields on objects."
The [official spec](https://graphql.github.io/graphql-spec/June2018/#sec-Language.Fields) also says about fields: The [official spec](https://spec.graphql.org/June2018/#sec-Language.Fields) also says about fields:
> All GraphQL operations must specify their selections down to fields which return scalar values to ensure an unambiguously shaped response. > All GraphQL operations must specify their selections down to fields which return scalar values to ensure an unambiguously shaped response.
@@ -78,7 +78,7 @@ _Node_ is a generic term for an object. You can look up a node directly, or you
## Discovering the GraphQL API ## Discovering the GraphQL API
GraphQL is [introspective](https://graphql.github.io/learn/introspection/). This means you can query a GraphQL schema for details about itself. GraphQL is [introspective](https://graphql.org/learn/introspection/). This means you can query a GraphQL schema for details about itself.
- Query `__schema` to list all types defined in the schema and get details about each: - Query `__schema` to list all types defined in the schema and get details about each:

View File

@@ -21,7 +21,7 @@ Migrating from REST to GraphQL represents a significant shift in API logic. The
To migrate your code from the [REST API](/rest) to the GraphQL API: To migrate your code from the [REST API](/rest) to the GraphQL API:
- Review the [GraphQL spec](https://graphql.github.io/graphql-spec/June2018/) - Review the [GraphQL spec](https://spec.graphql.org/June2018/)
- Review GitHub's [GraphQL schema](/graphql/reference) - Review GitHub's [GraphQL schema](/graphql/reference)
- Consider how any existing code you have currently interacts with the GitHub REST API - Consider how any existing code you have currently interacts with the GitHub REST API
- Use [Global Node IDs](/graphql/guides/using-global-node-ids) to reference objects between API versions - Use [Global Node IDs](/graphql/guides/using-global-node-ids) to reference objects between API versions

View File

@@ -107,7 +107,7 @@ When you run this query, you'll see that the `__typename` is [`User`](/graphql/r
## 3. Do a direct node lookup in GraphQL ## 3. Do a direct node lookup in GraphQL
Once you've confirmed the type, you can use an [inline fragment](https://graphql.github.io/learn/queries/#inline-fragments) to access the object by its ID and return additional data. In this example, we define the fields on `User` that we'd like to query: Once you've confirmed the type, you can use an [inline fragment](https://graphql.org/learn/queries/#inline-fragments) to access the object by its ID and return additional data. In this example, we define the fields on `User` that we'd like to query:
```graphql ```graphql
query { query {

View File

@@ -23,9 +23,9 @@ For more information about {% data variables.product.company_short %}'s APIs, se
## About GraphQL ## About GraphQL
The [GraphQL](https://graphql.github.io/) data query language is: The [GraphQL](https://graphql.org/) data query language is:
- **A [specification](https://graphql.github.io/graphql-spec/June2018/).** The spec determines the validity of the [schema](/graphql/guides/introduction-to-graphql#schema) on the API server. The schema determines the validity of client calls. - **A [specification](https://spec.graphql.org/June2018/).** The spec determines the validity of the [schema](/graphql/guides/introduction-to-graphql#schema) on the API server. The schema determines the validity of client calls.
- **[Strongly typed](#about-the-graphql-schema-reference).** The schema defines an API's type system and all object relationships. - **[Strongly typed](#about-the-graphql-schema-reference).** The schema defines an API's type system and all object relationships.

View File

@@ -15,7 +15,7 @@ autogenerated: graphql
## About enums ## About enums
[Enums](https://graphql.github.io/graphql-spec/June2018/#sec-Enums) represent possible sets of values for a field. [Enums](https://spec.graphql.org/June2018/#sec-Enums) represent possible sets of values for a field.
For example, the [`Issue`](/graphql/reference/objects#issue) object has a field called `state`. The state is an enum (specifically, of type [`IssueState`](/graphql/reference/enums#issuestate)) because it may be `OPEN` or `CLOSED`. For example, the [`Issue`](/graphql/reference/objects#issue) object has a field called `state`. The state is an enum (specifically, of type [`IssueState`](/graphql/reference/enums#issuestate)) because it may be `OPEN` or `CLOSED`.

View File

@@ -15,7 +15,7 @@ autogenerated: graphql
## About input objects ## About input objects
[Input objects](https://graphql.github.io/graphql-spec/June2018/#sec-Input-Objects) can be described as "composable objects" because they include a set of input fields that define the object. [Input objects](https://spec.graphql.org/June2018/#sec-Input-Objects) can be described as "composable objects" because they include a set of input fields that define the object.
For example, [`CommitAuthor`](/graphql/reference/input-objects#commitauthor) takes a field called `emails`. Providing a value for `emails` transforms `CommitAuthor` into a list of `User` objects containing that email address. Note that [objects](/graphql/reference/objects) **may** have input objects, whereas [mutations](/graphql/reference/mutations) **require** input objects. For example, [`CommitAuthor`](/graphql/reference/input-objects#commitauthor) takes a field called `emails`. Providing a value for `emails` transforms `CommitAuthor` into a list of `User` objects containing that email address. Note that [objects](/graphql/reference/objects) **may** have input objects, whereas [mutations](/graphql/reference/mutations) **require** input objects.

View File

@@ -15,7 +15,7 @@ autogenerated: graphql
## About interfaces ## About interfaces
[Interfaces](https://graphql.github.io/graphql-spec/June2018/#sec-Interfaces) serve as parent objects from which other objects can inherit. [Interfaces](https://spec.graphql.org/June2018/#sec-Interfaces) serve as parent objects from which other objects can inherit.
For example, [`Lockable`](/graphql/reference/interfaces#lockable) is an interface because both [`Issue`](/graphql/reference/objects#issue) and [`PullRequest`](/graphql/reference/objects#pullrequest) objects can be locked. An interface has its own list of named fields that are shared by implementing objects. For example, [`Lockable`](/graphql/reference/interfaces#lockable) is an interface because both [`Issue`](/graphql/reference/objects#issue) and [`PullRequest`](/graphql/reference/objects#pullrequest) objects can be locked. An interface has its own list of named fields that are shared by implementing objects.

View File

@@ -15,7 +15,7 @@ autogenerated: graphql
## About mutations ## About mutations
Every GraphQL schema has a root type for both queries and mutations. The [mutation type](https://graphql.github.io/graphql-spec/June2018/#sec-Type-System) defines GraphQL operations that change data on the server. It is analogous to performing HTTP verbs such as `POST`, `PATCH`, and `DELETE`. Every GraphQL schema has a root type for both queries and mutations. The [mutation type](https://spec.graphql.org/June2018/#sec-Type-System) defines GraphQL operations that change data on the server. It is analogous to performing HTTP verbs such as `POST`, `PATCH`, and `DELETE`.
For more information, see "[AUTOTITLE](/graphql/guides/forming-calls-with-graphql#about-mutations)." For more information, see "[AUTOTITLE](/graphql/guides/forming-calls-with-graphql#about-mutations)."

View File

@@ -15,7 +15,7 @@ autogenerated: graphql
## About objects ## About objects
[Objects](https://graphql.github.io/graphql-spec/June2018/#sec-Objects) in GraphQL represent the resources you can access. An object can contain a list of fields, which are specifically typed. [Objects](https://spec.graphql.org/June2018/#sec-Objects) in GraphQL represent the resources you can access. An object can contain a list of fields, which are specifically typed.
For example, the [`Repository`](/graphql/reference/objects#repository) object has a field called `name`, which is a `String`. For example, the [`Repository`](/graphql/reference/objects#repository) object has a field called `name`, which is a `String`.

View File

@@ -15,7 +15,7 @@ autogenerated: graphql
## About queries ## About queries
Every GraphQL schema has a root type for both queries and mutations. The [query type](https://graphql.github.io/graphql-spec/June2018/#sec-Type-System) defines GraphQL operations that retrieve data from the server. Every GraphQL schema has a root type for both queries and mutations. The [query type](https://spec.graphql.org/June2018/#sec-Type-System) defines GraphQL operations that retrieve data from the server.
For more information, see "[AUTOTITLE](/graphql/guides/forming-calls-with-graphql#about-queries)." For more information, see "[AUTOTITLE](/graphql/guides/forming-calls-with-graphql#about-queries)."

View File

@@ -15,7 +15,7 @@ autogenerated: graphql
## About scalars ## About scalars
[Scalars](https://graphql.github.io/graphql-spec/June2018/#sec-Scalars) are primitive values: `Int`, `Float`, `String`, `Boolean`, or `ID`. [Scalars](https://spec.graphql.org/June2018/#sec-Scalars) are primitive values: `Int`, `Float`, `String`, `Boolean`, or `ID`.
When calling the GraphQL API, you must specify nested subfields until you return only scalars. When calling the GraphQL API, you must specify nested subfields until you return only scalars.

View File

@@ -15,7 +15,7 @@ autogenerated: graphql
## About unions ## About unions
A [union](https://graphql.github.io/graphql-spec/June2018/#sec-Unions) is a type of object representing many objects. A [union](https://spec.graphql.org/June2018/#sec-Unions) is a type of object representing many objects.
For example, a field marked as an [`ProjectCardItem`](/graphql/reference/unions#projectcarditem) could be an [`Issue`](/graphql/reference/objects#issue) or a [`PullRequest`](/graphql/reference/objects#pullrequest) because each of those objects can be inside a project card. Using a union instead of an object gives you flexibility. For example, a field marked as an [`ProjectCardItem`](/graphql/reference/unions#projectcarditem) could be an [`Issue`](/graphql/reference/objects#issue) or a [`PullRequest`](/graphql/reference/objects#pullrequest) because each of those objects can be inside a project card. Using a union instead of an object gives you flexibility.