Remove graphql-yoga
Created by: Tirokk
Authored by roschaefer Merged

Pullrequest

After we decided to seed our database directly in our tests and not going over HTTP, this PR will remove graphql-yoga
(insufficiently maintained, 3rd party) for apollo-server
. This will also free us from the obsolete extra server during backend testing, apollo-server-testing
works without starting an entire HTTP server. We even might get reasonable code coverage now @ulfgebhardt
Issues
- None
Todo
-
None
Merge request reports
Activity
20 20 21 21 const createServer = options => { 22 22 const defaults = { 23 context: async ({ request }) => { 24 const user = await decode(driver, request.headers.authorization) 23 context: async ({ req }) => { Created by: Tirokk
Authored by mattwr18
Outdated (history rewrite) - original diff
@@ -20,28 +20,30 @@ const driver = getDriver() const createServer = options => { const defaults = { - context: async ({ request }) => { - const user = await decode(driver, request.headers.authorization) + context: async ({ req }) => {
Can you explain this change? I see cases where I would like to go through the code base and do the opposite where I spell it out further, but I respect that others like to shorten variables, but if I lengthen and you shorten, we are kinda working against each other, or should we try to decide a standard and all stick by it?
Created by: Tirokk
Authored by roschaefer
Again, not my decision, but
apollo
's decision. I would spell itrequest
and so doesgraphql-yoga
, butapollo
usesreq
.
15 15 authorization: `Bearer ${response.login}`, 16 16 } 17 17 } 18 19 //* This is a fake ES2015 template string, just to benefit of syntax 20 // highlighting of `gql` template strings in certain editors. 21 export function gql(strings) { 22 return strings.join('') 23 } Created by: Tirokk
Authored by mattwr18
Outdated (history rewrite) - original diff
@@ -15,3 +15,9 @@ export async function login(variables) { authorization: `Bearer ${response.login}`, } } + +//* This is a fake ES2015 template string, just to benefit of syntax +// highlighting of `gql` template strings in certain editors. +export function gql(strings) { + return strings.join('') +}
I like this solution, but how do you feel about it @roschaefer don't want you to feel like you are making too many concessions I am also ok dealing with no syntax highlighting, not sure how @Tirokk feels.
Created by: Mogge
Review: Changes requested
I always implement the
gql
tag and we have just spoken about that I would love to have that for Cypher as well. So I really don’t understand, why you remove it … @roschaefer Please let it in place!Your work at all seems to be great here, @roschaefer !