I'm wondering if there's a way to convert the map automatically to simple-keywords, since returning qualified-keywords doesn't seem like an option
Maybe this is what you are looking for: https://lacinia.readthedocs.io/en/latest/resolve/attach.html#resolver-factories
Bit hazy on the details tho
Thanks, I'll take a look at that
Just an idea, haven’t tried that… when you create lacinia’s GraphQL schema, you attach you resolvers. There you could wrap all resolvers with a function that will handle the mapping. Here you have endless possibilities like, stripping the namespace part of all map keys that are keywords or use a map where you define these mappings (e.g. {:person/id :person :person/name :name}
)
… or use GraphQL directives to specify this mapping in the schema. I did something like that for checking authorisation. If you are interested in details, I can put something together…
are you using lacinia-pedestal
? You might also put that into an interceptor.
If GraphQL compatibility is not an issue you might look at https://github.com/wilkerlucio/pathom which gives you the full potential of EDN an thus namespaced keys.