wundergraph.config.ts is the main file to configure your WunderGraph applications.
If you init a project with wunderctl, using the defaults, it's usually located in the forlder
.wundergraph inside your project root.
You're able to introspect and combine APIs to compose them as a WunderGraph application. You can select one or more templates to generate clients for an application.
In case you have an existing service which implements the GraphQL specification, use the following approach:
This code makes an introspection requests to the service and generates an API object from it.
This code assumes that the four services implement the GraphQL Federation specification. The WunderGraph sdk will introspect them with an introspection Query and combines them into a federated GraphQL API object.
WunderGraph also supports REST APIs, which get translated to GraphQL automatically. Here's one possible way of adding an OpenAPI based API to WunderGraph:
Use one or more APIs and combine them inta an application.
configureWunderGraph allows you to put all the pieces together and generate the configuration of your WunderGraph. By default, the config is written to
If you created
wunderctl init you should also find a
package.json in the same folder. All you have to do is run the development script:
Once this script is running, it will pick up changes to your config or the user defined Operations and continuously updates the
wundergraph.config.json as well as re-generates the code if code generators are defined.