Skip to content

Commit 848e23e

Browse files
committed
Basic setup
1 parent c99a184 commit 848e23e

3 files changed

Lines changed: 92 additions & 0 deletions

File tree

graphQLApollo/_db.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
export default books =
2+
[{"title":"Big Year, The","author":"Kristyn Stolze","pages":274,"price":30.45},
3+
{"title":"Flawless","author":"Jolee Philliskirk","pages":546,"price":39.53},
4+
{"title":"Fish Tank","author":"Chase Chalfain","pages":36,"price":57.84},
5+
{"title":"Horror Business","author":"Jessie Mancktelow","pages":301,"price":41.55},
6+
{"title":"Little Witches","author":"Meade Dyott","pages":248,"price":48.94},
7+
{"title":"Sling Blade","author":"Royall Rubenczyk","pages":28,"price":3.55},
8+
{"title":"Maborosi (Maboroshi no hikari)","author":"Raven Carden","pages":586,"price":41.06},
9+
{"title":"Vampire in Brooklyn","author":"Nadya Swayton","pages":460,"price":27.43},
10+
{"title":"Ninja Scroll (Jûbei ninpûchô)","author":"Morgen Carriage","pages":222,"price":46.26},
11+
{"title":"Thousand Acres, A","author":"Harmonia Pulfer","pages":479,"price":28.47},
12+
{"title":"Neds","author":"Marlene Dunlap","pages":281,"price":35.74},
13+
{"title":"Wimbledon","author":"Angus Toolan","pages":578,"price":43.8},
14+
{"title":"Beast Must Die, The","author":"Dre MacDonald","pages":336,"price":9.04},
15+
{"title":"Anthony Adverse","author":"Ramsay Grosvenor","pages":481,"price":13.16},
16+
{"title":"I Love Trouble","author":"Michaelina Rhymer","pages":367,"price":38.25},
17+
{"title":"Takva: A Man's Fear of God","author":"Nickolaus Pennone","pages":123,"price":23.38},
18+
{"title":"Senotaji","author":"Yehudit Thrower","pages":28,"price":24.24},
19+
{"title":"Woman Rebels, A (Portrait of a Rebel)","author":"Alisha McNeachtain","pages":120,"price":2.72},
20+
{"title":"Oliver Twist","author":"Hurleigh Ducrow","pages":503,"price":45.14},
21+
{"title":"Beyond the Valley of the Dolls","author":"Brena Harraway","pages":487,"price":48.69},
22+
{"title":"Miracle on 34th Street","author":"Ginny Frisel","pages":158,"price":18.47},
23+
{"title":"Needing You... (Goo naam gwa neui)","author":"Nate Bannard","pages":300,"price":4.7},
24+
{"title":"Metsän tarina","author":"Hazlett Dockreay","pages":447,"price":48.52},
25+
{"title":"Cats","author":"Humphrey Idill","pages":408,"price":11.5},
26+
{"title":"Caesar (Julius Caesar)","author":"Kristel Nickols","pages":444,"price":17.8},
27+
{"title":"Sandor slash Ida","author":"Pier Toxell","pages":343,"price":20.0},
28+
{"title":"Don't Look Now","author":"Neddie Brompton","pages":363,"price":41.9},
29+
{"title":"Courage Mountain","author":"Cloris Graham","pages":344,"price":10.13},
30+
{"title":"Suburbans, The","author":"Luci McKomb","pages":338,"price":35.02},
31+
{"title":"Spread","author":"Windham Sillars","pages":346,"price":30.29},
32+
{"title":"Party Monster","author":"Barbi Quickenden","pages":190,"price":39.83},
33+
{"title":"Shattered Glass","author":"Christopher Santry","pages":192,"price":46.33},
34+
{"title":"Private War of Major Benson, The","author":"Jacklyn Duthie","pages":423,"price":57.25},
35+
{"title":"The Runner from Ravenshead","author":"Kendrick Smithies","pages":227,"price":48.32},
36+
{"title":"Shadows","author":"Guilbert Markson","pages":267,"price":12.53},
37+
{"title":"Faces of Death","author":"Leonanie Ceci","pages":265,"price":48.91},
38+
{"title":"Elephant White","author":"Odie Seivertsen","pages":288,"price":43.44},
39+
{"title":"Upside Down","author":"Bennett Stanbro","pages":31,"price":25.79},
40+
{"title":"F/X2 (a.k.a. F/X 2 - The Deadly Art of Illusion)","author":"Vida Capey","pages":322,"price":8.75},
41+
{"title":"Forest of the Gods (Dievu miskas)","author":"Selby Portsmouth","pages":236,"price":29.88},
42+
{"title":"Dinner at Eight","author":"Libbey Rykert","pages":372,"price":27.21},
43+
{"title":"Element of Crime, The (Forbrydelsens Element)","author":"Corenda Aldie","pages":406,"price":23.6},
44+
{"title":"Hackers","author":"Allyce Duckham","pages":159,"price":28.47},
45+
{"title":"Black Sheep","author":"Lind Neiland","pages":310,"price":23.08},
46+
{"title":"Little Romance, A","author":"Richard Popeley","pages":350,"price":13.63},
47+
{"title":"Louis Theroux: Twilight of the Porn Stars","author":"Carlin Edelmann","pages":191,"price":12.61},
48+
{"title":"Razor's Edge, The","author":"Lorenzo Lauxmann","pages":92,"price":58.52},
49+
{"title":"Lamp in the Dark; The Untold History of the Bible, A","author":"Chauncey Scarlon","pages":62,"price":54.48},
50+
{"title":"Playing with Love (Puppy Love) (Maladolescenza)","author":"Bel Tonsley","pages":415,"price":47.03},
51+
{"title":"Mutant Action (Acción Mutante)","author":"Carlie Clarey","pages":587,"price":1.66}
52+
]

graphQLApollo/index.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { ApolloServer } from '@apollo/server';
2+
import { startStandaloneServer } from '@apollo/server/standalone';
3+
4+
// A schema is a collection of type definitions (hence "typeDefs")
5+
// that together define the "shape" of queries that are executed against
6+
// your data.
7+
const typeDefs = `#graphql
8+
# Comments in GraphQL strings (such as this one) start with the hash (#) symbol.
9+
10+
# This "Book" type defines the queryable fields for every book in our data source.
11+
type Book {
12+
title: String
13+
author: String
14+
}
15+
16+
# The "Query" type is special: it lists all of the available queries that
17+
# clients can execute, along with the return type for each. In this
18+
# case, the "books" query returns an array of zero or more Books (defined above).
19+
type Query {
20+
books: [Book]
21+
}
22+
`;

graphQLApollo/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "graphqlapollo",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"start": "node index.js"
9+
},
10+
"keywords": [],
11+
"author": "",
12+
"license": "ISC",
13+
"type": "module",
14+
"dependencies": {
15+
"@apollo/server": "^4.11.0",
16+
"graphql": "^16.9.0"
17+
}
18+
}

0 commit comments

Comments
 (0)