Skip to content

Commit

Permalink
patched version and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aexol committed Aug 15, 2024
1 parent b0b2e57 commit 9d30d4d
Show file tree
Hide file tree
Showing 15 changed files with 123 additions and 186 deletions.
4 changes: 2 additions & 2 deletions adapters/apollo-server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions adapters/apollo-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aexol/axolotl-apollo-server",
"version": "0.5.2",
"version": "0.5.3",
"private": false,
"main": "./lib/index.js",
"author": "Aexol, Artur Czemiel",
Expand All @@ -14,7 +14,7 @@
"lib"
],
"dependencies": {
"@aexol/axolotl-core": "^0.5.2",
"@aexol/axolotl-core": "^0.5.3",
"@apollo/server": "^4.9.4",
"@graphql-tools/schema": "^9.0.19",
"@graphql-tools/utils": "^9.2.1"
Expand Down
4 changes: 2 additions & 2 deletions adapters/graphql-yoga/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aexol/axolotl-graphql-yoga",
"version": "0.5.2",
"version": "0.5.3",
"private": false,
"main": "./lib/index.js",
"author": "Aexol, Artur Czemiel",
Expand All @@ -14,7 +14,7 @@
"lib"
],
"dependencies": {
"@aexol/axolotl-core": "^0.5.2",
"@aexol/axolotl-core": "^0.5.3",
"@graphql-tools/utils": "^10.3.2",
"graphql-yoga": "^4.0.5"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This guide should help you understand your Axolotl configuration. More detailed

Config supports GraphQL Federation baked into axolotl. The main schema file is
generated then and becomes `supergraph`. The example how federation works in
Axolotl is used in [beerpub-yoga-federated example](/examples/beerpub-yoga-federated)
Axolotl is used in [yoga-federated example](/examples/yoga-federated)

```json filename="axolotl.json"
{
Expand Down
18 changes: 9 additions & 9 deletions docs/pages/micro-federation.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Micro Federation
You can use micro federation feature in axolotl. Micro federation means all the modules are located within one project or one monorepo or are distributed as npm packages. Those axolotl projects are merged to the supergraph later.

You can also run the project `examples/beerpub-yoga-federated` to watch how
You can also run the project `examples/yoga-federated` to watch how
micro federation works!

To use micro federation you need to create config for your project containing
Expand All @@ -12,12 +12,12 @@ this kind of content:
"models": "src/models.ts",
"federation":[
{
"schema":"src/beers/schema.graphql",
"models":"src/beers/models.ts",
"schema":"src/todos/schema.graphql",
"models":"src/todos/models.ts",
},
{
"schema":"src/shop/schema.graphql",
"models":"src/shop/models.ts",
"schema":"src/users/schema.graphql",
"models":"src/users/models.ts",
}
]
}
Expand All @@ -30,17 +30,17 @@ schema and its models. Here is how the federation process works:
2. Create supergraph schema from all the federation schemas.
3. Create models for supergraph

To run federated axolotls - each of folders, `beers` and `shop` in our case has
To run federated axolotls - each of folders, `users` and `todos` in our case has
to provide their own `resolvers.ts` files based on local models and `Axolotl`.
Then inside the main `resolvers.ts` file wee need to merge those subgraph
resolvers:

```ts [filename="src/resolvers.ts"]
import { mergeAxolotls } from '@aexol/axolotl-core';
import beerResolvers from '@/src/beers/resolvers.js';
import shopResolvers from '@/src/shop/resolvers.js';
import usersResolvers from '@/src/users/resolvers.js';
import todosResolvers from '@/src/todos/resolvers.js';

export default mergeAxolotls(beerResolvers, shopResolvers);
export default mergeAxolotls(usersResolvers, todosResolvers);
```

then you can use those resolvers as normal resolvers result.
8 changes: 4 additions & 4 deletions examples/beerpub-apollo-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "beerpub-apollo-server",
"version": "0.5.2",
"version": "0.5.3",
"description": "Automatically generated by graphql-editor-cli",
"main": "lib/index.js",
"type": "module",
Expand All @@ -17,15 +17,15 @@
"author": "GraphQL Editor Centaur Generator",
"license": "ISC",
"dependencies": {
"@aexol/axolotl-apollo-server": "^0.5.2",
"@aexol/axolotl-core": "^0.5.2",
"@aexol/axolotl-apollo-server": "^0.5.3",
"@aexol/axolotl-core": "^0.5.3",
"@apollo/server": "^4.9.4",
"graphql": "^16.8.1",
"node-fetch": "^3.2.10",
"ws": "^8.12.0"
},
"devDependencies": {
"@aexol/axolotl": "^0.5.2",
"@aexol/axolotl": "^0.5.3",
"@types/node": "^18.7.18",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
Expand Down
8 changes: 4 additions & 4 deletions examples/beerpub-yoga/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "beerpub-yoga",
"version": "0.6.2",
"version": "0.6.3",
"description": "Automatically generated by graphql-editor-cli",
"main": "lib/index.js",
"type": "module",
Expand All @@ -20,15 +20,15 @@
"author": "GraphQL Editor Centaur Generator",
"license": "ISC",
"dependencies": {
"@aexol/axolotl-core": "^0.5.2",
"@aexol/axolotl-graphql-yoga": "^0.5.2",
"@aexol/axolotl-core": "^0.5.3",
"@aexol/axolotl-graphql-yoga": "^0.5.3",
"graphql": "^16.8.1",
"graphql-yoga": "^5.6.3",
"node-fetch": "^3.2.10",
"ws": "^8.12.0"
},
"devDependencies": {
"@aexol/axolotl": "^0.5.2",
"@aexol/axolotl": "^0.5.3",
"@types/node": "^18.7.18",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
Expand Down
8 changes: 4 additions & 4 deletions examples/yoga-federated/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yoga-federated",
"version": "0.6.2",
"version": "0.6.3",
"description": "Automatically generated by graphql-editor-cli",
"main": "lib/index.js",
"type": "module",
Expand All @@ -20,15 +20,15 @@
"author": "GraphQL Editor Centaur Generator",
"license": "ISC",
"dependencies": {
"@aexol/axolotl-core": "^0.5.2",
"@aexol/axolotl-graphql-yoga": "^0.5.2",
"@aexol/axolotl-core": "^0.5.3",
"@aexol/axolotl-graphql-yoga": "^0.5.3",
"graphql": "^16.8.1",
"graphql-yoga": "^4.0.5",
"node-fetch": "^3.2.10",
"ws": "^8.12.0"
},
"devDependencies": {
"@aexol/axolotl": "^0.5.2",
"@aexol/axolotl": "^0.5.3",
"@types/node": "^18.7.18",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
Expand Down
4 changes: 2 additions & 2 deletions modularium/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aexol/modularium",
"version": "0.5.2",
"version": "0.5.3",
"private": false,
"main": "./lib/index.js",
"author": "Aexol, Artur Czemiel",
Expand All @@ -17,7 +17,7 @@
"lib"
],
"dependencies": {
"@aexol/axolotl-config": "^0.5.2",
"@aexol/axolotl-config": "^0.5.3",
"chalk": "^5.3.0",
"commander": "^11.0.0"
}
Expand Down
4 changes: 2 additions & 2 deletions modularium/playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aexol/modularium-playground",
"version": "0.5.2",
"version": "0.5.3",
"description": "Axolotl modularium",
"main": "lib/index.js",
"type": "module",
Expand All @@ -14,6 +14,6 @@
"author": "GraphQL Editor Centaur Generator",
"license": "ISC",
"devDependencies": {
"@aexol/modularium": "^0.5.2"
"@aexol/modularium": "^0.5.3"
}
}
8 changes: 4 additions & 4 deletions modularium/root/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aexol/modularium-root",
"version": "0.5.2",
"version": "0.5.3",
"description": "Axolotl modularium",
"main": "lib/index.js",
"type": "module",
Expand All @@ -20,8 +20,8 @@
"author": "GraphQL Editor Centaur Generator",
"license": "ISC",
"dependencies": {
"@aexol/axolotl-core": "^0.5.2",
"@aexol/axolotl-graphql-yoga": "^0.5.2",
"@aexol/axolotl-core": "^0.5.3",
"@aexol/axolotl-graphql-yoga": "^0.5.3",
"googleapis": "^140.0.1",
"graphql": "^16.8.1",
"graphql-yoga": "^4.0.5",
Expand All @@ -32,7 +32,7 @@
"ws": "^8.12.0"
},
"devDependencies": {
"@aexol/axolotl": "^0.5.2",
"@aexol/axolotl": "^0.5.3",
"@types/jsonwebtoken": "^9.0.6",
"@types/node": "^18.7.18",
"@typescript-eslint/eslint-plugin": "^7.12.0",
Expand Down
Loading

0 comments on commit 9d30d4d

Please sign in to comment.