quantum-flow 1.15.0 → 1.15.2

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.
Files changed (2) hide show
  1. package/README.md +13 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -457,6 +457,16 @@ This project provides a set of decorators to define GraphQL schema and resolvers
457
457
  - `@Subscription(returnType?)`: Method decorator to define a GraphQL subscription resolver.
458
458
  - `@Resolver()`: Class decorator to mark a class as a GraphQL resolver.
459
459
 
460
+ ### Enabling
461
+
462
+ ```typescript
463
+ @Server({
464
+ controllers: [GraphQlController],
465
+ graphql: { enabled: true, path: '/graphql' },
466
+ })
467
+ export class App {}
468
+ ```
469
+
460
470
  ### Example Usage
461
471
 
462
472
  ```typescript
@@ -482,24 +492,15 @@ class CreateUserInput {
482
492
 
483
493
  @Controller('/graphql')
484
494
  export class GraphQlController {
485
- private users: User[] = [
486
- /* initial users */
487
- ];
488
495
 
489
496
  @Query(User)
490
- async getUser(@Arg('id', String, { required: true }) id: string) {
491
- // implementation
492
- }
497
+ async getUser(@Arg('id', String, { required: true }) id: string) {...}
493
498
 
494
499
  @Query(() => [User])
495
- async getUsers() {
496
- // implementation
497
- }
500
+ async getUsers() {...}
498
501
 
499
502
  @Mutation(User)
500
- async createUser(@Arg('input', CreateUserInput, { required: true }) input: CreateUserInput) {
501
- // implementation
502
- }
503
+ async createUser(@Arg('input', CreateUserInput, { required: true }) input: CreateUserInput) {...}
503
504
 
504
505
  // Additional queries and mutations...
505
506
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quantum-flow",
3
- "version": "1.15.0",
3
+ "version": "1.15.2",
4
4
  "description": "Decorator-based API framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",