WunderGraph is the Next-Generation API Developer Platform.

Overview

WunderGraph



Quickstart   •   Website   •   Docs   •   Examples   •   Blog   •   Discord   •   Twitter

What is WunderGraph?

WunderGraph is the Next-Generation API Developer Platform with a focus on Developer Experience.

At its core, WunderGraph combines the API Gateway pattern with the Backend for Frontend (BFF) pattern to create the perfect Developer Experience for working with APIs.

Take all your (micro-)services, Databases, File Storages, Identity Providers as well as 3rd party APIs and combine them into your own Firebase-like Developer Toolkit, without getting locked into a specific vendor.

Imagine that each of your applications could have its own dedicated BFF, while being able to share common logic across all your applications, that's the WunderGraph Experience.

Getting started

The fastest way to get started with WunderGraph is to open a Gitpod. After bootstrapping the examples/simple is started.

Open in Gitpod

You can also following the Quickstart (5 min) if you don't want to use Gitpod.

Examples:

The WunderGraph Stack

WunderGraph is made up of the three core components:

  • wunderctl: A command line tool to create, deploy and manage your WunderGraph application.
  • SDK: Auto-generated and type-safe client to configure and interact with your WunderGraph.
  • WunderHub The Package Manager for APIs that allows you to share and integrate your API's in a few clicks.

The auto-generated type-safe client can be used in any Node.js or TypeScript backend application (including serverless applications and microservices).

Core features

  • Unified Graph: Combine all your data sources into a unified GraphQL Schema.
  • JSON-RPC: Expose GraphQL operations through JSON-RPC. Learn more about this design choice.
  • Type-Safe Clients: Auto generate custom type-safe API Clients with Authentication / Authorization and file upload support.
  • Customizable: Customizable gateway logic with TypeScript.
  • Standards: Build upon standards like GraphQL, OpenAPI, OAuth2, S3...
  • Open Source: 100% Open Source, No vendor lock-in.
  • Community: First-class support for frameworks like Next.js, React, Svelte...

Note: WunderHub is our vision of the Package Manager for APIs. Like npm, but for APIs. Sign up for free!

Architecture & Key Differentiators

WunderGraph is unique in its design, as we're not directly exposing GraphQL, but JSON-RPC. Combined with a generated Type-Safe client, this leads to a unique Developer Experience. You can learn more about the architecture of WunderGraph and why we've built it this way in the architecture section.

Learn more about WunderGraph

If you'd like to get a quick overview, have a look at these annotated example snippets.

How does WunderGraph work

This section provides a high-level overview of how WunderGraph works and its most consumer centric components. For a more thorough introduction, visit the architecture documentation.

After initializing your first WunderGraph application with npx @wundergraph/wunderctl init, you have a NPM package and a .wundergraph folder. This folder contains the following files:

  • wundergraph.config.ts - The primary config file for your WunderGraph application. Add data-sources and more.
  • wundergraph.operations.ts - Configure authentication, caching and more for a specific or all operations.
  • wundergraph.server.ts - The hooks server to hook into different lifecycle events of your gateway.

After configuring your data-sources, you can start writing operations. An operation is just a *.graphql file. The name of the file will be the operation name. You can write queries, mutations and subscriptions that spans multiple data-sources. Each operation will be exposed securely via HTTP JSON-API through the WunderGraph gateway. After writing your operations, you can start deploying your WunderGraph application.

Contributing

Read the CONTRIBUTING.md to learn how to contribute to WunderGraph.

Security

We are thankful for any and all security reports. Please read the SECURITY.md to learn how to report any security concerns to WunderGraph.

Community & Support

  • GitHub Issues. Best for: bugs and errors you encounter using WunderGraph.
  • Email Support. Best for: specific questions around WunderGraph as an early enterprise adopter.
  • Slack Support. Best for: problems with WunderGraph as an enterprise customer.
  • Discord. Best for: sharing your applications and hanging out with the community.

Enterprise

We're a small but growing team of API Enthusiasts, thrilled to help you get the best Developer Experience of working with APIs. Our Support Plans are tailored to help your teams get the most out of WunderGraph. We love building close relationships with our customers, allowing us to continuously improve the product and iterate fast. Our sales team is available to talk with you about your project needs, pricing information, support plans, and custom-built features.

Use this Link to contact our sales team for a demo.

Comments
  • API returns empty data

    API returns empty data

    Bug description

    The endpoint generated by wundergraph returns empty data, though it queries the actual api perfectly fine.

    How to reproduce

    IDK

    Expected behavior

    Here is my SelfProfile.graphql file

    query Profile {
      fapi_getAccountGetme {
        code
        msg
        data {
          aid
        }
      }
    }
    
    

    These are the console logs i am getting.

    --- ClientRequest start ---
    
    GET /fapi/main/operations/SelfProfile HTTP/1.1
    Host: localhost:9991
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Accept-Encoding: gzip, deflate, br
    Accept-Language: en-US,en;q=0.9
    Connection: keep-alive
    Cookie: sIdRefreshToken=c82d3f07-5cf8-4d44-a370-3cdc55a1b6de; sAccessToken=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsInZlcnNpb24iOiIyIn0%3D.eyJzZXNzaW9uSGFuZGxlIjoiMjIxNjI4N2YtYjA1YS00YmVkLThjODctYTM5YmY3OWM4Yzk1IiwidXNlcklkIjoiNjMxZGQ2YzUtZTRjMy00OTc1LThjYTMtNjFmMDI2NDMwZWM1IiwicmVmcmVzaFRva2VuSGFzaDEiOiJhYmJjMTNlZmZjMzFjYTI5Yzk0YmQ0MGU0ZjEyMDU4MWM1NGMxYjRmOTAyYWZhMmE3MTAzYjliYjVmMWEwY2Y0IiwicGFyZW50UmVmcmVzaFRva2VuSGFzaDEiOiI2YTMyOWU1OWI1MmZjMWQwMmYzNjJlNjVlNTg1MmU5NDIzODc2ODZjYTQxMmFkZmJjODEwNjdkZjE1ZmQ0MTM3IiwidXNlckRhdGEiOnt9LCJhbnRpQ3NyZlRva2VuIjpudWxsLCJleHBpcnlUaW1lIjoxNjY2MjQ2NDg5OTI2LCJ0aW1lQ3JlYXRlZCI6MTY2NjI0Mjg4OTkyNiwibG1ydCI6MTY2NjI0Mjg4OTkyNn0%3D.NT0b8uPjGh95j5btGO9B5vUxK6SZzTN61SHlaatnWUJ0XHkvqvS%2BjQpDJe0004sBdU1Z%2Blh7p0zKa40isRUZ89w8KEHdjsm0z7cmnVtln%2FfeUkcdmoh%2BcYbaTqc6oGF%2B3rvTySdwpKhqvwVZvw0cLFEdU6CbTKjczbDgIx6R%2B0I7zW8LcuJJArXikerCcyUvH8bSzZ2Tj%2FewWJgMgp0kKm1sPo6sUrEmH%2F8EsuQptM914vCqUoZmAssOATzeK5sGBYmoiV6sq0Qz5yIg0z8mvyqOnG4bfmZTKTR0kXzssH9eLDu7vpGAALrVI43k%2BcW97YQaXSLwQnQiy6cTdd6t9w%3D%3D; sIRTFrontend=c82d3f07-5cf8-4d44-a370-3cdc55a1b6de; sFrontToken=eyJ1aWQiOiI2MzFkZDZjNS1lNGMzLTQ5NzUtOGNhMy02MWYwMjY0MzBlYzUiLCJhdGUiOjE2NjYyNDY0ODk5MjYsInVwIjp7fX0=
    Dnt: 1
    Sec-Ch-Ua: "Microsoft Edge";v="107", "Chromium";v="107", "Not=A?Brand";v="24"
    Sec-Ch-Ua-Mobile: ?0
    Sec-Ch-Ua-Platform: "Windows"
    Sec-Fetch-Dest: document
    Sec-Fetch-Mode: navigate
    Sec-Fetch-Site: none
    Sec-Fetch-User: ?1
    Sec-Gpc: 1
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.8
    
    
    
    
    
    --- ClientRequest end ---
    
    
    
    --- DebugTransport ---
    
    Request:
    
    GET /account/getme HTTP/1.1
    Host: localhost:8080
    Accept: application/json
    Content-Type: application/json
    Cookie: sIdRefreshToken=c82d3f07-5cf8-4d44-a370-3cdc55a1b6de; sAccessToken=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsInZlcnNpb24iOiIyIn0%3D.eyJzZXNzaW9uSGFuZGxlIjoiMjIxNjI4N2YtYjA1YS00YmVkLThjODctYTM5YmY3OWM4Yzk1IiwidXNlcklkIjoiNjMxZGQ2YzUtZTRjMy00OTc1LThjYTMtNjFmMDI2NDMwZWM1IiwicmVmcmVzaFRva2VuSGFzaDEiOiJhYmJjMTNlZmZjMzFjYTI5Yzk0YmQ0MGU0ZjEyMDU4MWM1NGMxYjRmOTAyYWZhMmE3MTAzYjliYjVmMWEwY2Y0IiwicGFyZW50UmVmcmVzaFRva2VuSGFzaDEiOiI2YTMyOWU1OWI1MmZjMWQwMmYzNjJlNjVlNTg1MmU5NDIzODc2ODZjYTQxMmFkZmJjODEwNjdkZjE1ZmQ0MTM3IiwidXNlckRhdGEiOnt9LCJhbnRpQ3NyZlRva2VuIjpudWxsLCJleHBpcnlUaW1lIjoxNjY2MjQ2NDg5OTI2LCJ0aW1lQ3JlYXRlZCI6MTY2NjI0Mjg4OTkyNiwibG1ydCI6MTY2NjI0Mjg4OTkyNn0%3D.NT0b8uPjGh95j5btGO9B5vUxK6SZzTN61SHlaatnWUJ0XHkvqvS%2BjQpDJe0004sBdU1Z%2Blh7p0zKa40isRUZ89w8KEHdjsm0z7cmnVtln%2FfeUkcdmoh%2BcYbaTqc6oGF%2B3rvTySdwpKhqvwVZvw0cLFEdU6CbTKjczbDgIx6R%2B0I7zW8LcuJJArXikerCcyUvH8bSzZ2Tj%2FewWJgMgp0kKm1sPo6sUrEmH%2F8EsuQptM914vCqUoZmAssOATzeK5sGBYmoiV6sq0Qz5yIg0z8mvyqOnG4bfmZTKTR0kXzssH9eLDu7vpGAALrVI43k%2BcW97YQaXSLwQnQiy6cTdd6t9w%3D%3D; sIRTFrontend=c82d3f07-5cf8-4d44-a370-3cdc55a1b6de; sFrontToken=eyJ1aWQiOiI2MzFkZDZjNS1lNGMzLTQ5NzUtOGNhMy02MWYwMjY0MzBlYzUiLCJhdGUiOjE2NjYyNDY0ODk5MjYsInVwIjp7fX0= 
    
    
    
    Duration: 25 ms
    
    Response:
    
    HTTP/1.1 200 OK
    Content-Length: 315
    Access-Control-Allow-Credentials: true
    Access-Control-Allow-Origin: http://localhost:3000
    Access-Control-Expose-Headers: front-token
    Content-Type: application/json; charset=utf-8
    Date: Thu, 20 Oct 2022 05:30:13 GMT
    Front-Token: eyJ1aWQiOiI2MzFkZDZjNS1lNGMzLTQ5NzUtOGNhMy02MWYwMjY0MzBlYzUiLCJhdGUiOjE2NjYyNDc0MTM1MzgsInVwIjp7fX0=
    Set-Cookie: sAccessToken=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsInZlcnNpb24iOiIyIn0%3D.eyJzZXNzaW9uSGFuZGxlIjoiMjIxNjI4N2YtYjA1YS00YmVkLThjODctYTM5YmY3OWM4Yzk1IiwidXNlcklkIjoiNjMxZGQ2YzUtZTRjMy00OTc1LThjYTMtNjFmMDI2NDMwZWM1IiwicmVmcmVzaFRva2VuSGFzaDEiOiJhYmJjMTNlZmZjMzFjYTI5Yzk0YmQ0MGU0ZjEyMDU4MWM1NGMxYjRmOTAyYWZhMmE3MTAzYjliYjVmMWEwY2Y0IiwicGFyZW50UmVmcmVzaFRva2VuSGFzaDEiOm51bGwsInVzZXJEYXRhIjp7fSwiYW50aUNzcmZUb2tlbiI6bnVsbCwiZXhwaXJ5VGltZSI6MTY2NjI0NzQxMzUzOCwidGltZUNyZWF0ZWQiOjE2NjYyNDM4MTM1MzgsImxtcnQiOjE2NjYyNDI4ODk5MjZ9.OGiwpZXZQL3m4uv%2B1end2etO02pBD14uuZEblrDAeJcvtKKmk2wpTFXc0hnGpRqpt4ADVSkNOiIM%2BYafyJAyXjlXGwxUgdKlgnDgDapcxBGgQNlA7pYqpDfr85dSoq1cMhKj%2FNhsBn2sq5eyt0guXAYXmV%2BHMYcg%2FLC5ihep53hEfivfjdOazytFoBJl2%2FrP4wBEvvk3TqZh%2BrLp9kdj88B5IOeiwFpGXbzRnDBSKTYrAYV7pLYcJdllzTsTFoq34aDaQR6uE7W2tkgSDBrbnkP0BKFberRuqubfYX7MtirgJhPFAqJL0gpJn%2FIaJMNk%2FDxPhVKTkpvNEOdx5RodsQ%3D%3D; Path=/; Expires=Thu, 20 Oct 2022 06:30:13 GMT; HttpOnly; SameSite=Lax
    Traceparent: 00-fd96ad70526003d65d2152edd3cf624e-74e0891ee44384ef-01
    
    {"code":200,"msg":"OK","data":{"aid":"WQE8DKodOomqZ_HTNxaYo","uid":"631dd6c5-e4c3-4975-8ca3-61f026430ec5","profile":{"pid":"JG2OTM9yLIfzECINpcttW","username":"","display_name":"rtwe🚉te","bio":"I am bio 🚉","gender":"other","location":"s","memorial":false},"created_at":1666201846162,"updated_time":1666202011}}
    
    --- DebugTransport
    

    As you can see the backend api returns the data perfectly fine

    {"code":200,"msg":"OK","data":{"aid":"WQE8DKodOomqZ_HTNxaYo","uid":"631dd6c5-e4c3-4975-8ca3-61f026430ec5","profile":{"pid":"JG2OTM9yLIfzECINpcttW","username":"","display_name":"rtwe🚉te","bio":"I am bio 🚉","gender":"other","location":"s","memorial":false},"created_at":1666201846162,"updated_time":1666202011}}
    

    but when I do not receive any data from api generated by wundergraph http://localhost:9991/fapi/main/operations/SelfProfile

    image

    WunderGraph information

    wundergraph.config.ts

    import { NextJsTemplate } from "@wundergraph/nextjs/dist/template";
    import {
      Application,
      configureWunderGraphApplication,
      cors,
      introspect,
      templates,
    } from "@wundergraph/sdk";
    import operations from "./wundergraph.operations";
    import server from "./wundergraph.server";
    
    const openapi = introspect.openApi({
      apiNamespace: "fapi",
      source: {
        kind: "file",
        filePath: "./swagger.json",
      },
      introspection: {
        pollingIntervalSeconds: 5,
      },
      baseURL: "http://localhost:8080",
      headers: (builder) => builder.addClientRequestHeader("cookie", "cookie"),
    });
    
    const myApplication = new Application({
      name: "fapi",
      apis: [openapi],
    });
    
    // configureWunderGraph emits the configuration
    configureWunderGraphApplication({
      application: myApplication,
      server,
      operations,
      codeGenerators: [
        {
          templates: [
            ...templates.typescript.all,
            templates.typescript.operations,
            templates.typescript.linkBuilder,
          ],
        },
        {
          templates: [templates.typescript.client],
          path: "../components/generated",
        },
        {
          templates: [new NextJsTemplate()],
          path: "../components/generated",
        },
      ],
    
      cors: {
        ...cors.allowAll,
        allowedOrigins: ["http://localhost:3000"],
      },
    
      authentication: {},
      security: {
        enableGraphQLEndpoint: process.env.NODE_ENV !== "production",
      },
    });
    

    wundergraph.operations.ts

    import { configureWunderGraphOperations } from "@wundergraph/sdk";
    import type { OperationsConfiguration } from "./generated/wundergraph.operations";
    export default configureWunderGraphOperations<OperationsConfiguration>({
      operations: {
        defaultConfig: {
          authentication: {
            required: false,
          },
        },
    
        queries: (config) => ({
          ...config,
          caching: {
            enable: false,
            staleWhileRevalidate: 60,
            maxAge: 60,
            public: true,
          },
          liveQuery: {
            enable: true,
            pollingIntervalSeconds: 1,
          },
        }),
    
        mutations: (config) => ({
          ...config,
        }),
        subscriptions: (config) => ({
          ...config,
        }),
    
        custom: {},
      },
    });
    

    wundergraph.server.ts

    import { configureWunderGraphServer } from "@wundergraph/sdk";
    import type { HooksConfig } from "./generated/wundergraph.hooks";
    import type { InternalClient } from "./generated/wundergraph.internal.client";
    
    export default configureWunderGraphServer<HooksConfig, InternalClient>(() => ({
      hooks: {
        queries: {},
        mutations: {},
      },
      graphqlServers: [],
    }));
    
    

    Environment & setup

    • OS: Windows
    • Go version: go version go1.19.2 windows/amd64
    • Node.js version: v18.11.0

    WunderCtl Version

    Version: 0.92.1
    Commit: 1428e7dd68b74c8408d5997bd0997b7e42a66f0d
    Date: 2022-06-21T20:12:47Z
    BuiltBy: ci
    
    bug 
    opened by a0v0 19
  • feat: refactor cache handling, move storage out of generated

    feat: refactor cache handling, move storage out of generated

    • feat: move introspection cache to .wundergraph/introspection/cache
    • feat: prioritize cache during introspection

    Checklist

    npm sdk engine 
    opened by fiam 13
  • JSON scalar types not supported

    JSON scalar types not supported

    Bug description

    I have an upstream graphql server that uses JSON scalar types.

    When the value returned for this scalar is a JSON object, wundergraph complains with the following error:

    2022-12-14T13:53:48+11:00 ERROR apihandler/apihandler.go:801 ResolveGraphQLResponse {"component": "@wundergraph/node", "reqId": "44a4ae5f-ef82-a2e9-3731-7a0284accd0b", "error": "invalid value type 'object' for path /data/bar, expecting string, got: {\"type\":\"string\"}. You can fix this by configuring this field as Int/Float Scalar"}
    github.com/wundergraph/wundergraph/pkg/apihandler.(*GraphQLHandler).ServeHTTP
            /home/runner/work/wundergraph/wundergraph/pkg/apihandler/apihandler.go:801
    github.com/wundergraph/wundergraph/pkg/authentication.NewCSRFMw.func1.1
            /home/runner/work/wundergraph/wundergraph/pkg/authentication/authentication.go:864
    net/http.HandlerFunc.ServeHTTP
            /opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:2084
    github.com/wundergraph/wundergraph/pkg/authentication.NewLoadUserMw.func1.1
            /home/runner/work/wundergraph/wundergraph/pkg/authentication/authentication.go:655
    net/http.HandlerFunc.ServeHTTP
            /opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:2084
    github.com/rs/cors.(*Cors).Handler.func1
            /home/runner/go/pkg/mod/github.com/rs/[email protected]/cors.go:219
    net/http.HandlerFunc.ServeHTTP
            /opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:2084
    github.com/wundergraph/wundergraph/pkg/apihandler.(*Builder).BuildAndMountApiHandler.func4.1
            /home/runner/work/wundergraph/wundergraph/pkg/apihandler/apihandler.go:233
    net/http.HandlerFunc.ServeHTTP
            /opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:2084
    github.com/wundergraph/wundergraph/pkg/apihandler.logRequestMiddleware.func1.1
            /home/runner/work/wundergraph/wundergraph/pkg/apihandler/apihandler.go:353
    net/http.HandlerFunc.ServeHTTP
            /opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:2084
    github.com/gorilla/mux.(*Router).ServeHTTP
            /home/runner/go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210
    net/http.serverHandler.ServeHTTP
            /opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:2916
    net/http.(*conn).serve
            /opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:1966
    

    How to reproduce

    I have been able to create a self-contained wundergraph project to reproduce the error, using the in-built graphql server. It is attached: wgtest.zip

    To reproduce:

    • install dependencies with yarn
    • run with yarn start

    Then visit the following URL: http://localhost:9991/operations/Hello

    Expected behavior

    The response from the server should be successfully returned to the caller.

    For the attached project, that is: { "data": {"bar": {"type": "string"}} }

    WunderGraph information

    Included in the attached project

    Environment & setup

    • OS: Mint w/kernel 5.4.0-135-generic
    • Go version: go version go1.13.8 linux/amd64
    • Node.js version: v18.12.1

    WunderCtl Version

    119.1

    bug in-progress 
    opened by greemo 12
  • feat: implement config first approach

    feat: implement config first approach

    Checklist

    npm sdk nextjs types engine 
    opened by spetrunin 10
  • feat: extract typescript client from nextjs

    feat: extract typescript client from nextjs

    Checklist

    npm sdk nextjs 
    opened by Pagebakers 10
  • feat: add ability for the user to comment on the documentation

    feat: add ability for the user to comment on the documentation

    Checklist

    npm 
    opened by JivusAyrus 9
  • feat: add configurable per-source timeouts

    feat: add configurable per-source timeouts

    • Add a new optional timeout field in HTTPUpstream
    • Pass this new field to the node via FetchConfiguration, so it applies to all HTTP based sources
    • In the server, create a dedicated http.Client with the specified timeout as needed

    Checklist

    npm sdk types engine 
    opened by fiam 9
  • Failed to use Postgraphile as a graphql datasource

    Failed to use Postgraphile as a graphql datasource

    Bug description

    an error occurred and the code could not be generated

    only working with option --skip-plugins graphile-build:NodePlugin

    How to reproduce

    run postgrapgphile

    postgraphile -c 'postgres://storeo:storeo@localhost:5433/storeo' --watch --enhance-graphiql --dynamic-json
    

    setup datasource wundergraph.config.ts

    const postgraphile = introspect.graphql({
        apiNamespace: 'pg',
        url: 'http://localhost:5000/graphql'
    })
    
    const myApplication = new Application({
        name: 'app',
        apis: [
            postgraphile
        ],
    });
    

    run wunderctl

    wunderctl generate  --env .env
    

    error

    2:58:38 PM: wundergraph.app.schema.graphql updated
    Error: Interface field pg_Node.nodeId expected but Query does not provide it.
        at assertValidSchema (/home/minhdtb/projects/storeo/storeo-backend/node_modules/graphql/type/validate.js:59:11)
        at validate (/home/minhdtb/projects/storeo/storeo-backend/node_modules/graphql/validation/validate.js:63:35)
        at Object.enter (/home/minhdtb/projects/storeo/storeo-backend/node_modules/@wundergraph/sdk/dist/graphql/operations.js:47:59)
        at visit (/home/minhdtb/projects/storeo/storeo-backend/node_modules/graphql/language/visitor.js:197:21)
        at parseOperations (/home/minhdtb/projects/storeo/storeo-backend/node_modules/@wundergraph/sdk/dist/graphql/operations.js:30:29)
        at /home/minhdtb/projects/storeo/storeo-backend/node_modules/@wundergraph/sdk/dist/configure/index.js:350:61
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
    
    
    
    
    
    --->
    No Operations found! Please create at least one Operation in the directory ./operations
    Operation files must have the file extension '.graphql', otherwise they are ignored.
    Operations don't need to be named, the file name is responsible for the operation name.
    <---
    
    

    Expected behavior

    working as expected

    WunderGraph information

    N/A

    Environment & setup

    OS: Ubuntu Go version: go1.17.2 linux/amd64 Database: PostgreSQL Node.js version: v16.15.1

    WunderCtl Version

    Version: 0.90.32
    Commit: 386a3d4b66204411dc89da6919aad0bebe524657
    Date: 2022-06-06T12:21:43Z
    BuiltBy: ci
    
    
    bug meta: stale 
    opened by minhdtb 9
  • up mode, file path error.

    up mode, file path error.

    Bug description

    up mode, file path error.

    Expect add AbsWorkingDir at initialBuild function in bundleconfig.go file.

    image

    How to reproduce

    1. Go to '/cmd/wunderctl'
    2. Change 'nothing'
    3. Run 'go run main.go up --debug true --wundergraph-dir ../../examples/simple/.wundergraph'
    4. See error
    2022-05-28T15:12:38+08:00       debug   starting without env file
    2022-05-28T15:12:38+08:00       info    starting WunderNode     {"version": "dev", "commit": "unknown", "date": "unknown", "builtBy": "unknown"}
    2022-05-28T15:12:38+08:00       fatal   Config Bundler: initial build failed    {"bundler": "config", "outFile": "../../examples/simple/.wundergraph/generated/bundle/config.js", "errors": [{"PluginName":"","Text":"The entry point \"wundergraph.config.ts\" cannot be marked as external","Location":null,"Notes":null,"Detail":null}]}
    exit status 1
    

    Expected behavior

    No response

    WunderGraph information

    Environment & setup

    • OS: Mac OS
    • Go version: go version go1.17.5 darwin/amd64
    • Node.js version: v16.13.1

    WunderCtl Version

    2b16f968f7c18e1f3bb9dd205de21336220070bb

    bug 
    opened by AnsonCode 9
  • feat: add root path and UI

    feat: add root path and UI

    Checklist

    image

    engine 
    opened by thisisnithin 8
  • feat: align logging format hooks server and

    feat: align logging format hooks server and

    Pretty

    Screenshot 2022-10-06 at 00 50 05

    Json Screenshot 2022-10-06 at 00 50 47

    Open question:

    • zap produces time format with floating point, nevertheless, it should be int64
    • for zap pretty mode there is no way to format custom props away from JSON at the end of log message

    TODO:

    • WunderNode should favor options.logger.level - zap instance should be shared, abstract logger should be separate for the node and cli
    npm sdk engine 
    opened by spetrunin 8
  • fix: operation metadata type imports

    fix: operation metadata type imports

    Checklist

    Follow up to https://github.com/wundergraph/wundergraph/pull/293. Fix was broken, creates a compiler error in generated code.

    Type error: Cannot find name 'OperationMetadata'.
    
      28 | }
      29 | 
    > 30 | const operationMetadata: OperationMetadata = {
         |                          ^
      31 |   CreateTag: {
      32 |     requiresAuthentication: false,
      33 |   },
    error Command failed with exit code 1.
    

    This PR adds the OperationMetadata import to the top of the react.provider.template.ts and react.native.provider.template.ts

    npm sdk 
    opened by rwest202 2
  • feat: produce ESM modules

    feat: produce ESM modules

    Checklist

    npm sdk engine 
    opened by StarpTech 1
  • fix: allow to treat a subgraph as regular graphql api

    fix: allow to treat a subgraph as regular graphql api

    FIxes:

    • allow to threat a subgraph as regular graphql api
    • fix id field extraction with @extract directive

    depends on: https://github.com/wundergraph/graphql-go-tools/pull/476

    fixes #491

    Checklist

    npm sdk engine 
    opened by spetrunin 1
  • mutation with CONSTRAINT table meet err

    mutation with CONSTRAINT table meet err

    Bug description

    1: mysql config const todo = introspect.mysql({ apiNamespace: 'todo', databaseURL: 'mysql://root:123456@localhost:3306/fireboom-issue', }); 2: db table `SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0;


    -- Table structure for test


    DROP TABLE IF EXISTS test; CREATE TABLE test ( id int NOT NULL AUTO_INCREMENT, name varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


    -- Table structure for todo


    DROP TABLE IF EXISTS todo; CREATE TABLE todo ( id int NOT NULL AUTO_INCREMENT, title varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, user_id int NOT NULL, is_completed tinyint(1) NOT NULL, is_public tinyint(1) NOT NULL, created_at datetime(3) DEFAULT CURRENT_TIMESTAMP(3), PRIMARY KEY (id), UNIQUE KEY todo_id_key (id), KEY todo_user_id_fkey (user_id), CONSTRAINT todo_user_id_fkey FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE RESTRICT ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


    -- Table structure for user


    DROP TABLE IF EXISTS user; CREATE TABLE user ( id int NOT NULL AUTO_INCREMENT, name varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

    SET FOREIGN_KEY_CHECKS = 1; 3: mutationmutation MyQuery( $created_at: DateTime @injectCurrentDateTime ) { todo_createOnetodo( data: {title:"test", is_completed: false, is_public: false, user: {connect: {id: 1}}, created_at: $created_at} ) { id } }` 4: use http post meet err

    2022-12-27T22:05:36+08:00 DEBUG database/datasource.go:1098 database.Source.Execute.Succeed {"component": "@wundergraph/node", "request": "{\"query\":\"mutation{createOnetodo(data: {title: \\\"test\\\",is_completed: false,is_public: false,user: {connect:{id:1}},created_at: falsereated_at}){id}}\",\"variables\":{}}", "response": "{\"errors\":[{\"error\":\"Error in query graph construction: QueryParserError(QueryParserError { path: QueryPath { segments: [\\\"Mutation\\\", \\\"createOnetodo\\\", \\\"data\\\"] }, error_kind: InputUnionParseError { parsing_errors: [QueryParserError { path: QueryPath { segments: [\\\"Mutation\\\", \\\"createOnetodo\\\", \\\"data\\\", \\\"todoCreateInput\\\", \\\"created_at\\\"] }, error_kind: InputUnionParseError { parsing_errors: [QueryParserError { path: QueryPath { segments: [\\\"Mutation\\\", \\\"createOnetodo\\\", \\\"data\\\", \\\"todoCreateInput\\\", \\\"created_at\\\"] }, error_kind: ValueTypeMismatchError { have: Enum(\\\"falsereated_at\\\"), want: DateTime } }, QueryParserError { path: QueryPath { segments: [\\\"Mutation\\\", \\\"createOnetodo\\\", \\\"data\\\", \\\"todoCreateInput\\\", \\\"created_at\\\"] }, error_kind: ValueTypeMismatchError { have: Enum(\\\"falsereated_at\\\"), want: Null } }] } }, QueryParserError { path: QueryPath { segments: [\\\"Mutation\\\", \\\"createOnetodo\\\", \\\"data\\\", \\\"todoUncheckedCreateInput\\\", \\\"user_id\\\"] }, error_kind: RequiredValueNotSetError }] } })\",\"user_facing_error\":{\"is_panic\":false,\"message\":\"Failed to validate the query:Unable to match input value to any allowed input type for the field. Parse errors: [Query parsing/validation error at Mutation.createOnetodo.data.todoCreateInput.created_at: Unable to match input value to any allowed input type for the field. Parse errors: [Query parsing/validation error at Mutation.createOnetodo.data.todoCreateInput.created_at: Value types mismatch. Have: Enum(\"falsereated_at\"), want: DateTime, Query parsing/validation error at Mutation.createOnetodo.data.todoCreateInput.created_at: Value types mismatch. Have: Enum(\"falsereated_at\"), want: Null], Query parsing/validation error at Mutation.createOnetodo.data.todoUncheckedCreateInput.user_id: A value is required but not set.]atMutation.createOnetodo.data\",\"meta\":{\"query_validation_error\":\"Unable to match input value to any allowed input type for the field. Parse errors: [Query parsing/validation error atMutation.createOnetodo.data.todoCreateInput.created_at: Unable to match input value to any allowed input type for the field. Parse errors: [Query parsing/validation error atMutation.createOnetodo.data.todoCreateInput.created_at: Value types mismatch. Have: Enum(\\\"falsereated_at\\\"), want: DateTime, Query parsing/validation error atMutation.createOnetodo.data.todoCreateInput.created_at: Value types mismatch. Have: Enum(\\\"falsereated_at\\\"), want: Null], Query parsing/validation error atMutation.createOnetodo.data.todoUncheckedCreateInput.user_id: A value is required but not set.]\",\"query_position\":\"Mutation.createOnetodo.data\"},\"error_code\":\"P2009\"}}]}"}

    How to reproduce

    Expected behavior

    No response

    WunderGraph information

    Environment & setup

    • OS:
    • Go version:
    • Database:
    • Node.js version:

    WunderCtl Version

    
    
    bug 
    opened by javacode123 1
  • Cross api query meet error

    Cross api query meet error

    Bug description

    1: api config:

    const countries = introspect.graphql({
    	apiNamespace: 'countries',
    	url: 'https://countries.trevorblades.com/',
    });
    
    const todo = introspect.mysql({
    	apiNamespace: 'todo',
    	databaseURL: 'mysql://root:zjl@localhost:3306/fireboom-issue',
    });
    
    // configureWunderGraph emits the configuration
    configureWunderGraphApplication({
    	apis: [
    		countries,
    		todo,
    		/*federatedApi,
            openAPI,
            graphQLAPI*/
    	],
    	server,
    	operations,
    	codeGenerators: [
    		{
    			templates: [
    				// use all the typescript react templates to generate a client
    				...templates.typescript.all,
    			],
    			// create-react-app expects all code to be inside /src
    			// path: "../frontend/src/generated",
    		},
    	],
    	cors: {
    		...cors.allowAll,
    		allowedOrigins:
    			process.env.NODE_ENV === 'production'
    				? [
    						// change this before deploying to production to the actual domain where you're deploying your app
    						'http://localhost:3000',
    				  ]
    				: ['http://localhost:3000', new EnvironmentVariable('WG_ALLOWED_ORIGIN')],
    	},
    	dotGraphQLConfig: {
    		hasDotWunderGraphDirectory: false,
    	},
    	security: {
    		enableGraphQLEndpoint: process.env.NODE_ENV !== 'production' || process.env.GITPOD_WORKSPACE_ID !== undefined,
    	},
    });
    

    2: db table:

    CREATE TABLE `test` (
      `id` int NOT NULL AUTO_INCREMENT,
      `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    

    3: operation:

    query MyQuery($code: ID! @internal) {
      todo_findFirsttest {
        id
        name @export(as:"code")
        _join {
          countries_country(code: $code) {
            code
            capital
          }
        }
      }
    }
    

    4: http quey Uploading image.png…

    How to reproduce

    Expected behavior

    No response

    WunderGraph information

    Environment & setup

    • OS:
    • Go version:
    • Database:
    • Node.js version:

    WunderCtl Version

    bug in-progress 
    opened by javacode123 2
Releases(v0.125.0)
Owner
WunderGraph
We eliminate API integration so developers can focus on value creation
WunderGraph
The first place winning no-code platform for generating developer resume pages, designed for and submitted to the 2022 Tech Optimum Hackathon.

Genfolio Genfolio is a no-code platform for generating developer portfolios. A demo can be found on the project's devpost or on youtube. Our stack We

Lenny 4 Dec 5, 2022
🌠 Recognition platform built for developer endorsements

Spekni Recognition platform built for developer endorsements Tech Stack ?? NextJS - UI framework ☑️ Vercel - Hosting and deployment ?? NextAuth.js: Gi

Victor Eke 11 Aug 8, 2022
Software for the next generation of social media. https://gitlab.com/soapbox-pub/soapbox-fe

Soapbox FE Soapbox FE is a frontend for Mastodon and Pleroma with a focus on custom branding and ease of use. It's part of the Soapbox project. Try it

Soapbox 52 Dec 30, 2022
👩‍🎤 Headless, type-safe, UI components for the next generation Web3.Storage APIs.

Headless, type-safe, UI components for the next generation Web3.Storage APIs. Documentation beta.ui.web3.storage Examples React Sign up / Sign in Sing

Web3 Storage 47 Dec 22, 2022
Prisma is a next-generation object–relational mapper (ORM) that claims to help developers build faster and make fewer errors.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Rhodin Emmanuel Nagwere 1 Oct 8, 2022
A developer directory built on Next.js and MongoDB Atlas, deployed on Vercel with the Vercel + MongoDB integration.

MongoDB Starter – Developer Directory A developer directory built on Next.js and MongoDB Atlas, deployed on Vercel with the Vercel + MongoDB integrati

Vercel 246 Dec 20, 2022
A base project for Express with Typescript to create an API. Includes automatic input validation and Swagger UI generation.

(Typescript) Express API with input Validation and Swagger UI Thats a mouthful isn't it. Typescript: The language used, a superset of Javascript with

Tjeerd Bakker 6 Oct 26, 2022
Chappe - 🧑‍💻 Developer Docs builder. Write guides in Markdown and references in API Blueprint. Comes with a built-in search engine.

Chappe Developer Docs builder. Write guides in Markdown and references in API Blueprint. Comes with a built-in search engine. Chappe is a Developer Do

Valerian Saliou 146 Jan 1, 2023
🧑‍💻 Developer Docs builder. Write guides in Markdown and references in API Blueprint. Comes with a built-in search engine.

Developer Docs builder. Write guides in Markdown and references in API Blueprint. Comes with a built-in search engine. Chappe is a Developer Docs buil

Crisp (OSS) 146 Jan 1, 2023
🍬 Tixte Developer API Wrapper

Tixte Wrapper The best Tixte wrapper around This package was done because I wanted to use the Tixte API in a hackathon, there were already 2 packages

Eliaz Bobadilla 7 Apr 6, 2022
GetOsLocalesCrossPlatform - A cross platform alternative to get locales used on the platform. Works on Node, Electron, NW.js and Browsers

getOsLocalesCrossPlatform A cross platform alternative to get locales used on the platform. Works on Node, Electron, NW.js and Browsers This script is

null 1 Jan 2, 2022
next-graphql-server is a library for building production-grade GraphQL servers using Next.js with API Routes

next-graphql-server next-graphql-server is an easy to use Next.js library for creating performant GraphQL endpoints on top of Next.js API Routes. Star

Jakub Neander 82 Nov 21, 2022
Framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. 🗺️ Remix driver included. 🤟

About routes-gen is a framework agnostic CLI tool for routes parsing and generation of a type-safe helper for safe route usage. Think of it as Prisma,

Stratulat Alexandru 192 Jan 2, 2023
qrcode generation standalone (doesn't depend on external services)

jquery.qrcode.js jquery.qrcode.js is jquery plugin for a pure browser qrcode generation. It allow you to easily add qrcode to your webpages. It is sta

Jerome Etienne 4.8k Dec 29, 2022
Non-interactive publicly verifiable distributed key generation and resharing algorithm over BLS12-381

NPVDKG-RS This repository contains a mathematical presentation and some code to demonstrate our developed non-interactive publicly verifiable distribu

NATRIX Official 8 May 19, 2022
Color palette generation function using hue cycling and simple easing functions.

Rampensau ?? Color palette generation function using hue cycling and easing functions. Check out a simple demo or see it in action over on farbvelo 10

David Aerne 24 Dec 28, 2022
Front End do Projeto Integrador do bootcamp da Generation Brasil.

Integrantes do grupo ?? : Alan Carlos Fabrício Rocha Guilherme Albuquerque Josiane Caroliny Lucas Melo Wesley Ninaja Genducation ?? Projeto desenvolvi

Guilherme Cruz 1 Feb 2, 2022
An example of implementation of the Veriifiable Presentation Generation Service specification.

Verifiable Presentation Generation Service A plugin-based service that allows issuers to render verifiable presentations from templates, and store it

Verifiable Presentation Generation 5 Nov 16, 2022