Currently, I am implementing GraphQl with oxid and I am also getting data based on the query
but all the query is working without any authentication so need to add security like there is must required valid token. otherwise, give an Unauthenticated error
My current query
query GetProducts {
products {
id
title
mpn
ean
shortDescription
varMinPrice
}
}
and I am getting responses like below
{
"data": {
"products": [
{
"id": "062b2914d57389263ae7bdd773c70f4a",
"title": "Hailys",
"mpn": "99",
"ean": "100",
"shortDescription": "Mens Oversized T-Shirt with Stylish Chest Pocket",
"varMinPrice": 35.99
},
{
"id": "066e3ce119c43c81cc0e46d4f1681eed",
"title": "Destiny",
"mpn": "",
"ean": "",
"shortDescription": "Hardcase hand luggage suitcase",
"varMinPrice": 70.95
},
This works completely fine
but now here I want to make sure that each query needs to pass a valid token and then the response we get.
so for that what changes do we need to make? and what place do I need to implement those changes?
Please Help me for pointing this thing
Thank you !!