added api token to urql and env example
This commit is contained in:
@@ -2,9 +2,12 @@ import { Client, cacheExchange, fetchExchange } from "@urql/core";
|
||||
|
||||
const urql = new Client({
|
||||
url: process.env.GRAPHQL_URL || "",
|
||||
exchanges: [cacheExchange, fetchExchange]
|
||||
exchanges: [cacheExchange, fetchExchange],
|
||||
fetchOptions: {
|
||||
headers: {
|
||||
"x-api-key": process.env?.API_TOKEN || ""
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
console.log(`GRAPHQL_URL`, process.env.GRAPHQL_URL);
|
||||
|
||||
export default urql;
|
||||
|
||||
Reference in New Issue
Block a user