diff --git a/.gitignore b/.gitignore index dba6f6028..ef73325b7 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,5 @@ packages/web/app/next.config.mjs packages/web/app/environment-*.mjs packages/web/app/src/gql/*.ts packages/web/app/src/graphql/*.ts + +_redirects diff --git a/README.md b/README.md index fb090b0b9..de22e592a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ GraphQL Hive has been built with 3 main objectives in mind: Registry, Performance Monitoring, Alerts, and Integrations. - **Support all kinds of GraphQL APIs**, from Federation, and Stitching, to standalone APIs. - **Open Source at the heart**: 100% open-source and build in public with the community. -- **A plug and play SaaS solution**: to give access to Hive to most people with a generous free +- **A plug and play Cloud solution**: to give access to Hive to most people with a generous free "Hobby plan" ## Features Overview @@ -75,10 +75,10 @@ See you in Hive! 🐝 - General: NodeJS, TypeScript - Authentication: SuperTokens - HTTP Server: Fastify -- APIs: GraphQL, GraphQL-Yoga, GraphQL-Codegen, GraphQL Inspector, GraphQL-Modules +- APIs: GraphQL, GraphQL-Yoga, GraphQL-Codegen, GraphQL-Inspector, GraphQL-Modules - App: React, Next.js, Tailwind CSS, Radix Primitives - CLI: Oclif -- Deployment (SaaS): Pulumi, K8s, Contour (Envoy), Azure Cloud, CloudFlare Workers, KV Cache, R2 +- Deployment (Cloud): Pulumi, K8s, Contour (Envoy), Azure Cloud, CloudFlare Workers, CloudFlare R2 - Monitoring: Prometheus, Grafana, Sentry - Databases: Postgres, Redis, ClickHouse diff --git a/configs/tsup/utils.ts b/configs/tsup/utils.ts index cd5c0574b..52a64c20e 100644 --- a/configs/tsup/utils.ts +++ b/configs/tsup/utils.ts @@ -10,6 +10,7 @@ const currentPackage = packagesMetadata.packages.find(p => p.dir === libDir); export const commonWatchList = () => { return [ libDir + '/src/**/*', + libDir + '/.env', libDir + '/tsconfig.json', rootDir + '/tsconfig.json', rootDir + '/tsup.config.*', diff --git a/docs/TESTING.md b/docs/TESTING.md index 831465eae..38ae73887 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -125,11 +125,11 @@ export DOCKER_TAG=":IMAGE_TAG_HERE" Keep in mind that integration tests are running a combination of 2 Docker Compose files: 1. `docker-compose.community.yml` - this is also used for self-hosting Hive, so this file contains - all services and configurations needed for running Hive core (without SaaS-specific services, + all services and configurations needed for running Hive core (without Cloud-specific services, like billing). 2. `docker-compose.integration.yaml` - An extension and overrides file: we are using that file to run local services such as CloudFlare CDN mock, external composition service and so on - this is - done in order to mock a complete Hive SaaS environment and test all features. **This file also + done in order to mock a complete Hive Cloud environment and test all features. **This file also includes overrides such as environment variables that are specific only for integration testing - so make sure to choose wisely where to add environment variables!** diff --git a/integration-tests/docker-compose.integration.yaml b/integration-tests/docker-compose.integration.yaml index 251af6800..41de97552 100644 --- a/integration-tests/docker-compose.integration.yaml +++ b/integration-tests/docker-compose.integration.yaml @@ -1,6 +1,6 @@ # Note: this is an overrides file for ./docker/docker-compose.community.yml: # It's used for setting special environment and configurations for running integration tests. -# This file also includes services that only exists in Hive's SaaS version, and are not available in the self-hosted version. +# This file also includes services that only exists in Hive's Cloud version, and are not available in the self-hosted version. # Please refer to TESTING.md for more information. version: '3.8' diff --git a/packages/libraries/cli/README.md b/packages/libraries/cli/README.md index a0ba5c869..850d0cc5b 100644 --- a/packages/libraries/cli/README.md +++ b/packages/libraries/cli/README.md @@ -1,38 +1,36 @@ -# GraphQL Hive CLI +# Hive CLI (Command Line Interface) -A CLI util to manage and control your GraphQL Hive +A CLI util to manage and control your GraphQL Hive. You can perform +[schema-registry actions](https://docs.graphql-hive.com/features/schema-registry#actions-on-schemas) +on your Hive targets using the Hive CLI. -[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) [![Version](https://img.shields.io/npm/v/@graphql-hive/cli.svg)](https://npmjs.org/package/@graphql-hive/cli) -[![Downloads/week](https://img.shields.io/npm/dw/@graphql-hive/cli.svg)](https://npmjs.org/package/@graphql-hive/cli) - +## Installation -- [GraphQL Hive CLI](#graphql-hive-cli) -- [Usage](#usage) -- [Commands](#commands) -- [Config](#config) - +### NodeJS -# Usage +If you are running a JavaScript/NodeJS project, you can install Hive CLI from the `npm` registry: - - -```sh-session -$ npm install -g @graphql-hive/cli -$ hive COMMAND -running command... -$ hive (--version) -@graphql-hive/cli/0.20.0 darwin-arm64 node-v18.14.0 -$ hive --help [COMMAND] -USAGE - $ hive COMMAND -... +``` +pnpm install -D @graphql-hive/cli +yarn add -D @graphql-hive/cli +npm install -D @graphql-hive/cli ``` - +> We recommend installing Hive CLI as part of your project, under `devDependencies`, instead of +> using a global installation. -# Commands +### Binary + +If you are running a non-JavaScript project, you can download the prebuilt binary of Hive CLI using +the following command: + +```bash +curl -sSL https://graphql-hive.com/install.sh | sh +``` + +## Commands @@ -55,7 +53,7 @@ deletes specific cli configuration ``` USAGE - $ hive config:delete [KEY] + $ hive config:delete KEY ARGUMENTS KEY config key @@ -65,7 +63,7 @@ DESCRIPTION ``` _See code: -[dist/commands/config/delete.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.0/dist/commands/config/delete.js)_ +[dist/commands/config/delete.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.2/dist/commands/config/delete.js)_ ## `hive config:get KEY` @@ -73,7 +71,7 @@ prints specific cli configuration ``` USAGE - $ hive config:get [KEY] + $ hive config:get KEY ARGUMENTS KEY config key @@ -83,7 +81,7 @@ DESCRIPTION ``` _See code: -[dist/commands/config/get.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.0/dist/commands/config/get.js)_ +[dist/commands/config/get.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.2/dist/commands/config/get.js)_ ## `hive config:reset` @@ -98,7 +96,7 @@ DESCRIPTION ``` _See code: -[dist/commands/config/reset.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.0/dist/commands/config/reset.js)_ +[dist/commands/config/reset.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.2/dist/commands/config/reset.js)_ ## `hive config:set KEY VALUE` @@ -106,7 +104,7 @@ updates specific cli configuration ``` USAGE - $ hive config:set [KEY] [VALUE] + $ hive config:set KEY VALUE ARGUMENTS KEY config key @@ -117,7 +115,7 @@ DESCRIPTION ``` _See code: -[dist/commands/config/set.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.0/dist/commands/config/set.js)_ +[dist/commands/config/set.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.2/dist/commands/config/set.js)_ ## `hive help [COMMANDS]` @@ -138,7 +136,7 @@ DESCRIPTION ``` _See code: -[@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.4/src/commands/help.ts)_ +[@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.6/src/commands/help.ts)_ ## `hive operations:check FILE` @@ -146,7 +144,7 @@ checks operations against a published schema ``` USAGE - $ hive operations:check [FILE] [--registry ] [--token ] [--require ] + $ hive operations:check FILE [--registry ] [--token ] [--require ] ARGUMENTS FILE Glob pattern to find the operations @@ -161,7 +159,7 @@ DESCRIPTION ``` _See code: -[dist/commands/operations/check.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.0/dist/commands/operations/check.js)_ +[dist/commands/operations/check.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.2/dist/commands/operations/check.js)_ ## `hive operations:publish FILE` @@ -169,7 +167,7 @@ saves operations to the store ``` USAGE - $ hive operations:publish [FILE] [--registry ] [--token ] [--require ] + $ hive operations:publish FILE [--registry ] [--token ] [--require ] ARGUMENTS FILE Glob pattern to find the operations @@ -185,7 +183,7 @@ DESCRIPTION ``` _See code: -[dist/commands/operations/publish.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.0/dist/commands/operations/publish.js)_ +[dist/commands/operations/publish.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.2/dist/commands/operations/publish.js)_ ## `hive schema:check FILE` @@ -193,7 +191,7 @@ checks schema ``` USAGE - $ hive schema:check [FILE] [--service ] [--registry ] [--token ] [--forceSafe] [--github] + $ hive schema:check FILE [--service ] [--registry ] [--token ] [--forceSafe] [--github] [--require ] ARGUMENTS @@ -213,7 +211,7 @@ DESCRIPTION ``` _See code: -[dist/commands/schema/check.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.0/dist/commands/schema/check.js)_ +[dist/commands/schema/check.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.2/dist/commands/schema/check.js)_ ## `hive schema:delete SERVICE` @@ -221,7 +219,7 @@ deletes a schema ``` USAGE - $ hive schema:delete [SERVICE] [--registry ] [--token ] [--dryRun] [--confirm] + $ hive schema:delete SERVICE [--registry ] [--token ] [--dryRun] [--confirm] ARGUMENTS SERVICE name of the service @@ -237,7 +235,7 @@ DESCRIPTION ``` _See code: -[dist/commands/schema/delete.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.0/dist/commands/schema/delete.js)_ +[dist/commands/schema/delete.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.2/dist/commands/schema/delete.js)_ ## `hive schema:publish FILE` @@ -245,8 +243,8 @@ publishes schema ``` USAGE - $ hive schema:publish [FILE] [--service ] [--url ] [--metadata ] [--registry ] - [--token ] [--author ] [--commit ] [--github] [--force] [--experimental_acceptBreakingChanges] + $ hive schema:publish FILE [--service ] [--url ] [--metadata ] [--registry ] [--token + ] [--author ] [--commit ] [--github] [--force] [--experimental_acceptBreakingChanges] [--require ] ARGUMENTS @@ -273,7 +271,7 @@ DESCRIPTION ``` _See code: -[dist/commands/schema/publish.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.0/dist/commands/schema/publish.js)_ +[dist/commands/schema/publish.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.2/dist/commands/schema/publish.js)_ ## `hive update [CHANNEL]` @@ -311,7 +309,7 @@ EXAMPLES ``` _See code: -[@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/v3.1.3/src/commands/update.ts)_ +[@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/v3.1.6/src/commands/update.ts)_ ## `hive whoami` @@ -330,30 +328,25 @@ DESCRIPTION ``` _See code: -[dist/commands/whoami.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.0/dist/commands/whoami.js)_ +[dist/commands/whoami.js](https://github.com/kamilkisiela/graphql-hive/blob/v0.20.2/dist/commands/whoami.js)_ - +## Configuration -# Config +### Environment Variables -In addition to using the CLI args, you can also define your configuration in a JSON file which the -CLI would pick up when it runs. +You may set the `HIVE_TOKEN` environment variable while running the Hive CLI, in order to set it +globally. -You can use the `HIVE_CONFIG` environment variable to define the path to the JSON file as follows: +### Config file (`hive.json`) -`HIVE_CONFIG=/path/to/hive.json hive schema:publish --author Vignesh path/to/file.gql` - -Note that the CLI args will override the values in config if both are specified. - -This is how the structure of the config file should look like: +You can create a `hive.json` file to manage your Hive configuration, you may use the following JSON +keys: ```json { - "registry": "", - "token": "" + "registry": "", + "token": "" } ``` - - diff --git a/packages/services/api/src/modules/target/module.graphql.ts b/packages/services/api/src/modules/target/module.graphql.ts index b947ff7e3..dd0adbdc7 100644 --- a/packages/services/api/src/modules/target/module.graphql.ts +++ b/packages/services/api/src/modules/target/module.graphql.ts @@ -116,6 +116,7 @@ export default gql` id: ID! cleanId: ID! name: String! + project: Project! } type TargetSettings { diff --git a/packages/services/api/src/modules/target/resolvers.ts b/packages/services/api/src/modules/target/resolvers.ts index f1134b532..3d1eb741b 100644 --- a/packages/services/api/src/modules/target/resolvers.ts +++ b/packages/services/api/src/modules/target/resolvers.ts @@ -1,6 +1,7 @@ import { z } from 'zod'; import { createConnection } from '../../shared/schema'; import { OrganizationManager } from '../organization/providers/organization-manager'; +import { ProjectManager } from '../project/providers/project-manager'; import { IdTranslator } from '../shared/providers/id-translator'; import type { TargetModule } from './__generated__/types'; import { TargetManager } from './providers/target-manager'; @@ -9,6 +10,13 @@ const TargetNameModel = z.string().min(2).max(30); const PercentageModel = z.number().min(0).max(100); export const resolvers: TargetModule.Resolvers = { + Target: { + project: (target, args, { injector }) => + injector.get(ProjectManager).getProject({ + project: target.projectId, + organization: target.orgId, + }), + }, Query: { async target(_, { selector }, { injector }) { const translator = injector.get(IdTranslator); diff --git a/packages/services/cdn-worker/.env.template b/packages/services/cdn-worker/.env.template new file mode 100644 index 000000000..fa88094e0 --- /dev/null +++ b/packages/services/cdn-worker/.env.template @@ -0,0 +1,5 @@ +S3_ENDPOINT=http://localhost:9000 +S3_ACCESS_KEY_ID="minioadmin" +S3_SECRET_ACCESS_KEY="minioadmin" +S3_BUCKET_NAME="artifacts" +S3_PUBLIC_URL="http://localhost:9000" \ No newline at end of file diff --git a/packages/services/cdn-worker/package.json b/packages/services/cdn-worker/package.json index be2fc4cb3..ba02d76f1 100644 --- a/packages/services/cdn-worker/package.json +++ b/packages/services/cdn-worker/package.json @@ -22,6 +22,7 @@ "@types/service-worker-mock": "2.0.1", "@whatwg-node/fetch": "0.8.2", "@whatwg-node/server": "0.7.4", + "dotenv": "16.0.3", "esbuild": "0.17.11", "fastify": "3.29.5", "itty-router": "2.6.6", diff --git a/packages/services/cdn-worker/src/dev-polyfill.ts b/packages/services/cdn-worker/src/dev-polyfill.ts index 8f57a6102..3524abdf4 100644 --- a/packages/services/cdn-worker/src/dev-polyfill.ts +++ b/packages/services/cdn-worker/src/dev-polyfill.ts @@ -1,3 +1,4 @@ +import 'dotenv/config'; import { crypto, Headers, ReadableStream, Request, Response } from '@whatwg-node/fetch'; if (!globalThis.Response) { diff --git a/packages/services/external-composition/federation-2/README.md b/packages/services/external-composition/federation-2/README.md index c9138e000..be11005d1 100644 --- a/packages/services/external-composition/federation-2/README.md +++ b/packages/services/external-composition/federation-2/README.md @@ -6,7 +6,7 @@ Hive comes with support for Apollo Federation v2, based on [external composition](https://docs.graphql-hive.com/features/external-schema-composition). This package provides a reference for running external composition as a NodeJS service, on your -local infrastructure, and connect GraphQL Hive (SaaS or self-service). +local infrastructure, and connect GraphQL Hive (Cloud or self-service). # Usage @@ -31,8 +31,8 @@ docker run -p 3069 -e SECRET="MY_SECRET_HERE" ghcr.io/kamilkisiela/graphql-hive/ The container runs on port `3069` by default (you can chnage it using `PORT` env var), and listens to `POST /compose` requests coming from Hive platform. -You should make this service publicly available and accessible to use it with Hive SaaS platform, or -make it availble in your local/private network if you are using Hive on-prem. +You should make this service publicly available and accessible to use it with Hive Cloud platform, +or make it availble in your local/private network if you are using Hive on-prem. ## Running from source code diff --git a/packages/services/rate-limit/package.json b/packages/services/rate-limit/package.json index ae5a3f2dd..4ac4de779 100644 --- a/packages/services/rate-limit/package.json +++ b/packages/services/rate-limit/package.json @@ -2,7 +2,7 @@ "name": "@hive/rate-limit", "version": "0.0.0", "type": "module", - "description": "A microservice for Hive SaaS, that exposes information about rate limits per given org/target.", + "description": "A microservice for Hive Cloud, that exposes information about rate limits per given org/target.", "license": "MIT", "private": true, "scripts": { diff --git a/packages/services/server/.env.template b/packages/services/server/.env.template index 341dfc6aa..f8c5d5d36 100644 --- a/packages/services/server/.env.template +++ b/packages/services/server/.env.template @@ -25,7 +25,8 @@ INTEGRATION_GITHUB_APP_ID="" INTEGRATION_GITHUB_APP_PRIVATE_KEY="" # CDN Configuration -CDN='1' +CDN_CF='1' +CDN_CF_BASE_URL=http://localhost:4010 CDN_CF_BASE_PATH=http://localhost:4010 CDN_CF_ACCOUNT_ID=103df45224310d669213971ce28b5b70 CDN_CF_AUTH_TOKEN=85e20c26c03759603c0f45884824a1c3 diff --git a/packages/services/server/README.md b/packages/services/server/README.md index b168d68dc..e3736bc2f 100644 --- a/packages/services/server/README.md +++ b/packages/services/server/README.md @@ -50,7 +50,7 @@ The GraphQL API for GraphQL Hive. ## Hive Hosted Configuration -If you are self-hosting GraphQL Hive, you can ignore this section. It is only required for the SaaS +If you are self-hosting GraphQL Hive, you can ignore this section. It is only required for the Cloud version. | Name | Required | Description | Example Value | diff --git a/packages/services/stripe-billing/package.json b/packages/services/stripe-billing/package.json index 72a98f786..e96ce5400 100644 --- a/packages/services/stripe-billing/package.json +++ b/packages/services/stripe-billing/package.json @@ -2,7 +2,7 @@ "name": "@hive/stripe-billing", "version": "0.0.0", "type": "module", - "description": "A microservice for Hive SaaS, that syncs usage information to Stripe (metered billing)", + "description": "A microservice for Hive Cloud, that syncs usage information to Stripe (metered billing)", "license": "MIT", "private": true, "scripts": { diff --git a/packages/services/usage-estimator/package.json b/packages/services/usage-estimator/package.json index d59b3e915..e68bf246f 100644 --- a/packages/services/usage-estimator/package.json +++ b/packages/services/usage-estimator/package.json @@ -2,7 +2,7 @@ "name": "@hive/usage-estimator", "version": "0.0.0", "type": "module", - "description": "A microservice for Hive SaaS, that calculates and exposes usage information.", + "description": "A microservice for Hive Cloud, that calculates and exposes usage information.", "license": "MIT", "private": true, "scripts": { diff --git a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/history.tsx b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/history.tsx index 8eedc07ce..1bb9e01a5 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/history.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/history.tsx @@ -21,7 +21,7 @@ import { graphql } from '@/gql'; import { CompareDocument, VersionsDocument } from '@/graphql'; import { useRouteSelector } from '@/lib/hooks/use-route-selector'; import { withSessionProtection } from '@/lib/supertokens/guard'; -import { CrossCircledIcon, RowsIcon } from '@radix-ui/react-icons'; +import { CrossCircledIcon, ExternalLinkIcon, RowsIcon } from '@radix-ui/react-icons'; function DiffView({ view, @@ -94,11 +94,13 @@ function DiffView({ // URQL's Infinite scrolling pattern // https://formidable.com/open-source/urql/docs/basics/ui-patterns/#infinite-scrolling function ListPage({ + gitRepository, variables, isLastPage, onLoadMore, versionId, }: { + gitRepository?: string; variables: { after: string; limit: number }; isLastPage: boolean; onLoadMore: (after: string) => void; @@ -125,36 +127,51 @@ function ListPage({ return ( <> {versions?.nodes.map(version => ( - -

- {'commit' in version.log ? version.log.commit : `Deleted ${version.log.deletedService}`} -

- {'author' in version.log ? ( -
- {version.log.author} -
- ) : null} -
-
- Published{' '} - -
- - {'service' in version.log && version.log.service ? ( -
- {version.log.service} + +

+ {'commit' in version.log + ? version.log.commit + : `Deleted ${version.log.deletedService}`} +

+ {'author' in version.log ? ( +
+ {version.log.author}
) : null} -
- +
+
+ Published{' '} + +
+ + {'service' in version.log && version.log.service ? ( +
+ {version.log.service} +
+ ) : null} +
+ + {gitRepository && 'commit' in version.log && version.log.commit ? ( + + associated with Git commit + + ) : null} +
))} {isLastPage && hasMore && ( organization && project && target ? (
-

- Data collected based on operation executed against your GraphQL schema. -

{hasCollectedOperations ? ( )}
diff --git a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/settings.tsx b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/settings.tsx index fee094aad..0d2661f88 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/settings.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/settings.tsx @@ -12,6 +12,8 @@ import { Button, Card, Checkbox, + DocsLink, + DocsNote, Heading, Input, Spinner, @@ -25,7 +27,6 @@ import { Tr, } from '@/components/v2'; import { Combobox } from '@/components/v2/combobox'; -import { AlertTriangleIcon } from '@/components/v2/icon'; import { CreateAccessTokenModal, DeleteTargetModal } from '@/components/v2/modals'; import { FragmentType, graphql, useFragment } from '@/gql'; import { DeleteTokensDocument, SetTargetValidationDocument, TokensDocument } from '@/graphql'; @@ -81,6 +82,14 @@ function RegistryAccessTokens(props: {

Be careful! These tokens allow to read and write your target data.

+ + Registry Access Tokens are used to access to Hive Registry and perform actions on your + targets/projects. In most cases, this token is used from the Hive CLI. +
+ + Learn more about Registry Access Token + +
{canManage && (
- - - This action is not reversible! - +
+
+ Delete Target + + Deleting an project also delete all schemas and data associated with it. +
+ + This action is not reversible! You can find more information + about this process in the documentation + +
+
+
+ +
)} diff --git a/packages/web/app/pages/[orgId]/[projectId]/index.tsx b/packages/web/app/pages/[orgId]/[projectId]/index.tsx index 15c1c58a1..d6b1b87f2 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/index.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/index.tsx @@ -23,7 +23,6 @@ import { import { LinkIcon, MoreIcon, SettingsIcon } from '@/components/v2/icon'; import { graphql } from '@/gql'; import { TargetQuery, TargetsDocument, VersionsDocument } from '@/graphql'; -import { getDocsUrl } from '@/lib/docs-url'; import { useClipboard } from '@/lib/hooks/use-clipboard'; import { useRouteSelector } from '@/lib/hooks/use-route-selector'; import { withSessionProtection } from '@/lib/supertokens/guard'; @@ -130,7 +129,7 @@ const Page = () => { ) : ( targets?.nodes.map(target => ) diff --git a/packages/web/app/pages/[orgId]/[projectId]/view/alerts.tsx b/packages/web/app/pages/[orgId]/[projectId]/view/alerts.tsx index 5f0a7804b..0c69c0b6d 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/view/alerts.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/view/alerts.tsx @@ -2,7 +2,20 @@ import { ReactElement, useState } from 'react'; import { useMutation, useQuery } from 'urql'; import { authenticated } from '@/components/authenticated-container'; import { ProjectLayout } from '@/components/layouts'; -import { Button, Card, Checkbox, Heading, Table, Tag, TBody, Td, Title, Tr } from '@/components/v2'; +import { + Button, + Card, + Checkbox, + DocsLink, + DocsNote, + Heading, + Table, + Tag, + TBody, + Td, + Title, + Tr, +} from '@/components/v2'; import { CreateAlertModal, CreateChannelModal } from '@/components/v2/modals'; import { FragmentType, graphql, useFragment } from '@/gql'; import { @@ -37,7 +50,11 @@ function Channels(): ReactElement { return ( Available Channels -

Channel represents a form of communication

+ + Alert Channels are a way to configure how you want to receive alerts and + notifications from Hive.{' '} + Learn more + {channelAlerts.map(channelAlert => ( @@ -139,8 +156,12 @@ const Page = (props: { <> - Active Alerts -

Alerts are sent over the Channels

+ Active Alerts and Notifications + + Alerts are a way to configure when you want to receive alerts and + notifications from Hive.{' '} + Learn more +
{alerts.map(alert => ( diff --git a/packages/web/app/pages/[orgId]/[projectId]/view/settings.tsx b/packages/web/app/pages/[orgId]/[projectId]/view/settings.tsx index 9938dee18..9fd46d411 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/view/settings.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/view/settings.tsx @@ -6,8 +6,18 @@ import { authenticated } from '@/components/authenticated-container'; import { ProjectLayout } from '@/components/layouts'; import { ExternalCompositionSettings } from '@/components/project/settings/external-composition'; import { ModelMigrationSettings } from '@/components/project/settings/model-migration'; -import { Button, Card, Heading, Input, Link, Select, Tag, Title } from '@/components/v2'; -import { AlertTriangleIcon } from '@/components/v2/icon'; +import { + Button, + Card, + DocsLink, + DocsNote, + Heading, + Input, + Link, + Select, + Tag, + Title, +} from '@/components/v2'; import { DeleteProjectModal } from '@/components/v2/modals'; import { FragmentType, graphql, useFragment } from '@/gql'; import { GetGitHubIntegrationDetailsDocument, ProjectType } from '@/graphql'; @@ -212,9 +222,14 @@ const Page = (props: { Project Name -

- Name of your project visible within organization -

+ + Changing the name of your project will also change the slug of your project URL, and will + invalidate any existing links to your project. +
+ + You can read more about it in the documentation + +
Git Repository -

- Connect the project with your Git repository -

+ + Associate your project with a Git repository to enable commit linking and to allow CI + integration. +
+ + Learn more about GitHub integration + +
@@ -260,24 +280,30 @@ const Page = (props: { {canAccessProject(ProjectAccessScope.Delete, organization.me) && ( - Delete Project -

- Permanently remove your Project and all targets from the Organization -

-
- - - - This action is not reversible! - +
+
+ Delete Project + + Deleting an project will delete all the targets, schemas and data associated with + it. +
+ + This action is not reversible! You can find more information + about this process in the documentation + +
+
+
+ +
)} diff --git a/packages/web/app/pages/[orgId]/index.tsx b/packages/web/app/pages/[orgId]/index.tsx index 49bbc7e6a..2a7053251 100644 --- a/packages/web/app/pages/[orgId]/index.tsx +++ b/packages/web/app/pages/[orgId]/index.tsx @@ -26,7 +26,6 @@ import { FragmentType, graphql, useFragment } from '@/gql'; import { ProjectActivitiesDocument } from '@/graphql'; import { canAccessProject, ProjectAccessScope } from '@/lib/access/project'; import { writeLastVisitedOrganization } from '@/lib/cookies'; -import { getDocsUrl } from '@/lib/docs-url'; import { fixDuplicatedFragments } from '@/lib/graphql'; import { useClipboard } from '@/lib/hooks/use-clipboard'; import { useRouteSelector } from '@/lib/hooks/use-route-selector'; @@ -162,7 +161,7 @@ function ProjectsPage(): ReactElement { ) : (
diff --git a/packages/web/app/pages/[orgId]/view/members.tsx b/packages/web/app/pages/[orgId]/view/members.tsx index b96700315..88eaaa1f7 100644 --- a/packages/web/app/pages/[orgId]/view/members.tsx +++ b/packages/web/app/pages/[orgId]/view/members.tsx @@ -4,7 +4,17 @@ import { useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; import { authenticated } from '@/components/authenticated-container'; import { OrganizationLayout } from '@/components/layouts'; -import { Avatar, Button, Card, Checkbox, Input, Title } from '@/components/v2'; +import { + Avatar, + Button, + Card, + Checkbox, + DocsLink, + DocsNote, + Heading, + Input, + Title, +} from '@/components/v2'; import { DropdownMenu, DropdownMenuContent, @@ -256,7 +266,7 @@ const OrganizationInvitations = (props: { return org.invitations.nodes.length ? (
-
+ Pending Invitations {org.invitations.nodes.map(node => ( ))} @@ -300,9 +310,12 @@ function Page(props: { organization: FragmentType -

- Invite others to your organization and manage access -

+ + You may invite other members to collaborate with you on this organization.{' '} + + Learn more about membership and invitations + + {selectedMember && ( Organization Name -

- Name of your organization visible within Hive -

{mutation.error.graphQLErrors[0]?.message ?? mutation.error.message}
)} + + Changing the name of your organization will also change the slug of your organization URL, + and will invalidate any existing links to your organization. +
+ + You can read more about it in the documentation + +
{canAccessOrganization(OrganizationAccessScope.Integrations, organization.me) && ( Integrations -

Connect Hive to other services

+ + Authorize external services to make them available for your the projects under this + organization. +
+ + You can find here instructions and full documentation for the available integration + +
@@ -249,7 +261,14 @@ const SettingsPageRenderer = (props: {
Transfer Ownership -

Transfer this organization to another user

+ + You are currently the owner of the organization. You can transfer + the organization to another member of the organization, or to an external user. +
+ + Learn more about the process + +
Delete Organization -

Permanently remove your organization

+ + Deleting an organization will delete all the projects, targets, schemas and data + associated with it. +
+ + This action is not reversible! You can find more information + about this process in the documentation + +
- - - This action is not reversible! - diff --git a/packages/web/app/src/components/organization/billing/BillingPlanPicker.tsx b/packages/web/app/src/components/organization/billing/BillingPlanPicker.tsx index 0d3ad32ec..c34879c69 100644 --- a/packages/web/app/src/components/organization/billing/BillingPlanPicker.tsx +++ b/packages/web/app/src/components/organization/billing/BillingPlanPicker.tsx @@ -117,8 +117,10 @@ export function BillingPlanPicker({ value, onPlanChange, activePlan, + disabled, ...props }: { + disabled?: boolean; value: BillingPlanType; activePlan: BillingPlanType; plans: ReadonlyArray>; @@ -128,7 +130,12 @@ export function BillingPlanPicker({ return ( {plans.map(plan => ( - + Plan Type {plan.planType} - Enterprise plan is for organizations that needs to ship and ingest large amount of data. -
- If you wish to upgrade to Enterprise, or you can't find the plan for you, please contact - us and we'll find the right plan for your organization. + Enterprise plan is for organizations that needs to ship and ingest large amount of data, + and needs ongoing support around GraphQL APIs.
); diff --git a/packages/web/app/src/components/project/settings/external-composition.tsx b/packages/web/app/src/components/project/settings/external-composition.tsx index 9944a6530..5101175a0 100644 --- a/packages/web/app/src/components/project/settings/external-composition.tsx +++ b/packages/web/app/src/components/project/settings/external-composition.tsx @@ -2,7 +2,17 @@ import { useCallback, useState } from 'react'; import { useFormik } from 'formik'; import { useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; -import { Button, Card, Heading, Input, Spinner, Switch, Tooltip } from '@/components/v2'; +import { + Button, + Card, + DocsLink, + DocsNote, + Heading, + Input, + Spinner, + Switch, + Tooltip, +} from '@/components/v2'; import { FragmentType, graphql, useFragment } from '@/gql'; import { useNotifications } from '@/lib/hooks'; import { CheckIcon, Cross2Icon, UpdateIcon } from '@radix-ui/react-icons'; @@ -332,9 +342,13 @@ export const ExternalCompositionSettings = (props: { )}
-

- Compose and validate schema outside GraphQL Hive -

+ + External Schema Composition is required for using Apollo Federation 2 with Hive. +
+ + Learn more about Apollo Federation 2 support + +
{isFormVisible ? (