Skip to content

Commit

Permalink
Fix links to /graphql-js
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie authored Feb 4, 2025
1 parent 7119553 commit 993e5f5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/code/language-support/javascript/server/graphql-js.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: GraphQL.js
description: The reference implementation of the GraphQL specification, designed for running GraphQL in a Node.js environment.
url: /graphql-js/
url: https://www.graphql-js.org/
github: graphql/graphql-js
npm: "graphql"
---
Expand Down
2 changes: 1 addition & 1 deletion src/pages/faq/best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can implement authentication with common patterns, such as [OAuth](https://o

Some [GraphQL libraries](/code/#language-support) include a specific protocol for authentication as well. Although if you’re working with a pipeline model, we recommend that [GraphQL be placed after all authentication middleware](/learn/serving-over-http/#web-request-pipeline).

If you’re using [GraphQL.js](/graphql-js/) to build your API server, we have documentation on [handling authentication with Express middleware](/graphql-js/authentication-and-express-middleware/).
If you’re using [GraphQL.js](https://www.graphql-js.org/) to build your API server, we have documentation on [handling authentication with Express middleware](https://www.graphql-js.org/docs/authentication-and-express-middleware/).

## Is GraphQL the right fit for designing a microservice architecture?

Expand Down
2 changes: 1 addition & 1 deletion src/pages/faq/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Before you start your learning journey, make sure you know [what an API is](http

No, not at all. [GraphQL is a specification](https://spec.graphql.org/) that can be [implemented in any language](/learn/schema/#type-language). Our [Code page](/code/) contains a long list of libraries in many different programming languages to help with that.

It’s understandable why you’d think this, though. GraphQL was introduced at a [React conference](https://www.youtube.com/watch?v=9sc8Pyc51uU) and [GraphQL.js](/graphql-js/) is one of the most widely used implementations to date. We know this can be confusing, so we’re working to improve our documentation and add more code samples that aren’t written in JavaScript.
It’s understandable why you’d think this, though. GraphQL was introduced at a [React conference](https://www.youtube.com/watch?v=9sc8Pyc51uU) and [GraphQL.js](https://www.graphql-js.org/) is one of the most widely used implementations to date. We know this can be confusing, so we’re working to improve our documentation and add more code samples that aren’t written in JavaScript.
4 changes: 2 additions & 2 deletions src/pages/learn/authorization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p className="learn-subtitle">Delegate authorization logic to the business logic layer</p>

Most APIs will need to secure access to certain types of data depending on who requested it, and GraphQL is no different. GraphQL execution should begin after [authentication](/graphql-js/authentication-and-express-middleware/) middleware confirms the user's identity and passes that information to the GraphQL layer. But after that, you still need to determine if the authenticated user is allowed to view the data provided by the specific fields that were included in the request. On this page, we'll explore how a GraphQL schema can support authorization.
Most APIs will need to secure access to certain types of data depending on who requested it, and GraphQL is no different. GraphQL execution should begin after [authentication](https://www.graphql-js.org/docs/authentication-and-express-middleware/) middleware confirms the user's identity and passes that information to the GraphQL layer. But after that, you still need to determine if the authenticated user is allowed to view the data provided by the specific fields that were included in the request. On this page, we'll explore how a GraphQL schema can support authorization.

## Type and field authorization

Expand Down Expand Up @@ -60,7 +60,7 @@ function Post_body(obj, args, context, info) {
}
```
In the example above, we see that the business logic layer requires the caller to provide a user object, which is available in the `context` object for the GraphQL request. We recommend passing a fully-hydrated user object instead of an opaque token or API key to your business logic layer. This way, we can handle the distinct concerns of [authentication](/graphql-js/authentication-and-express-middleware/) and authorization in different stages of the request processing pipeline.
In the example above, we see that the business logic layer requires the caller to provide a user object, which is available in the `context` object for the GraphQL request. We recommend passing a fully-hydrated user object instead of an opaque token or API key to your business logic layer. This way, we can handle the distinct concerns of [authentication](https://www.graphql-js.org/docs/authentication-and-express-middleware/) and authorization in different stages of the request processing pipeline.
## Using type system directives
Expand Down
2 changes: 1 addition & 1 deletion src/pages/learn/execution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ This example is written in JavaScript, however GraphQL servers can be built in [
- `obj`: The previous object (for a field on the root `Query` type, this argument is often not used).
- `args`: The arguments provided to the field in the GraphQL operation.
- `context`: A value provided to every resolver that may hold important contextual information like the currently logged in user, or access to a database.
- `info`: generally only used in advanced use-cases, this is a value holding field-specific information relevant to the current operation as well as the schema details; refer to [type GraphQLResolveInfo](/graphql-js/type/#graphqlobjecttype) for more details.
- `info`: generally only used in advanced use-cases, this is a value holding field-specific information relevant to the current operation as well as the schema details; refer to [type GraphQLResolveInfo](https://www.graphql-js.org/api-v16/type/#graphqlobjecttype) for more details.

<Callout type="info">
Note that while a query operation could technically write data to the underlying data system during its execution, mutation operations are conventionally used for requests that produce side effects during their execution. And because mutation operations produce side effects, GraphQL implementations can be expected to execute these fields serially.
Expand Down

0 comments on commit 993e5f5

Please sign in to comment.