@newmo/graphql-fake-server 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -75
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,82 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
GraphQL Fake Server.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
- Static Path
|
|
8
|
-
- Support Declarative Fake via `@example` directive.
|
|
9
|
-
- [ ] Dynamic Path
|
|
10
|
-
- Support Framework-Agnostic Fake for testing via HTTP
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
|
|
14
|
-
1. Add `@exampleID`, `@exampleString`, `@exampleInt`, `@exampleFloat`, `@exampleBoolean` directive to your schema.
|
|
5
|
+
## Usage
|
|
15
6
|
|
|
16
|
-
|
|
17
|
-
"""
|
|
18
|
-
@exampleID directive specifies an example value for a ID field.
|
|
19
|
-
This example value is used in the fake data.
|
|
20
|
-
ID value will be unique between all ID fake data.
|
|
21
|
-
"""
|
|
22
|
-
directive @exampleID(
|
|
23
|
-
"""
|
|
24
|
-
The value of the ID field.
|
|
25
|
-
@exampleID(value: "id")
|
|
26
|
-
"""
|
|
27
|
-
value: ID!
|
|
28
|
-
) on FIELD_DEFINITION
|
|
29
|
-
"""
|
|
30
|
-
@exampleString directive specifies an example value for a String field.
|
|
31
|
-
This example value is used in the fake data.
|
|
32
|
-
"""
|
|
33
|
-
directive @exampleString(
|
|
34
|
-
"""
|
|
35
|
-
The value of the String field.
|
|
36
|
-
@exampleString(value: "example")
|
|
37
|
-
"""
|
|
38
|
-
value: String!
|
|
39
|
-
) on FIELD_DEFINITION
|
|
40
|
-
"""
|
|
41
|
-
@exampleInt directive specifies an example value for a Inf field.
|
|
42
|
-
This example value is used in the fake data.
|
|
43
|
-
"""
|
|
44
|
-
directive @exampleInt(
|
|
45
|
-
"""
|
|
46
|
-
The value of the Int field.
|
|
47
|
-
@exampleInt(value: 1)
|
|
48
|
-
"""
|
|
49
|
-
value: Int!
|
|
50
|
-
) on FIELD_DEFINITION
|
|
51
|
-
"""
|
|
52
|
-
@exampleFloat directive specifies an example value for a Float field.
|
|
53
|
-
This example value is used in the fake data.
|
|
54
|
-
"""
|
|
55
|
-
directive @exampleFloat(
|
|
56
|
-
"""
|
|
57
|
-
The value of the Float field.
|
|
58
|
-
@exampleFloat(value: 1.0)
|
|
59
|
-
"""
|
|
60
|
-
value: Float!
|
|
61
|
-
) on FIELD_DEFINITION
|
|
62
|
-
"""
|
|
63
|
-
@exampleBoolean directive specifies an example value for a Boolean field.
|
|
64
|
-
This example value is used in the fake data.
|
|
65
|
-
"""
|
|
66
|
-
directive @exampleBoolean(
|
|
67
|
-
"""
|
|
68
|
-
The value of the Boolean field.
|
|
69
|
-
@exampleBoolean(value: true)
|
|
70
|
-
"""
|
|
71
|
-
value: Boolean!
|
|
72
|
-
) on FIELD_DEFINITION
|
|
73
|
-
```
|
|
7
|
+
See <https://github.com/newmo-oss/graphql-fake-server>
|
|
74
8
|
|
|
75
|
-
##
|
|
9
|
+
## Features
|
|
76
10
|
|
|
11
|
+
- Integrate Apollo Server
|
|
12
|
+
- Support `/fake` API
|
|
13
|
+
- Support `/graphql` API
|
|
77
14
|
|
|
78
15
|
## Tests
|
|
79
16
|
|
|
80
|
-
|
|
17
|
+
```sh
|
|
18
|
+
npm test
|
|
19
|
+
```
|
|
81
20
|
|
|
82
21
|
## Contributing
|
|
83
22
|
|
|
@@ -90,8 +29,3 @@ directive @exampleBoolean(
|
|
|
90
29
|
## License
|
|
91
30
|
|
|
92
31
|
MIT
|
|
93
|
-
|
|
94
|
-
## Credits
|
|
95
|
-
|
|
96
|
-
- [mizdra/graphql-codegen-typescript-fabbrica: GraphQL Code Generator Plugin to define fake data factory.](https://github.com/mizdra/graphql-codegen-typescript-fabbrica)
|
|
97
|
-
- [graphql-kit/graphql-faker: 🎲 Mock or extend your GraphQL API with faked data. No coding required.](https://github.com/graphql-kit/graphql-faker)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newmo/graphql-fake-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "GraphQL fake server for testing",
|
|
6
6
|
"keywords": [
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@graphql-tools/mock": "^9.0.2",
|
|
52
52
|
"@graphql-tools/schema": "^10.0.3",
|
|
53
53
|
"@hono/node-server": "^1.11.1",
|
|
54
|
-
"@newmo/graphql-fake-core": "0.
|
|
54
|
+
"@newmo/graphql-fake-core": "0.7.0",
|
|
55
55
|
"graphql-depth-limit": "^1.1.0",
|
|
56
56
|
"hono": "^4.3.2"
|
|
57
57
|
},
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"access": "public",
|
|
78
78
|
"registry": "https://registry.npmjs.org/"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "1a6ec2eb39227fc9ded80411461e0dfca4b02894"
|
|
81
81
|
}
|