From c25163b881e6e17490640f9d74ea6b7baf19910a Mon Sep 17 00:00:00 2001 From: Ariel Mashraki Date: Mon, 25 Jul 2022 18:29:58 +0300 Subject: [PATCH] doc/website: add edit and lastedit info to doc pages --- .github/workflows/cd.yml | 2 ++ doc/md/graphql.md | 2 +- doc/md/tutorial-todo-gql-field-collection.md | 4 ++-- doc/website/docusaurus.config.js | 7 ++++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 01c089a62b..8b5048f16f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -14,6 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - uses: actions/setup-node@v3 with: node-version: 14 diff --git a/doc/md/graphql.md b/doc/md/graphql.md index 56f39dabbe..d736e76f79 100644 --- a/doc/md/graphql.md +++ b/doc/md/graphql.md @@ -238,7 +238,7 @@ query { ## Fields Collection The collection template adds support for automatic [GraphQL fields collection](https://spec.graphql.org/June2018/#sec-Field-Collection) -for ent-edges using eager-loading. That means, if a query asks for nodes and their edges, entgql will add automatically [`With`](eager-load.md#api) +for ent-edges using eager-loading. That means, if a query asks for nodes and their edges, entgql will add automatically [`With`](eager-load.mdx#api) steps to the root query, and as a result, the client will execute constant number of queries to the database - and it works recursively. For example, given this GraphQL query: diff --git a/doc/md/tutorial-todo-gql-field-collection.md b/doc/md/tutorial-todo-gql-field-collection.md index b2ae90e006..9ff06e6ba9 100755 --- a/doc/md/tutorial-todo-gql-field-collection.md +++ b/doc/md/tutorial-todo-gql-field-collection.md @@ -60,8 +60,8 @@ its comments (500). That means, we have `1+50+50+500=601` queries in total. ## Ent Solution The Ent extension for field collection adds support for automatic [GraphQL fields collection](https://spec.graphql.org/June2018/#sec-Field-Collection) -for associations (i.e. edges) using [eager loading](eager-load.md). That means, if a query asks for nodes and their edges, -`entgql` will automatically add [`With`](eager-load.md#api) steps to the root query, and as a result, the client will +for associations (i.e. edges) using [eager loading](eager-load.mdx). That means, if a query asks for nodes and their edges, +`entgql` will automatically add [`With`](eager-load.mdx) steps to the root query, and as a result, the client will execute constant number of queries to the database - and it works recursively. That means, in the GraphQL query above, the client will execute 1 query for getting the users, 1 for getting the photos, diff --git a/doc/website/docusaurus.config.js b/doc/website/docusaurus.config.js index bfa6fed229..9f072f6839 100644 --- a/doc/website/docusaurus.config.js +++ b/doc/website/docusaurus.config.js @@ -56,9 +56,10 @@ const config = { "@docusaurus/preset-classic", { "docs": { - "path": "../md", - "showLastUpdateAuthor": false, - "showLastUpdateTime": false, + path: "../md", + editUrl: 'https://github.com/ent/ent/edit/master/doc/md/', + showLastUpdateAuthor: true, + showLastUpdateTime: true, sidebarPath: require.resolve('./sidebars.js'), }, "blog": {