Dictionary GraphQL API.
{
lookup(input: { fromLanguage: "eng", toLanguage: "deu", searchString: "honey" }) {
word {
id
text
language {
id
code
}
}
translatedWord {
id
text
language {
id
code
}
}
}
}
Result:
{
"data": {
"lookup": [
{
"word": {
"id": "08620a66630843a6a6393072ea4d1937",
"text": "honey",
"language": {
"id": "7647ebb0aed54f5bb70a9341f57ee319",
"code": "eng"
}
},
"translatedWord": {
"id": "2aa10cdb69b642919cfb88a941a7c592",
"text": "Honig {m}",
"language": {
"id": "fba6098fb4b84262a820eab5fedc35f8",
"code": "deu"
}
}
}
]
}
}
-
Install the dependencies:
npm install
-
Set up the configuration:
This project uses environment variables for configuration. Copy the example
.env
file to set up the defaults.cp .env.example .env
Then, take a look at the file and add or edit the values according to your local environment.
-
Run the development server:
npm run dev