-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Federico
committed
Jun 18, 2021
1 parent
7c11094
commit 8e874d4
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
/* | ||
* ------------------------------------------------------ | ||
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY) | ||
* ------------------------------------------------------- | ||
*/ | ||
|
||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export enum Animal { | ||
DOG = "DOG", | ||
CAT = "CAT" | ||
} | ||
|
||
export enum Category { | ||
POST = "POST" | ||
} | ||
|
||
export class Post { | ||
id: string; | ||
title: string; | ||
author: User; | ||
category: Category; | ||
} | ||
|
||
export abstract class IQuery { | ||
abstract getPosts(): Post[] | Promise<Post[]>; | ||
} | ||
|
||
export class User { | ||
id: string; | ||
posts?: Post[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
type Post { | ||
id: ID! | ||
title: String! | ||
author: User! | ||
category: Category! | ||
} | ||
|
||
extend type User @key(fields: "id") { | ||
id: ID! @external | ||
posts: [Post] | ||
} | ||
|
||
extend type Query { | ||
getPosts: [Post] | ||
} | ||
|
||
extend enum Category { | ||
POST | ||
} |