-
Notifications
You must be signed in to change notification settings - Fork 276
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
Showing
22 changed files
with
658 additions
and
341 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 1.0.0 | ||
|
||
Initial release |
Empty file.
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
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import { GQLitObject, GQLitInputObject } from "../../../../src"; | ||
import { GQLiteralObject, GQLiteralInputObject } from "../../../../src"; | ||
|
||
export const Comment = GQLitObject("Comment", t => { | ||
export const Comment = GQLiteralObject("Comment", t => { | ||
t.field("id", "ID"); | ||
}); | ||
|
||
export const CreateCommentInput = GQLitInputObject("CreateCommentInput", t => { | ||
t.mix("Comment"); | ||
}); | ||
export const CreateCommentInput = GQLiteralInputObject( | ||
"CreateCommentInput", | ||
t => { | ||
t.mix("Comment"); | ||
} | ||
); |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { GQLitInterface } from "../../../../src"; | ||
import { GQLiteralInterface } from "../../../../src"; | ||
|
||
export const Node = GQLitInterface("Node", t => { | ||
export const Node = GQLiteralInterface("Node", t => { | ||
t.resolveType(() => {}); | ||
}); |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { GQLitObject } from '../../../../src'; | ||
import { GQLiteralObject } from "../../../../src"; | ||
|
||
export const Post = GQLitObject('Post', t => { | ||
t.implements('Node'); | ||
export const Post = GQLiteralObject("Post", t => { | ||
t.implements("Node"); | ||
}); |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { GQLitObject } from "../../../../src"; | ||
import { GQLiteralObject } from "../../../../src"; | ||
|
||
export const User = GQLitObject("User", t => { | ||
export const User = GQLiteralObject("User", t => { | ||
t.mix("Node"); | ||
}); |
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 |
---|---|---|
@@ -1,22 +1,30 @@ | ||
import { GQLitObject } from '../../../../../src'; | ||
import { GQLiteralObject } from "../../../../../src"; | ||
|
||
export const Film = GQLitObject('Film', t => { | ||
t.description('A single film'); | ||
t.string('title', { description: 'The title of the film' }); | ||
t.int('episodeID', { description: 'The episode number of this film.', property: 'episode_id' }); | ||
t.string('openingCrawl', { description: 'The opening paragraphs at the beginning of this film.' }); | ||
t.string('director', { description: 'The name of the director of this film.' }); | ||
t.list('producers', 'String', { | ||
description: 'The name(s) of the producer(s) of this film.', | ||
export const Film = GQLiteralObject("Film", t => { | ||
t.description("A single film"); | ||
t.string("title", { description: "The title of the film" }); | ||
t.int("episodeID", { | ||
description: "The episode number of this film.", | ||
property: "episode_id", | ||
}); | ||
t.string("openingCrawl", { | ||
description: "The opening paragraphs at the beginning of this film.", | ||
}); | ||
t.string("director", { | ||
description: "The name of the director of this film.", | ||
}); | ||
t.list("producers", "String", { | ||
description: "The name(s) of the producer(s) of this film.", | ||
resolve: film => { | ||
return film.producer.split(',').map((s: string) => s.trim()); | ||
return film.producer.split(",").map((s: string) => s.trim()); | ||
}, | ||
}); | ||
t.string('releaseDate', { | ||
property: 'release_date', | ||
description: 'The ISO 8601 date format of film release at original creator country.', | ||
t.string("releaseDate", { | ||
property: "release_date", | ||
description: | ||
"The ISO 8601 date format of film release at original creator country.", | ||
}); | ||
t.field('speciesConnection', 'FilmSpeciesConnection'); | ||
t.field('starshipConnection', 'StarshipConnection'); | ||
t.field('starshipConnection', 'StarshipConnection'); | ||
t.field("speciesConnection", "FilmSpeciesConnection"); | ||
t.field("starshipConnection", "StarshipConnection"); | ||
t.field("starshipConnection", "StarshipConnection"); | ||
}); |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { GQLitObject } from '../../../../../src'; | ||
import { GQLiteralObject } from "../../../../../src"; | ||
|
||
export const Planet = GQLitObject('Planet', t => { | ||
export const Planet = GQLiteralObject("Planet", t => { | ||
t.description(`A large mass, planet or planetoid in the Star Wars Universe, at the time of | ||
0 ABY.`); | ||
t.string('name', { description: 'The name of this planet.' }); | ||
t.int('diameter'); | ||
t.string("name", { description: "The name of this planet." }); | ||
t.int("diameter"); | ||
}); |
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 |
---|---|---|
@@ -1,21 +1,24 @@ | ||
import { GQLitObject } from '../../../../../src'; | ||
import { GQLiteralObject } from "../../../../../src"; | ||
|
||
export const Vehicle = GQLitObject('Vehicle', t => { | ||
t.description('A single transport craft that does not have hyperdrive capability'); | ||
t.string('name', { | ||
export const Vehicle = GQLiteralObject("Vehicle", t => { | ||
t.description( | ||
"A single transport craft that does not have hyperdrive capability" | ||
); | ||
t.string("name", { | ||
description: `The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder | ||
bike".`, | ||
}); | ||
t.string('model', { | ||
t.string("model", { | ||
description: `The model or official name of this vehicle. Such as "All-Terrain Attack | ||
Transport".`, | ||
}); | ||
t.string('vehicleClass', { | ||
property: 'vehicle_class', | ||
description: 'The class of this vehicle, such as "Wheeled" or "Repulsorcraft".', | ||
t.string("vehicleClass", { | ||
property: "vehicle_class", | ||
description: | ||
'The class of this vehicle, such as "Wheeled" or "Repulsorcraft".', | ||
}); | ||
t.list('manufacturers', 'String', { | ||
t.list("manufacturers", "String", { | ||
// resolve: () => {}, | ||
description: 'The manufacturers of this vehicle.', | ||
description: "The manufacturers of this vehicle.", | ||
}); | ||
}); |
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
Oops, something went wrong.