Fork me on GitHub
#graphql
<
2020-05-18
>
mafcocinco02:05:36

Any suggestions/best practices for how to organize a GraphQL server project that uses lacinia? Specifically, I’m thinking about how to layout the directory structure of the project WRT to objects, queries, mutations, etc. We have made a couple of different attempts, none of which I am particularly happy with.

gklijs11:05:52

I put the functionally related ones with each other as 'services' https://github.com/openweb-nl/kafka-graphql-examples/tree/master/graphql-endpoint/src/nl/openweb/graphql_endpoint. Not sure that works better,

steveb8n02:05:25

Q: how can I specify an optional list of string argument type?

{:type (list String)}
is parsed as a required/non-null arg. I can workaround this with an input type but that adds some nesting in the client i.e. complexity

hlship16:05:57

That should not be the case; (list String) is an optional type, even in a field argument. Can you provide a short example of this occurring?

steveb8n07:05:50

@U04VDKC4G how right you are. I discovered it here https://gist.github.com/stevebuik/e289d6783b43639726cbc39357728bbf that my problem was not in the schema but in the client GQL mutation. nothing like having to document a question, only to find the answer. sorry for the distraction

hlship15:05:17

Glad to be your duckie