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

docs: add showcase #133

Merged
merged 11 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions docs/operators/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,37 @@ schema @server(key: "./key.pem") {
The key can be of any extension, but it's highly recommended to use standards (`pem`, `crt`, `key`).
:::

### showcase

The `@server` directive's `showcase` option allows for hands-on experimentation with server configurations in a controlled environment. This feature simplifies the process of exploring and testing different settings.

#### Use cases

- **Quick Experimentation**: Enables experimenting with random configurations hosted, without the need to restart the server or affect existing setups.

#### Example Usage:

```graphql showLineNumbers
schema @server(showcase: true) {
query: Query
}

type User {
not_id: Int
not_name: String
neo773 marked this conversation as resolved.
Show resolved Hide resolved
}

type Query {
not_user: User @http(path: "/users/1", baseURL: "http://jsonplaceholder.typicode.com")
}
```

![Showcase](/images/docs/showcase.png)

#### Performance Considerations

Using the `showcase` feature can impact performance, as it prioritizes flexibility and ease of testing over speed. Expect slower response times due to the overhead of dynamically applying configurations. This mode is not recommended for production environments.

## batchRequests

Batching in GraphQL combines requests into one, reducing server round trips.
Expand Down
Binary file added static/images/docs/showcase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading