How to work with relationships in Absinthe, Ecto and Dataloader? Below is the link of the repo. The code does not seem to work. It gives association errors. Thoughts?
Hi @inblack67 can you point to specific code that doesn’t work, or include the error message?
I have been looking for documentation on this subject. For example, how would one go about using dataloader for the following model structure (i.e. has_many through):
schema "people" do field :email, :string field :first_name, :string field :last_name, :string field :username, :string has_many :friendships, Friendship has_many :friends, through: [:friendships, :friend] timestamps() end schema "friendships" do belongs_to :person, Person belongs_to :friend, Person timestamps() end
Can your show the corresponding graphql schema? What have you tried so far?
@benwilson512 You can find the corresponding GraphQL schema here:
I was able to resolve my issue after reading the finer points within the Absinthe GraphQL documentation. My issue was that I wasn’t defining the
context function within