mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
doc: update contrib repository path to ent/contrib
This commit is contained in:
committed by
Ariel Mashraki
parent
d75fa8a01d
commit
41c3445b95
@@ -8,7 +8,7 @@ library using the [external templates](templates.md) option (i.e. it can be exte
|
||||
|
||||
## Quick Introduction
|
||||
|
||||
In order to enable the [`entgql`](https://github.com/facebookincubator/ent-contrib/tree/master/entgql) extension to your
|
||||
In order to enable the [`entgql`](https://github.com/ent/contrib/tree/master/entgql) extension to your
|
||||
project, you need to use the `entc` (ent codegen) package as described [here](code-gen.md#use-entc-as-a-package).
|
||||
Follow these 3 steps to enable it to your project:
|
||||
|
||||
@@ -46,7 +46,7 @@ package ent
|
||||
```
|
||||
|
||||
Note that `ent/entc.go` is ignored using a build tag, and it's executed by the `go generate` command
|
||||
through the `generate.go` file. The full example can be found in the [ent-contrib repository](https://github.com/facebookincubator/ent-contrib/blob/master/entgql/internal/todo).
|
||||
through the `generate.go` file. The full example can be found in the [ent/contrib repository](https://github.com/ent/contrib/blob/master/entgql/internal/todo).
|
||||
|
||||
|
||||
3\. Run codegen for your ent project:
|
||||
@@ -86,7 +86,7 @@ func (r *queryResolver) Node(ctx context.Context, guid string) (ent.Noder, error
|
||||
|
||||
## GQL Configuration
|
||||
|
||||
Here's a configuration example for a todo app as exists in [ent-contrib/entgql/todo](https://github.com/facebookincubator/ent-contrib/tree/master/entgql/internal/todo).
|
||||
Here's a configuration example for a todo app as exists in [ent/contrib/entgql/todo](https://github.com/ent/contrib/tree/master/entgql/internal/todo).
|
||||
|
||||
```yaml
|
||||
schema:
|
||||
@@ -131,7 +131,7 @@ The ordering option allows us to apply an ordering on the edges returned from a
|
||||
### Example
|
||||
|
||||
Let's go over the steps needed in order to add ordering to an existing GraphQL type.
|
||||
The code example is based on a todo-app that can be found in [ent-contrib/entql/todo](https://github.com/facebookincubator/ent-contrib/tree/master/entgql/internal/todo).
|
||||
The code example is based on a todo-app that can be found in [ent/contrib/entql/todo](https://github.com/ent/contrib/tree/master/entgql/internal/todo).
|
||||
|
||||
### Defining order fields in ent/schema
|
||||
|
||||
@@ -353,12 +353,12 @@ func (mutationResolver) CreateTodo(ctx context.Context, todo TodoInput) (*ent.To
|
||||
|
||||
## Examples
|
||||
|
||||
The [ent-contrib](https://github.com/facebookincubator/ent-contrib) contains several examples at the moment:
|
||||
1. A complete GraphQL server with a simple [Todo App](https://github.com/facebookincubator/ent-contrib/tree/master/entgql/internal/todo) with numeric ID field
|
||||
2. The same [Todo App](https://github.com/facebookincubator/ent-contrib/tree/master/entgql/internal/todouuid) in 1, but with UUID type for the ID field
|
||||
3. The same [Todo App](https://github.com/facebookincubator/ent-contrib/tree/master/entgql/internal/todopulid) in 1 and 2, but with a prefixed [ULID](https://github.com/ulid/spec) or `PULID` as the ID field. This example supports the Relay Node API by prefixing IDs with the entity type rather than employing the ID space partitioning in [Universal IDs](migrate.md#universal-ids).
|
||||
The [ent/contrib](https://github.com/ent/contrib) contains several examples at the moment:
|
||||
1. A complete GraphQL server with a simple [Todo App](https://github.com/ent/contrib/tree/master/entgql/internal/todo) with numeric ID field
|
||||
2. The same [Todo App](https://github.com/ent/contrib/tree/master/entgql/internal/todouuid) in 1, but with UUID type for the ID field
|
||||
3. The same [Todo App](https://github.com/ent/contrib/tree/master/entgql/internal/todopulid) in 1 and 2, but with a prefixed [ULID](https://github.com/ulid/spec) or `PULID` as the ID field. This example supports the Relay Node API by prefixing IDs with the entity type rather than employing the ID space partitioning in [Universal IDs](migrate.md#universal-ids).
|
||||
|
||||
---
|
||||
|
||||
Please note that this documentation is under development. All code parts reside in [ent-contrib/entgql](https://github.com/facebookincubator/ent-contrib/tree/master/entgql),
|
||||
and an example of a todo-app can be found in [ent-contrib/entql/todo](https://github.com/facebookincubator/ent-contrib/tree/master/entgql/internal/todo).
|
||||
Please note that this documentation is under development. All code parts reside in [ent/contrib/entgql](https://github.com/ent/contrib/tree/master/entgql),
|
||||
and an example of a todo-app can be found in [ent/contrib/entgql/todo](https://github.com/ent/contrib/tree/master/entgql/internal/todo).
|
||||
|
||||
@@ -91,7 +91,7 @@ import (
|
||||
|
||||
"entgo.io/ent/entc"
|
||||
"entgo.io/ent/entc/gen"
|
||||
"entgo.ioincubator/ent-contrib/entgql"
|
||||
"entgo.io/contrib/entgql"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta name="go-import" content="entgo.io/contrib git https://github.com/facebookincubator/ent-contrib">
|
||||
<meta name="go-source" content="entgo.io/contrib https://github.com/facebookincubator/ent-contrib https://github.com/facebookincubator/ent-contrib/tree/master{/dir} https://github.com/facebookincubator/ent-contrib/blob/master{/dir}/{file}#L{line}">
|
||||
<meta name="go-import" content="entgo.io/contrib git https://github.com/ent/contrib">
|
||||
<meta name="go-source" content="entgo.io/contrib https://github.com/ent/contrib https://github.com/ent/contrib/tree/master{/dir} https://github.com/ent/contrib/blob/master{/dir}/{file}#L{line}">
|
||||
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/entgo.io/contrib">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user