1
0
mirror of synced 2025-12-19 18:10:59 -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
[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 %}
@@ -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` 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 %}

View File

@@ -18,14 +18,14 @@ The GitHub GraphQL API represents an architectural and conceptual shift from the
## 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
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 [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.
@@ -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
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:

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:
- 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)
- 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

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
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
query {