Marvin Jude
12/25/2018, 2:42 PMimpowski
12/25/2018, 8:24 PMNick
12/25/2018, 9:07 PMLuis Acerv
12/25/2018, 9:08 PMprisma graphql authentication adapter
, Anyone knows an example using prisma init
?pllumh
12/25/2018, 10:11 PMheaders
or connectionParams
in subscriptions in graphql bindings... My code in Apollo:
wsLink.subscriptionClient.use([{
async applyMiddleware(options, next) {
// get the authentication token from local storage if it exists
const token = cookie.load('access_token');
options.connectionParams = {
authorization: token ? `Bearer ${token}` : "",
};
next();
},
}]);
const authLink = setContext((_, { headers }) => {
// get the authentication token from local storage if it exists
const token = cookie.load('access_token');
// return the headers to the context so httpLink can read them
return {
headers: {
...headers,
authorization: token ? `Bearer ${token}` : "",
}
}
});
impowski
12/25/2018, 10:16 PMxiaoqf10
12/26/2018, 3:30 AMMarvin Jude
12/26/2018, 12:20 PMWill
12/26/2018, 7:13 PMAndres Montoya
12/26/2018, 10:40 PMian izaguirre
12/26/2018, 10:46 PMitems: [Item]!
AND items(where: ItemWhereUniqueInput!): [Item]!
?sapkra
12/27/2018, 12:40 AMAndres Montoya
12/27/2018, 5:09 AMxiaoqf10
12/27/2018, 7:05 AMLucas
12/27/2018, 9:38 AMxiaoqf10
12/27/2018, 11:04 AMTiago Correia
12/27/2018, 12:42 PMDavid Casier
12/27/2018, 1:41 PMVenelin
12/27/2018, 2:06 PMNovalis
12/27/2018, 2:09 PMonePunchMan
12/27/2018, 3:06 PMonePunchMan
12/27/2018, 3:07 PMfieldname_ci
, but its not part of the opencrud specs 😕Christian Cederfjärd
12/27/2018, 3:08 PMDavid Casier
12/27/2018, 3:13 PMDavid Casier
12/27/2018, 3:15 PMDavid Casier
12/27/2018, 3:18 PMDavid Casier
12/27/2018, 3:19 PMSlackbot
12/27/2018, 3:29 PMxiaoqf10
12/28/2018, 2:25 AMxiaoqf10
12/28/2018, 2:41 AM