-
Clone this repository onto your machine and open the folder in VS Code
-
npm init
: Initialize the node project (run this command and below in the terminal) -
Edit newly created
package.json
file: add"start": "node index.js"
intoscipts
and"type": "module"
outside -
npm install @apollo/server graphql
: Install necessary packages -
npm start
: Run this to start the server and open the localhost (http://localhost:2409)
- graphql : The library that implements the core GraphQL parsing and execution algorithms.
- @apollo/server : The Apollo GraphQL server
The tutorial can be also found here.
Paste this query into Operation
tab:
query ExampleQuery($englishName: String!) {
animal(english: $englishName) {
xaitsnue
grammar
speakers
variant
other_info
semantic_domain
}
}
Hit the button Example Query
to run the query.
The result will show in the Response
tab on the right:
{
"data": {
"animal": {
"xaitsnue": "'asá",
"grammar": "noun",
"speakers": "AT, JK, JB, JD, EK",
"variant": null,
"other_info": null,
"semantic_domain": "mammal"
}
}
}