edwinofdawn
AEAsh Elixir
•Created by edwinofdawn on 7/18/2023 in #support
Calculatated fields and AshGraphQL
How can I query calculated fields in when graphql . the fields are virtual they don't exist as attributes. ?
3 replies
AEAsh Elixir
•Created by edwinofdawn on 6/13/2023 in #support
Policies Usage
I am guessing policies always get evaluated before the action is called. Can I set an argument based on the results of a policies evaluation ?
9 replies
AEAsh Elixir
•Created by edwinofdawn on 6/2/2023 in #support
Intergrating Gaurdian Plugs into AshGraphql
I want implement JWT validation checking using Guardian. Is there an example I could checkout . For context this is for
AshGraphQL
and I want the check done only when certain actions are called not all.
eg I have
elixir
above is the action I want to protect by putting it behind a valid session. how do I use a Guardian
plug that validates valid token to protect this action.5 replies
AEAsh Elixir
•Created by edwinofdawn on 5/24/2023 in #support
Returns type
I have a actions likes this
elixir
I want to override the default return type which defaults to the resource . and instead return a map type with fields user of type user resource and token of type string.
16 replies
AEAsh Elixir
•Created by edwinofdawn on 5/23/2023 in #support
Intercept Identities Behaviour
I have this code
elixir
Incase of a unique error by email found using
eager_check_with
. rerun change again and upsert the record raising the error ? so that the API never errors out.26 replies
AEAsh Elixir
•Created by edwinofdawn on 5/16/2023 in #support
Ecto.Multi Usage
I saw only one post about how to use
Ecto.Multi
it directed me to Ash.Flow
what I didn't find an example usage.
For context I have a record I want fetch using token provided its valid, after I get the record successfully I want to update a field on it and finally on success issue a JWT
or on error just return the error. How will this look like in the update function ?. Is this a candidate for to consider using ManualActions
?41 replies
AEAsh Elixir
•Created by edwinofdawn on 4/27/2023 in #support
undefined root_level_errors? true
Hello, small problem here. I am doing something like this
where I return {: error, changeset} I want the errors to bubble up and be returned by the graphql layer but
root_level_errors?
seems to be undefined. right now when you enter an invalid email the error returned is a generic something went wrong.6 replies
AEAsh Elixir
•Created by edwinofdawn on 4/17/2023 in #support
Ash Query filter function
For background information I have binary field in my datalayer called token when I call this the following function:
but I keep running into the same error highlighted below after inspection.
token exists on resource user , I don't know what the problem is ?
22 replies
AEAsh Elixir
•Created by edwinofdawn on 4/13/2023 in #support
Casting Binary from Ash.Type.Binary to GraphQL type
Hello, I Have field with type
:binary
in my resource user which just represents a token generate using :crypto
but I get this error
Could not determine graphql field type for Ash.Type.Binary
any ideas on how to solve this?3 replies