Fork me on GitHub
#graphql
<
2022-01-21
>
orestis09:01:30

Coming back to the tracing question above. I'm using the tracing support in pedestal.log combined with AWS X-ray. It seems like it's a very common pattern to store the active "span" (or Segment/Subsegment in XRay terms) in a Thread local. It seems though that Lacinia manages its own thread pool using agents, so the resolvers are not executed in the HTTP thread. I'm using the plain query-executor-handler (not the async one) so I'm wondering if that's expected behaviour.

emccue16:01:39

File uploads with lacinia - what have people done for this / is this a supported thing

orestis17:01:55

Nope, unless you base64 at the client. Best to have a separate endpoint for file uploads.

orestis17:01:12

For some excel uploads I opted to parse client-side and call a graphql endpoint directly - avoiding potential vulnerabilities in parsing Excel files.

gklijs18:01:19

Indeed, not even lacinia specific, GraphQL has no binary type.

thumbnail18:01:45

We have implemented the https://github.com/jaydenseric/graphql-multipart-request-spec for lacinia to support uploads with graphql; unfortunately it's a private lib right now but willing to open source it if there's interest