profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/billylanchantin/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

billylanchantin/elixir-ls 0

A frontend-independent IDE "smartness" server for Elixir. Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol"

billylanchantin/graphql-spec 0

GraphQL is a query language and execution engine tied to any backend service.

billylanchantin/hello-world 0

First repository -- getting used to the site

billylanchantin/nx 0

Numerical Elixir and Elixir XLA bindings for CPU/GPU/TPU

billylanchantin/vscode-elixir-ls 0

Elixir language support and debugger for VS Code, powered by ElixirLS.

pull request commentabsinthe-graphql/absinthe_tutorial

Update `MixProject` dependencies list [:absinthe]

If this is helpful, I’m happy to make the associated changes in the absinthe tutorial. They’d be almost entirely formatting changes, and very simple to make.

jbcaprell

comment created time in 19 days

PR opened absinthe-graphql/absinthe_tutorial

Update `MixProject` dependencies list [:absinthe]

In practice, this builds the tutorial as an absinthe 1.6 project upon a fresh Phoenix 1.5.9 project generation, and formats the project with mix format. All the queries listed in the absinthe tutorial resolve as they ever did.

+397 -509

0 comment

40 changed files

pr created time in 19 days

issue commentabsinthe-graphql/dataloader

Return response fields based on the context

You need to be patient. It doesn't help that your question contains lots of code sketches that aren't real Elixir code. If you make things more concrete and real it helpful to people.

iteron-yasir

comment created time in 20 days

issue commentabsinthe-graphql/dataloader

Return response fields based on the context

@benwilson512 I've already asked same question in elixirforum https://elixirforum.com/t/return-response-fields-based-on-the-context-using-dataloader/40162. But, I didn't get any solution. That's why I asked here. Can you help me with this

iteron-yasir

comment created time in 21 days

issue closedabsinthe-graphql/dataloader

Return response fields based on the context

Need to return response based on the context.

This is my schema.ex

object(:user) do
    field :name, :string
    field :dob, :string
    field :test_1, dataloader(Repo)
    field :test_2, dataloader(Repo)
    field :test_3, dataloader(Repo)
    field :test_4, dataloader(Repo)
    field :test_5, dataloader(Repo)
end

def plugins do
    [Absinthe.Middleware.Dataloader | Absinthe.Plugin.defaults()]
  end

  def context(ctx) do
    loader =
      Dataloader.new()
      |> Dataloader.add_source(Repo, Dataloader.Ecto.new(Repo))
  
    Map.put(ctx, :loader, loader)
end

If the get_user API was hit by logged in user(By context, I was validating that). I will to return all the fields. The dataloader will do loading the associations job for me.

%{
    name: "some name", 
    dob: "some dob", 
    test_1:  "some_test_1", 
    test_2: "some_test_2",
    test_3: "some_test_3",
    test_4: "some_test_4",
    test_5: "some_test_5"
}

If the same get_user API was hit by not logged user(Without token). I only want to return the “name” field from the backend!
%{
    name: "some name", 
    dob: nil, 
    test_1:  nil, 
    test_2: nil,
    test_3: nil,
    test_4: nil,
    test_5: nil
}

How can i achieve this with dataloader?. Dataloader try to load all the association every time(If that particular field was passed from the frontend).

closed time in 21 days

iteron-yasir

issue commentabsinthe-graphql/dataloader

Return response fields based on the context

Hi @iteron-yasir. Please use the Elixir forums or slack for questions / help. The issue tracker is for issues and bugs only.

iteron-yasir

comment created time in 21 days

issue openedabsinthe-graphql/dataloader

Return fields based on the context using dataloader

Need to return response based on the context.

This is my schema.ex

object(:user) do
    field :name, :string
    field :dob, :string
    field :test_1, dataloader(Repo)
    field :test_2, dataloader(Repo)
    field :test_3, dataloader(Repo)
    field :test_4, dataloader(Repo)
    field :test_5, dataloader(Repo)
end

def plugins do
    [Absinthe.Middleware.Dataloader | Absinthe.Plugin.defaults()]
  end

  def context(ctx) do
    loader =
      Dataloader.new()
      |> Dataloader.add_source(Repo, Dataloader.Ecto.new(Repo))
  
    Map.put(ctx, :loader, loader)
end

If the get_user API was hit by logged in user(By context, I was validating that). I will to return all the fields. The dataloader will do loading the associations job for me.

%{
    name: "some name", 
    dob: "some dob", 
    test_1:  "some_test_1", 
    test_2: "some_test_2",
    test_3: "some_test_3",
    test_4: "some_test_4",
    test_5: "some_test_5"
}

If the same get_user API was hit by not logged user(Without token). I only want to return the “name” field from the backend!
%{
    name: "some name", 
    dob: nil, 
    test_1:  nil, 
    test_2: nil,
    test_3: nil,
    test_4: nil,
    test_5: nil
}

How can i achieve this with dataloader?. Dataloader try to load all the association every time(If that particular field was passed from the frontend).

created time in 21 days

issue closedabsinthe-graphql/dataloader

Badmatch error when child have limit and offset and parent have composite primary keys

When we have a limit and offset in a child queryable of a parent that have composite primary keys, we get a badmatch exception because of this: https://github.com/absinthe-graphql/dataloader/blob/19345b4b9dd349b99f8338c4b3ae902a5b035995/lib/dataloader/ecto.ex#L688

I'm happy to help with a PR, I'm just no sure what is the best way to use the primary keys in the where clause below to get the results:

https://github.com/absinthe-graphql/dataloader/blob/19345b4b9dd349b99f8338c4b3ae902a5b035995/lib/dataloader/ecto.ex#L706

Any ideas?

closed time in 2 months

jotaviobiondo

issue commentabsinthe-graphql/dataloader

Badmatch error when child have limit and offset and parent have composite primary keys

Hey @jotaviobiondo. Unfortunately I'm not sure about the best way to support composite keys, it is intentionally not supported yet within Dataloader. You are welcome to contribute this feature, but it is not on the roadmap at this time.

jotaviobiondo

comment created time in 2 months

issue openedabsinthe-graphql/dataloader

Badmatch error when child have limit and offset and parent have composite primary keys

When we have a limit and offset in a child queryable of a parent that have composite primary keys, we get a badmatch exception because of this: https://github.com/absinthe-graphql/dataloader/blob/19345b4b9dd349b99f8338c4b3ae902a5b035995/lib/dataloader/ecto.ex#L688

I'm happy to help with a PR, I'm just no sure what is the best way to use the primary keys in the where clause to get the results

created time in 3 months

push eventabsinthe-graphql/dataloader

Otto Henrique

commit sha 68931ab32ea153cf09e1d0150a12991f01046223

bump asdf elixir to 1.10 bumped elixir to match elixir fixed in mix.exs since #ffaaf811

view details

Ben Wilson

commit sha 19345b4b9dd349b99f8338c4b3ae902a5b035995

Merge pull request #123 from ottohenrique/update-tools-version bump asdf elixir to 1.10

view details

push time in 3 months

PR merged absinthe-graphql/dataloader

bump asdf elixir to 1.10

bumped to match elixir fixed in mix.exs since #ffaaf811

+1 -1

1 comment

1 changed file

ottohenrique

pr closed time in 3 months

pull request commentabsinthe-graphql/dataloader

bump asdf elixir to 1.10

Thanks!

ottohenrique

comment created time in 3 months

PR opened absinthe-graphql/dataloader

bump asdf elixir to 1.10

bumped elixir to match elixir fixed in mix.exs since #ffaaf811

+1 -1

0 comment

1 changed file

pr created time in 3 months

issue commentabsinthe-graphql/dataloader

Allow full ecto functionality

Hi @tlvenn I don't have a concrete issue. I'm evaluating implementing dataloader on a project and was curious about usage from context functions and more complex authorization scenarios. Ben and Jaap mentioned those here, so was curious of their take today and what patterns they're using for the concepts raised in this issue.

jfrolich

comment created time in 3 months

issue commentabsinthe-graphql/dataloader

Allow full ecto functionality

Hi @eprothro , this is a pretty old topic, what kind of issues are you trying to solve that the current Dataloader does not currently support ?

jfrolich

comment created time in 3 months

issue commentabsinthe-graphql/dataloader

Allow full ecto functionality

@benwilson512 do you have thoughts on these kind of these kinds of loading issues in 2021? Is there a good answer to this with the current iterations of Absinthe / Dataloader?

jfrolich

comment created time in 3 months

PR merged absinthe-graphql/dataloader

Update README

I forgot to update README.md in https://github.com/absinthe-graphql/dataloader/pull/121. Also let's sync README files with other projects, e.g. https://github.com/absinthe-graphql/absinthe

+136 -14

1 comment

3 changed files

dolfinus

pr closed time in 3 months

push eventabsinthe-graphql/dataloader

dolfinus

commit sha 0cbaf9c7e0ca54e097180c7d0c5ed26cae8312a7

Update README

view details

Ben Wilson

commit sha 54353bdc7fcbc0d7380033eac76b5baddccca3e8

Merge pull request #122 from dolfinus/update_readme Update README

view details

push time in 3 months

pull request commentabsinthe-graphql/dataloader

Update README

Great stuff thank you!

dolfinus

comment created time in 3 months

push eventabsinthe-graphql/dataloader

Jonas Adler

commit sha d7ee7c0a155059ee22f65c38b7cf09f83046f815

Create failing test using join_where

view details

Jonas Adler

commit sha d20096ca7a4baf8cb491abf4ccc84d20db12358e

Fix simple join_where case

view details

Jonas Adler

commit sha 32fd43c8914ebc83c1c7a22c55b15196e01df89d

Use ecto to add where and join_where clauses

view details

Jonas Adler

commit sha 8a6ca03856c9d3acc62f5219769339bd24c1632a

Add a test for has_many through many_to_many

view details

Andreas Follmann

commit sha 31372b65f9537359bf73391ea4eeba81e5787b68

Add test for has_many through m2m - w/ where

view details

Andreas Follmann

commit sha 4b5ebc4258c4c1da077f7dcf01bf5580450f1d88

Add test for has_many through m2m - w/ join/-where

view details

Jonas Adler

commit sha 5b164dcae1003d93fdb36d620b1e25433e32368a

Fix compiler warning

view details

Jonas Adler

commit sha bd4e79a8f5f05044b1fb0d92814b1f06896235fc

Fix typo

view details

Jonas Adler

commit sha ee49316029286e9bdb733a9d7f927cfa6859ffee

Add tests for untested many_to_many loader

view details

Jonas Adler

commit sha 5d70e84679734d50408fc8a3081dd52fb6f2ea13

Handle where and join_where on deep many_to_many

view details

Jonas Adler

commit sha 881e88a3ef8e0c4cbfe87f8588e0779fe3725937

Handle where and join_where on sandwiched many_to_many

view details

Jonas Adler

commit sha 631f19f9033e44545a26d8b8b0e7d185469a8286

Fix bind

view details

Jonas Adler

commit sha 575b84bc24b06d5edf6633f5fded1b18ea8d876f

Add test for where clause in has_many assoc

view details

Jonas Adler

commit sha f52daa2336cf9f78eb1edfb89e4c31bc144f5d92

Add test for has_many through in first position

view details

Jonas Adler

commit sha 35bbe2fc2e823f3880aa23f768cddeaa29957fbf

Add missing test cases for has_many

view details

Jonas Adler

commit sha 252d0d7dece2b5465a48bae583c75694b180c90a

Improve test cases

view details

Jonas Adler

commit sha a78ea35868b442a2157a3a5b73c53ac78f5a79d1

Improve tests and fix bug

view details

Jonas Adler

commit sha d345d6b8873ea0507a876ce0b99608a977eaadb1

Remove has association handling

view details

Jonas Adler

commit sha 1b330ae2d32957c456add4f14a842d901a7f57d7

Add test for filtered belongs_to assoc

view details

Ben Wilson

commit sha 7b056e7f81a4c49206fc5e08a37abaeb25e9639a

Merge pull request #119 from trsc/support_assoc_where Add support for where and join_where in many_to_many and has_many associations

view details

push time in 3 months

PR merged absinthe-graphql/dataloader

Add support for where and join_where in many_to_many and has_many associations

We're using dataloader with a schema that has where and join_where clauses in many-to-many relationships.

Before this, these clauses where ignored.

+869 -27

8 comments

13 changed files

jadlr

pr closed time in 3 months

PR opened absinthe-graphql/dataloader

Update README

I forgot to update README.md in https://github.com/absinthe-graphql/dataloader/pull/121.

+2 -2

0 comment

1 changed file

pr created time in 3 months