Fork me on GitHub
#graphql
<
2020-07-24
>
Lennart Buit20:07:38

Am I correct in concluding that if you migrated to lacinia.pedestal2, that the query extraction no longer calls the extract-query multimethod for query extraction? We were extending that to parse queries sent in multipart requests (graphql upload spec)

Lennart Buit20:07:40

(I don’t want to be that guy always complaining, still loving the library. I will offer pull requests when applicable 🙂 )

hlship21:07:08

Yes, the new namespace is simpler, and does less. You can swap in some of the old interceptors however, or mix and match pretty easily.

Lennart Buit21:07:40

Right, so that means replacing both interceptors. That sounds fair, we were already replacing body-data to deal with multipart requests, so I guess we’ll also replace the graphql-data interceptor with the old / a custom implementation when this library is used with pedestal2 interceptors

Lennart Buit21:07:52

Extending that multimethod was a nice sneaky solution while it lasted, but I can see your reasoning of not wanting two extension methods (replacement of interceptors and extending of multimethods)

Lennart Buit21:07:42

In other questions: Could it be that enum transformers are not called to serialize default values? When I add a custom scalar, say a Decimal, I can put a decimal literal in my schema.edn as a default-value, and in introspection, this default value will have been serialized by my custom scalar serialize function. Now, with enums, I have an enum transformer that adds a namespace/kebab-cases the constant. Now, I expected to be able to add a ns-qualified kebab-cased keyword in schema.edn as a default-value, and, in introspection, get my serialize function called for this enum. This, however, appears to not be the case and instead I just get (name enum-member) in defaultValue of an introspection query. That trips up GraphQL playground, as a kebab-cased string is not a member of that enum ^^

Lennart Buit21:07:17

Again, don’t want to be a burden. I am willing to provide issues, patches, or whatever to contribute 🙂. My reasoning: rather report a false positive, than not report a legit bug 🙂.

hlship21:07:27

This does sound like a bug to me.

Lennart Buit21:07:43

Sanity check: The expected behaviour is that you put a ‘parsed’ enum value as default-value in schema.edn?

Lennart Buit21:07:08

So in this case, a ns-qualified kebab-cased keyword

Lennart Buit21:07:14

If so, I can take a stab at it

Lennart Buit23:07:10

I have to say, it is quite easy to trace and fix problems in lacinia as a relative outsider 🙂.

hlship18:07:58

Well, thanks! That’s high praise.