skander
AEAsh Elixir
•Created by skander on 9/17/2023 in #support
AshGraphql erroring with key :run not found
Success!
6 replies
AEAsh Elixir
•Created by skander on 9/17/2023 in #support
AshGraphql erroring with key :run not found
I'd also upgraded from Ash 2.14.141 to 2.14.17. But trying now
6 replies
AEAsh Elixir
•Created by skander on 8/22/2023 in #support
GraphQL NewType Non-null?
Just tried it, works perfectly. Thanks again!
6 replies
AEAsh Elixir
•Created by skander on 8/22/2023 in #support
GraphQL NewType Non-null?
Thank you!
6 replies
AEAsh Elixir
•Created by Jan Ulbrich on 8/12/2023 in #support
JSON-API And Calculations
That way expensive calculations aren't run if you didn't intend to load them in a generic
/resource
call18 replies
AEAsh Elixir
•Created by Jan Ulbrich on 8/12/2023 in #support
JSON-API And Calculations
https://github.com/ash-project/ash_json_api/blob/c26e263919d52fc11b87e9aa234f5c895eccdf75/lib/ash_json_api/serializer.ex#L644 combined with https://github.com/ash-project/ash_json_api/blob/c26e263919d52fc11b87e9aa234f5c895eccdf75/lib/ash_json_api/serializer.ex#L630 - calculations are part of the default fields but if they're not loaded, they're excluded
18 replies
AEAsh Elixir
•Created by Jan Ulbrich on 8/12/2023 in #support
JSON-API And Calculations
If you don't provide a
fields
key in your request and you load the calculation via e.g. build(load: [:calculation])
it should show up too18 replies
AEAsh Elixir
•Created by Jan Ulbrich on 8/12/2023 in #support
JSON-API And Calculations
They should be available if you pull from
main
! Either load the calculation in your action or access it via the fields
param18 replies
AEAsh Elixir
•Created by skander on 7/31/2023 in #support
Calculations in AshJsonApi?
Sure, done! No rush of course. I might try fixing it myself in the same PR. I need to also show public calculated fields in the OpenAPI schema too
24 replies
AEAsh Elixir
•Created by skander on 7/31/2023 in #support
Calculations in AshJsonApi?
Alrighty, tests are here: https://github.com/skanderm/ash_json_api/commit/4a5f1d54b1c71a7b2f3a9496989c67315f416758
24 replies
AEAsh Elixir
•Created by skander on 7/31/2023 in #support
Calculations in AshJsonApi?
Ah got it. Still coming up with an
InvalidField
code with field[type]=attr1,calculated
format. Even tried with a simple concat
-based calculation with the same result. I can try reproing in a simplified test later.24 replies
AEAsh Elixir
•Created by skander on 7/31/2023 in #support
Calculations in AshJsonApi?
Sadly getting an error with the
fields=
param
I can make an issue after finishing up some things I need to get out24 replies
AEAsh Elixir
•Created by skander on 7/31/2023 in #support
Calculations in AshJsonApi?
Ok, seems to just work if the default read on the relationship also loads the calculation in a preparation.
24 replies
AEAsh Elixir
•Created by skander on 7/31/2023 in #support
Calculations in AshJsonApi?
Oh! Looks like it works when adding it to
default_fields
. Though I also need to somehow include a calculation from a relationship. Please let me know if anyone has any insights there.24 replies
AEAsh Elixir
•Created by rohan on 7/11/2023 in #support
How not to select fields when loading a resource
TIL about deselect!
6 replies
AEAsh Elixir
•Created by skander on 7/8/2023 in #support
Manual relationship with recursive CTE
Appreciate the help!
11 replies
AEAsh Elixir
•Created by skander on 7/8/2023 in #support
Manual relationship with recursive CTE
The rest is the same. The key for me here was not knowing you could pass a tuple into
select
and recursive_ctes
11 replies
AEAsh Elixir
•Created by skander on 7/8/2023 in #support
Manual relationship with recursive CTE
That worked! Thank you so much. I made a couple modifications so that the query would load all relationships in a batch, then group by the original resource's ID
11 replies
AEAsh Elixir
•Created by skander on 7/8/2023 in #support
Manual relationship with recursive CTE
Thank you so much! It’s still Sunday night here so I’ll be checking this tomorrow. Appreciate it!
11 replies