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

Fix misbehaving graphql links #4330

Merged
merged 1 commit into from May 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/console-backend-service/CONTRIBUTING.md
Expand Up @@ -36,7 +36,7 @@ Follow these rules while you develop new features for this project.
- Use cache whenever possible for small pieces of data. Monitor resources usage and consider invalidating cache after some period of inactivity that lasts, for example, one day.

**GraphQL:**
- For queries and mutations that have more than three arguments, use [input types](https://graphql.org/learn/schema/#input-types).
- For queries and mutations that have more than three arguments, use [input types](http://graphql.org/learn/schema/#input-types).
- Define the mutated object as a result of the mutation.
- For a query that returns a collection of objects, always return an empty array instead of `nil`. Mark all array elements as non-nullable. For example, define a query in the GraphQL schema that returns an array of service instances as `serviceInstances: [ServiceInstance!]!`.

Expand Down
4 changes: 2 additions & 2 deletions components/console-backend-service/README.md
Expand Up @@ -75,7 +75,7 @@ dep ensure -vendor-only

This project uses the [GQLGen](https://github.com/99designs/gqlgen) library, which improves development by generating code from the [GraphQL schema definition](internal/gqlschema/schema.graphql).

1. Define types and their fields in `/internal/gqlschema/schema.graphql` using the [Schema Definition Language](https://graphql.org/learn/schema/).
1. Define types and their fields in `/internal/gqlschema/schema.graphql` using the [Schema Definition Language](http://graphql.org/learn/schema/).
1. Execute the `./gqlgen.sh` script to run the code generator.
1. Navigate to the `/internal/gqlschema/` directory.
1. Find newly generated methods in the `ResolverRoot` interface located in `./schema_gen.go`.
Expand All @@ -93,4 +93,4 @@ go test ./...

### Verify the code

To check if the code is correct and you can push it, run the `before-commit.sh` script. It builds the application, runs tests, checks the status of the vendored libraries, runs the static code analysis, and ensures that the formatting of the code is correct.
To check if the code is correct and you can push it, run the `before-commit.sh` script. It builds the application, runs tests, checks the status of the vendored libraries, runs the static code analysis, and ensures that the formatting of the code is correct.
2 changes: 1 addition & 1 deletion components/console-backend-service/docs/terminology.md
Expand Up @@ -2,6 +2,6 @@

The project documentation mentions different types of resolvers.

- **Resolver** is a term related to GraphQL itself. It is a function that defines what data to return for a specific [field](https://graphql.org/learn/queries/#fields).
- **Resolver** is a term related to GraphQL itself. It is a function that defines what data to return for a specific [field](http://graphql.org/learn/queries/#fields).
- **Resolver type** is a custom type named `Resolver` that contains methods, which essentially are resolver functions.
- **Resource resolver** is a resolver type that contains methods related to the specific resource.
2 changes: 1 addition & 1 deletion docs/security/03-02-graphql.md
Expand Up @@ -3,7 +3,7 @@ title: GraphQL
type: Details
---

Kyma uses a custom [GraphQL](https://graphql.org/) implementation in the Console Backend Service and deploys an RBAC-based logic to control the access to the GraphQL endpoint. All calls to the GraphQL endpoint require a valid Kyma token for authentication.
Kyma uses a custom [GraphQL](http://graphql.org/) implementation in the Console Backend Service and deploys an RBAC-based logic to control the access to the GraphQL endpoint. All calls to the GraphQL endpoint require a valid Kyma token for authentication.

The authorization in GraphQL uses RBAC, which means that:
- All of the Roles, RoleBindings, ClusterRoles and CluserRoleBindings that you create and assign are effective and give the same permissions when users interact with the cluster resources both through the CLI and the GraphQL endpoints.
Expand Down
2 changes: 1 addition & 1 deletion docs/security/03-03-graphql-request-flow.md
Expand Up @@ -3,7 +3,7 @@ title: GraphQL request flow
type: Details
---

This diagram illustrates the request flow for the Console Backend Service which uses a custom [GraphQL](https://graphql.org/) implementation:
This diagram illustrates the request flow for the Console Backend Service which uses a custom [GraphQL](http://graphql.org/) implementation:

![GraphQL request flow](./assets/002-graphql-request-flow.svg)

Expand Down