Closed stevebuik closed 3 years ago
Could you check that it really works? I've never used graphql and don't know if this is what it was about
I have tested and confirmed the fix. If you want to add a test for this, you can use this:
(let [entity-id "6037b7a5-5a77-48a3-a294-8dba786d8e9d"
gql-entity {:__typename "release"
:id entity-id
:created "2021-05-10T09:39:28"
:release/id entity-id}
db (dx/commit (dx/create-dx) [[:dx/put gql-entity]])]
(dx/pull db [:__typename :created] [:release/id entity-id]))
because Doxa considers :_ to be a reverse ref read, it stops graphql results from working out of the box.
All graphql entities have a :__typename field so this is pervasive.
My workaround is simple enough:
This is like an interceptor.
Is there a way to provide support for :_foo attributes?
If not, I wonder if adding interceptors to this lib with some included examples like a graphql transform might be a solution?
Or other solutions?