From afed967a6e28c7968219f3399fa9783fad6e7e99 Mon Sep 17 00:00:00 2001 From: gz Date: Wed, 25 Dec 2019 17:58:56 +0800 Subject: [PATCH] add headers --- final/client/src/index.js | 6 +++++- final/server/apollo.config.js | 5 +++++ final/server/store.sqlite | Bin 24576 -> 24576 bytes 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 final/server/apollo.config.js diff --git a/final/client/src/index.js b/final/client/src/index.js index 3979821..7c213ba 100644 --- a/final/client/src/index.js +++ b/final/client/src/index.js @@ -12,7 +12,11 @@ import injectStyles from "./styles"; const cache = new InMemoryCache(); const link = new HttpLink({ uri: "http://localhost:4000/graphql", - headers: { authorization: localStorage.getItem("token") } + headers: { + authorization: localStorage.getItem("token"), + 'client-name': 'Space Explorer [web]', + 'client-version': '1.0.0', + } }); const client = new ApolloClient({ cache, diff --git a/final/server/apollo.config.js b/final/server/apollo.config.js new file mode 100644 index 0000000..b264b1a --- /dev/null +++ b/final/server/apollo.config.js @@ -0,0 +1,5 @@ +module.exports = { + service: { + name: 'space-explorer', + }, + }; diff --git a/final/server/store.sqlite b/final/server/store.sqlite index 417afb9390cfef83d3dc118a8c1825b377366d1d..52c854974860d9b35d59d10dbbb08a9b8e2994dc 100644 GIT binary patch delta 227 zcmZoTz}Rqrae_3X)I=F)MyZVnOXQiwIZsSxS5W2Ry2CY{D~OAi^TcK|g-M)D&JvRk z>WFe!SeY2=Sr{8lcF-0Rf^ihI4GgRd48oknp=u0`^^DDop=ux;xEe8#8a4|n19Lr- z$scqjfTn<$MrKeIA