Git Product home page Git Product logo

kamilkisiela / graphql-hive Goto Github PK

View Code? Open in Web Editor NEW
383.0 11.0 82.0 161.86 MB

GraphQL Hive is a schema registry and observability

Home Page: https://the-guild.dev/graphql/hive

License: MIT License

JavaScript 2.01% Shell 0.15% TypeScript 90.73% Batchfile 0.01% CSS 0.08% Rust 1.20% Dockerfile 0.09% HCL 0.23% MDX 5.52%
graphql api developer-tools graphql-api nodejs tools php ruby rust the-guild

graphql-hive's Introduction

GraphQL Hive

GraphQL Hive provides all the tools the get visibility of your GraphQL architecture at all stages, from standalone APIs to composed schemas (Federation, Stitching).

Built for the community, for all GraphQL APIs

GraphQL Hive has been built with 3 main objectives in mind:

  • Help GraphQL developers to get to know their GraphQL APIs a little more with our Schema 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 built in public with the community.
  • A plug and play Cloud solution: to give access to Hive to most people with a generous free "Hobby plan"

Features Overview

Schema Registry

GraphQL Hive offers 3 useful features to manage your GraphQL API:

  • Prevent breaking changes - GraphQL Hive will run a set of checks and notify your team via Slack, GitHub, or within the application.
  • Data-driven definition of a “breaking change” based on Operations Monitoring.
  • History of changes - an access to the full history of changes, even on a complex composed schema (Federation, Stitching).
  • High-availability and multi-zone CDN service based on Cloudflare to access Schema Registry

Monitoring

Once a Schema is deployed, it is important to be aware of how it is used and what is the experience of its final users.

Self-hosted

GraphQL Hive is completely open-source under the MIT license, meaning that you are free to host on your own infrastructure.

GraphQL Hive helps you get a global overview of the usage of your GraphQL API with:

  • Error rates and repartition
  • Global and query performances (latency, RPM…)
  • Operations count
  • Active GraphQL clients

Integrations

GraphQL Hive is well integrated with Slack and most CI/CD systems to get you up and running as smoothly as possible!

GraphQL Hive can notify your team when schema changes occur, either via Slack or a custom webhook.

Also, the Hive CLI allows integration of the schema checks mechanism to all CI/CD systems (GitHub, BitBucket, Azure, and others). The same applies to schema publishing and operations checks.

If you are using GitHub, you can directly benefit from the GraphQL Hive app that will automatically add status checks to your PRs!

Join us in building the future of GraphQL Hive

Like all The Guild projects, GraphQL Hive is built with the community.

We can't wait to get you onboard and get your feedback, pull requests, and feature requests.

See you in Hive! 🐝

Project Stack

  • General: NodeJS, TypeScript
  • Authentication: SuperTokens
  • HTTP Server: Fastify
  • APIs: GraphQL, GraphQL-Yoga, GraphQL-Codegen, GraphQL-Inspector, GraphQL-Modules
  • App: React, Next.js, Tailwind CSS, Radix Primitives
  • CLI: Oclif
  • Deployment (Cloud): Pulumi, K8s, Contour (Envoy), Azure Cloud, CloudFlare Workers, CloudFlare R2
  • Monitoring: Prometheus, Grafana, Sentry
  • Databases: Postgres, Redis, ClickHouse

Docs

graphql-hive's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphql-hive's Issues

cannot publish multiple services with identical schema on multi-service projects

Reproduction:

Create a stitching project, then publish the same schema twice but with a different service name.

yarn workspace @graphql-hive/cli start -- schema:publish --service fooooo /Users/laurinquast/Projects/graphql-hive-2/packages/libraries/cli/examples/single.graphql
yarn workspace @graphql-hive/cli start -- schema:publish --service brrrrrt /Users/laurinquast/Projects/graphql-hive-2/packages/libraries/cli/examples/single.graphql

On the second publish the output you receive is

No changes. Skipping.

Afterward, the service brrrrrt is not showing up on the schema versions in the web app.


It seems like it is impossible to publish the same schema with a different service name and it is simply skipped/not inserted into the database

Improving UX of CLI and Client

  • Give instructions next to errors: when the service URL is missing, show an error and tell how to pass it to the CLI, one example.
  • When publishing the schema, show a link to the new version.
  • When checking the initial schema, say it’s initial.
  • When the token is missing, explain how to create and apply a token.
  • #207

Missing user in activities when switching between tabs

TypeError: Cannot read properties of undefined (reading 'displayName')

# src/components/v2/activities.tsx (157:18) @ getActivity
  155 | content: (
  156 |   <>
> 157 |     {user.displayName} created {targetLink} target in {projectLink} project
      |          ^
  158 |   </>
  159 | ),
  160 | icon: <PlusIcon className="h-4 w-4" />,

Reproduction:

  1. Create an organization or visit an existing one that uses users.displayName in one of its activities
  2. Click the "Settings" tab
  3. Click the "Overview" tab
  4. Error

ESLint error when modifying integration tests

integration-tests/testkit/flow.ts
  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: integration-tests/testkit/flow.ts.
The file must be included in at least one of the projects provided

Reproduction

  1. Touch any of *.spec.ts files in integration-tests directory.
  2. Try to git commit the change
  3. Error

CLI: missing graphql dependency

Hello, when running hive schema:publish /path/to/schema I get the following error:

 ❯ hive schema:publish
 ›   ModuleLoadError: [MODULE_NOT_FOUND] require failed to load /path/to/project/node_modules/@graphql-hive/cli/dist/commands/schema/publish.js
 ›   Code: MODULE_NOT_FOUND

 ❯ hive --version
@graphql-hive/cli/0.14.6 darwin-arm64 node-v16.13.0

I have no clue what is happening here... I have installed "@graphql-hive/cli": "^0.14.6" as a dev dependency using Yarn. Ran yarn install and even yarn upgrade to see if that changes anything but no. Also tried version 0.13.0 but that didn't make a difference.

The file mentioned in the error exists on disk and looks complete enough.

It's also not only for schema:publish but for any command, I can execute hive schema en see the help for the available commands but any actual command is throwing a similar error with the exception for hive update and hive help which seem to function correctly.

Any clue what I'm missing here?

Missing service url in supergraph

When publishing the subgraph (applies to GraphQL API as well) the service url in empty.

$ hive schema:publish --service users --url http://localhost:6969 supergraph.graphql

demo video

We're thinking of a read-only demo with public access or a walkthrough video (at first and later on maybe a video per feature) that we could put on the landing page and in docs.

Improve not found errors: `GraphQLError: Resource not found.`

Sentry Issue: GRAPHQL-HIVE-CY

GraphQLError: Resource not found.
  File "/app/node_modules/@hive/server/index.js", line 213137, in addEventId
    return new import_graphql33.GraphQLError(err.message, err.nodes, err.source, err.positions, err.path, void 0, __spreadProps(__spreadValu {snip}
  File "/app/node_modules/@hive/server/index.js", line 213273, in <anonymous>
    return addEventId(err, eventId);
  File "/app/node_modules/@hive/server/index.js", in Array.map
    #!/usr/bin/env node
  File "/app/node_modules/@hive/server/index.js", line 213252, in <anonymous>
    const errors = (_a4 = result.errors) === null || _a4 === void 0 ? void 0 : _a4.map((err) => {
  File "/app/node_modules/@hive/server/index.js", line 169282, in Hub1.withScope
    callback(scope);
...
(5 additional frame(s) were not displayed)

✖ Failed to publish schema

Hi @charlypoly

I am facing an error while publishing the schema. I have followed all the steps and then I have generated the token as well. Finally, I am running the command "hive schema: publish".mesh/schema.graphql". Basically, I have already completed the GraphQL Mesh. Now I tried "Hive" for the CI/CD pipeline. I am facing the below error. Just update me if I am doing anything wrong.

Error:

vijayakumar@Vijayakumars-MacBook-Pro postgres-geodb % hive schema:publish ".mesh/schema.graphql" --force
(node:35108) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
✖ Failed to publish schema
› Error: Unexpected error.
› Reference: 6e4f3f1e-b58c-419c-9580-72c10be689fa

Add TTL to materialized views in ClickHouse

Use toDate(expires_at) in the SummingMergeTree + add it to ORDER BY.
Do it with MODIFY.

Think about:

  • running OPTIMIZE to delete expired rows.
  • old rows without expires_at column

error masking should always be enabled

Currently, error masking is only enabled in staging and production environments. It should also be enabled in development mode, so the behavior is as close as possible.

Provide better feedback for users in case a webhook delivery fails

A failed webhook delivery is swallowed by the service and only logged to internal logs.

In addition, there should be a UI and/or email notification for users with the information that the delivery failed and also a reason on why the delivery failed (HTTP timeout, not found, etc.).

Schema push onboarding instructions

On the Target page: add setup instructions in the existing placeholder (”Schema”/”Operations” tabs)

  • tabs with languages (CLI/Node.js/Ruby/PHP) with CLI first
  • if user selected Federation, we should display proper snippet

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.