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 images on mobile #6085

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6631c84
fix images on mobile
dimaMachina Dec 6, 2024
8caba5b
fix images on mobile
dimaMachina Dec 6, 2024
f0fc1d8
fix images on mobile
dimaMachina Dec 6, 2024
35e71e0
fix images on mobile
dimaMachina Dec 6, 2024
88574bf
fix images on mobile
dimaMachina Dec 6, 2024
ec13144
fix images on mobile
dimaMachina Dec 6, 2024
b95a022
fix images on mobile
dimaMachina Dec 6, 2024
2f0b1a6
fix images on mobile
dimaMachina Dec 6, 2024
f1e8976
fix images on mobile
dimaMachina Dec 6, 2024
47f19c7
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
762e280
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
c655cf5
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
47e5e50
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
6156fbd
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
2063022
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
31fadd2
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
6120184
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
c7fa84e
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
a5057bb
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
1ff85fc
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
4cf2790
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
66daded
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
4d27553
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
0d70a50
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
d75b488
fix images on mobile [skip ci]
dimaMachina Dec 6, 2024
38029cc
fix images on mobile [skip ci]
dimaMachina Dec 9, 2024
ca27982
fix images on mobile [skip ci]
dimaMachina Dec 9, 2024
1fd4d79
fix images on mobile [skip ci]
dimaMachina Dec 9, 2024
4ef4bca
fix images on mobile [skip ci]
dimaMachina Dec 9, 2024
74fc2b3
fix images on mobile [skip ci]
dimaMachina Dec 9, 2024
383cf19
fix images on mobile
dimaMachina Dec 9, 2024
4fe224c
mt-6 is not needed
dimaMachina Dec 9, 2024
473e6d5
Merge branch 'main' into fix-images-on-mobile
dimaMachina Dec 9, 2024
e6e3480
f1x
dimaMachina Dec 9, 2024
955b389
Merge branch 'fix-images-on-mobile' of github.com:kamilkisiela/graphq…
dimaMachina Dec 9, 2024
fe43aa6
fix lint
dimaMachina Dec 9, 2024
85b0fff
rerun
dimaMachina Dec 9, 2024
5d53ce6
fix lint
dimaMachina Dec 9, 2024
f4fed5b
fix lint
dimaMachina Dec 9, 2024
eb33191
fix lint
dimaMachina Dec 9, 2024
be59552
fix lint
dimaMachina Dec 9, 2024
87fffe3
prettier
dimaMachina Dec 9, 2024
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
28 changes: 27 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,37 @@ module.exports = {
},
tailwindcss: {
callees: tailwindCallees,
whitelist: ['light', 'hive-focus', 'hive-focus-within'],
whitelist: ['light', 'hive-focus', 'hive-focus-within', '_text-primary-600'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this class has an underscore prefix?

Copy link
Collaborator Author

@dimaMachina dimaMachina Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this link is not highlighted for some reason, after this change highlighted
image

nextra uses _ prefix for its classes

config: path.join(__dirname, './packages/web/docs/tailwind.config.ts'),
},
},
},
{
files: ['packages/web/docs/src/**/*.mdx'],
parser: 'eslint-mdx',
parserOptions: {
ecmaVersion: 2024,
sourceType: 'module',
},
rules: {
'import/no-duplicates': 'error',
'react/jsx-uses-vars': 'error', // should be enabled, otherwise @typescript-eslint/no-unused-vars gives false positive
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_', // allow underscores in destructuring
},
],
'no-restricted-imports': [
'error',
{
name: 'next/image',
message: 'Use markdown syntax - ![Your image alt attribute](/path/to/your/image)',
},
],
},
},
{
files: 'cypress/**',
extends: 'plugin:cypress/recommended',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"generate": "pnpm --filter @hive/storage db:generate && pnpm graphql:generate",
"graphql:generate": "graphql-codegen --config codegen.mts",
"integration:prepare": "cd integration-tests && ./local.sh",
"lint": "eslint --cache --ignore-path .gitignore \"{packages,cypress}/**/*.{ts,tsx,graphql}\"",
"lint": "eslint --cache --ignore-path .gitignore \"{packages,cypress}/**/*.{ts,tsx,graphql,mdx}\"",
"lint:env-template": "tsx scripts/check-env-template.ts",
"lint:fix": "pnpm lint --fix",
"lint:prettier": "prettier --cache --check .",
Expand Down
2 changes: 1 addition & 1 deletion packages/web/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@radix-ui/react-tabs": "1.1.1",
"@radix-ui/react-tooltip": "1.1.3",
"@tailwindcss/typography": "0.5.15",
"@theguild/components": "7.3.0",
"@theguild/components": "7.3.3",
"clsx": "2.1.1",
"date-fns": "4.1.0",
"next": "14.2.18",
Expand Down
5 changes: 0 additions & 5 deletions packages/web/docs/src/components/screenshot.ts

This file was deleted.

8 changes: 1 addition & 7 deletions packages/web/docs/src/pages/docs/dashboard/explorer.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import NextImage from 'next/image'
import { Callout } from '@theguild/components'
import schemaExplorerImage from '../../../../public/docs/pages/features/schema-explorer.png'

# Schema Explorer

Expand All @@ -9,11 +7,7 @@ your GraphQL schema. Not only does it allow you to explore the different types a
schema, but it also enables you to gain a deeper understanding of the arguments and their respective
input types.

<NextImage
alt="Schema Explorer"
src={schemaExplorerImage}
className="mt-10 max-w-2xl rounded-lg drop-shadow-md"
/>
![Schema Explorer](/docs/pages/features/schema-explorer.png)

## Schema Usage and Coverage

Expand Down
9 changes: 1 addition & 8 deletions packages/web/docs/src/pages/docs/dashboard/insights.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import NextImage from 'next/image'
import usageOperationsImage from '../../../../public/docs/pages/features/usage-operations.png'

# Insights

A list of all the GraphQL operations executed by your consumers, their performance metrics and total
count. By clicking on a specific query, you'll be able to see the full list of fields and arguments
used in the operation.

<NextImage
alt="Insights"
src={usageOperationsImage}
className="mt-10 max-w-2xl rounded-lg drop-shadow-md"
/>
![Insights](/docs/pages/features/usage-operations.png)
7 changes: 2 additions & 5 deletions packages/web/docs/src/pages/docs/dashboard/laboratory.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import NextImage from 'next/image'
import { Callout } from '@theguild/components'
import labFormImage from '../../../../public/docs/pages/features/lab-form.png'
import labImage from '../../../../public/docs/pages/features/lab.png'

# Laboratory

Expand All @@ -14,7 +11,7 @@ You can use the full power of [GraphiQL](https://github.com/graphql/graphiql) di
compose your GraphQL operations, explore with different field and variations, and access your
GraphQL schema full documentation.

<NextImage alt="Lab" src={labImage} className="mt-6 max-w-3xl rounded-lg drop-shadow-md" />
![Laboratory](/docs/pages/features/lab.png)

## Link a Laboratory Endpoint

Expand Down Expand Up @@ -49,7 +46,7 @@ To get started with using the Laboratory mock schema externally, create a
Now, click on the **Use Schema Externally** button on the Laboratory page, and follow the
instructions on the form:

<NextImage alt="Lab Form" src={labFormImage} className="mt-6 max-w-xl rounded-lg drop-shadow-md" />
![Laboratory Form](/docs/pages/features/lab-form.png)

To test access to your setup, try running a `curl` command to run a simple GraphQL query against
your mocked schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ description:
a robust set of features to handle HTTP on Node.js applications.
---

import { Callout } from '@theguild/components'

# Integration with Express

[Express is the most popular web framework for Node.js.](https://expressjs.com/) It is a minimalist
Expand Down Expand Up @@ -65,7 +63,7 @@ const app = express()

const serveRuntime = createGatewayRuntime(/* Your configuration */)
const hiveGWRouter = express.Router()
// GraphiQL specefic CSP configuration
// GraphiQL specific CSP configuration
hiveGWRouter.use(
helmet({
contentSecurityPolicy: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ description:
powerful framework that is easy to learn and use.
---

import { Callout } from '@theguild/components'

# Integration with Fastify

[Fastify is one of the popular HTTP server frameworks for Node.js.](https://www.fastify.io/) It is a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Callout } from '@theguild/components'

# Integration with Hapi

[Hapi](https://hapi.dev) allows you to build powerful, scalable applications, with minimal overhead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ description:
expressive, and more robust foundation for web applications and APIs.
---

import { Callout } from '@theguild/components'

# Integration with Koa

[Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.](https://koajs.com)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ description:
integrated with Next.js easily as an API Route.
---

import { Callout } from '@theguild/components'

# Integration with Next.js

[Next.js](https://nextjs.org) is a web framework that allows you to build websites very quickly and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
description: µWebSockets.js is an HTTP/WebSocket server for Node.js.
---

import { Callout } from '@theguild/components'

# Integration with µWebSockets.js

[µWebSockets.js](https://github.com/uNetworking/uWebSockets.js) is an alternative to Node.js's
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ description:
platform besides Node.js.
---

import { Callout } from '@theguild/components'

# Integration with Bun

Hive Gateway provides you a cross-platform GraphQL Server. So you can easily integrate it into any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ description:
platform besides Node.js.
---

import { Callout } from '@theguild/components'

# Integration with Deno

Hive Gateway provides you a cross-platform GraphQL Server. So you can easily integrate it into any
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Callout } from '@theguild/components'

# Node.js

Node.js is the most common runtime for JavaScript.
Expand Down
2 changes: 1 addition & 1 deletion packages/web/docs/src/pages/docs/gateway/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description:
Hive Gateway is the GraphQL federation Gateway and/or Proxy Gateway for your GraphQL services.
---

import { Callout, Cards, Tabs } from '@theguild/components'
import { Cards, Tabs } from '@theguild/components'

# Hive Gateway

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ description:
behavior of your Hive Gateway.
---

import Image from 'next/image'
import { Table, Td, Th, Tr } from 'nextra/components'
import { Callout, Cards, Tabs } from '@theguild/components'
import { Callout, Tabs } from '@theguild/components'

# Monitoring and Tracing

Expand Down Expand Up @@ -130,7 +128,7 @@ The following are available to use with this plugin:

<Tabs items={['CLI', 'Programmatic Usage']}>

<Tabs.Tab>
<Tabs.Tab>

```ts filename="gateway.config.ts"
import { createStdoutExporter, defineConfig } from '@graphql-hive/gateway'
Expand Down Expand Up @@ -159,7 +157,7 @@ export const gatewayConfig = defineConfig({
})
```

</Tabs.Tab>
</Tabs.Tab>

<Tabs.Tab>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
searchable: false
---

import { Callout } from '@theguild/components'

# Deduplicate HTTP Requests

Most of the time, your Hive Gateway will receive multiple requests for the same data. This can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ description:
searchable: false
---

import { Callout } from '@theguild/components'

# Request Batching

Batching is the process of taking a group of requests, combining them into one, and making a single
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
searchable: false
---

import { Callout } from '@theguild/components'

# Upstream Cancellation

This feature enables you to cancel the upstream HTTP requests when the client cancels the downstream
GraphQL request. This can be useful when you want to save resources on your server and the services.

There is also
[Execution Cancellation](/docs/gateway/other-features/performance/execution-cancellation) that stops
the execution, but it doesn't stop ongoing HTTP requests. This seperately allows you to stop the
the execution, but it doesn't stop ongoing HTTP requests. This separately allows you to stop the
HTTP requests by hooking into [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).

## Enable Upstream Cancellation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
searchable: false
---

import { Callout } from '@theguild/components'

# Block Field Suggestions

This is a feature that allows you to prevent **returning field suggestions** and **leaking your
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
searchable: false
---

import { Callout } from '@theguild/components'

# Cost Limit

**Limit** the **complexity** of a GraphQL document by using
Expand All @@ -18,35 +16,35 @@ npm install @escape.tech/graphql-armor-cost-limit
Then, add it to your plugins:

```ts filename="gateway.config.ts"
import {defineConfig} from '@graphql-hive/gateway';
import { costLimitPlugin } from '@escape.tech/graphql-armor-cost-limit';
import { costLimitPlugin } from '@escape.tech/graphql-armor-cost-limit'
import { defineConfig } from '@graphql-hive/gateway'

export const gatewayConfig = defineConfig({
plugins: () => [
costLimitPlugin({
// Toogle the plugin | default: true
enabled: true,
// Cost allowed for the query | default: 5000
maxCost: 5000,
// Static cost of an object | default: 2
objectCost: 2,
// Static cost of a field | default: 1
scalarCost: 1,
// Factorial applied to nested operator | default: 1.5
depthCostFactor: 1.5,
// Ignore the cost of introspection queries | default: true
ignoreIntrospection: true,
// Do you want to propagate the rejection to the client? | default: true
propagateOnRejection: true,

/* Advanced options (use here on your own risk) */

// Callbacks that are ran whenever a Query is accepted
onAccept: []

// Callbacks that are ran whenever a Query is rejected
onReject: []
}),
// Toogle the plugin | default: true
enabled: true,
// Cost allowed for the query | default: 5000
maxCost: 5000,
// Static cost of an object | default: 2
objectCost: 2,
// Static cost of a field | default: 1
scalarCost: 1,
// Factorial applied to nested operator | default: 1.5
depthCostFactor: 1.5,
// Ignore the cost of introspection queries | default: true
ignoreIntrospection: true,
// Do you want to propagate the rejection to the client? | default: true
propagateOnRejection: true,

/* Advanced options (use here on your own risk) */

// Callbacks that are ran whenever a Query is accepted
onAccept: [],

// Callbacks that are ran whenever a Query is rejected
onReject: []
})
]
});
})
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ description:
searchable: false
---

import { Callout } from '@theguild/components'

# CSRF Prevention

If you have CORS enabled, almost all requests coming from the browser will have a preflight
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
searchable: false
---

import { Callout } from '@theguild/components'

# Error Masking

Hive Gateway automatically masks unexpected errors and prevents leaking sensitive information to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
searchable: false
---

import { Callout } from '@theguild/components'

# Secure your Gateway

Building a secure GraphQL API is hard by design because of the “Graph” nature of GraphQL. Libraries
Expand Down Expand Up @@ -102,7 +100,7 @@ sequence of characters into a sequence of lexical tokens.
E.g. given the following GraphQL operation.

```graphql
graphql {
query {
me {
id
user
Expand Down
Loading
Loading