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.
First repository -- getting used to the site
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.
comment created time in 19 days
PR opened absinthe-graphql/absinthe_tutorial
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.
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.
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
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-yasirissue 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.
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
jotaviobiondoissue 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.
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
commit sha 68931ab32ea153cf09e1d0150a12991f01046223
bump asdf elixir to 1.10 bumped elixir to match elixir fixed in mix.exs since #ffaaf811
commit sha 19345b4b9dd349b99f8338c4b3ae902a5b035995
Merge pull request #123 from ottohenrique/update-tools-version bump asdf elixir to 1.10
push time in 3 months
PR merged absinthe-graphql/dataloader
bumped to match elixir fixed in mix.exs since #ffaaf811
pr closed time in 3 months
pull request commentabsinthe-graphql/dataloader
Thanks!
comment created time in 3 months
PR opened absinthe-graphql/dataloader
bumped elixir to match elixir fixed in mix.exs since #ffaaf811
pr created time in 3 months
issue commentabsinthe-graphql/dataloader
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.
comment created time in 3 months
issue commentabsinthe-graphql/dataloader
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 ?
comment created time in 3 months
issue commentabsinthe-graphql/dataloader
@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?
comment created time in 3 months
PR merged absinthe-graphql/dataloader
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
pr closed time in 3 months
push eventabsinthe-graphql/dataloader
commit sha 0cbaf9c7e0ca54e097180c7d0c5ed26cae8312a7
Update README
commit sha 54353bdc7fcbc0d7380033eac76b5baddccca3e8
Merge pull request #122 from dolfinus/update_readme Update README
push time in 3 months
pull request commentabsinthe-graphql/dataloader
Great stuff thank you!
comment created time in 3 months
pull request commentabsinthe-graphql/dataloader
Add support for where and join_where in many_to_many and has_many associations
Thank you all!
comment created time in 3 months
push eventabsinthe-graphql/dataloader
commit sha d7ee7c0a155059ee22f65c38b7cf09f83046f815
Create failing test using join_where
commit sha d20096ca7a4baf8cb491abf4ccc84d20db12358e
Fix simple join_where case
commit sha 32fd43c8914ebc83c1c7a22c55b15196e01df89d
Use ecto to add where and join_where clauses
commit sha 8a6ca03856c9d3acc62f5219769339bd24c1632a
Add a test for has_many through many_to_many
commit sha 31372b65f9537359bf73391ea4eeba81e5787b68
Add test for has_many through m2m - w/ where
commit sha 4b5ebc4258c4c1da077f7dcf01bf5580450f1d88
Add test for has_many through m2m - w/ join/-where
commit sha 5b164dcae1003d93fdb36d620b1e25433e32368a
Fix compiler warning
commit sha bd4e79a8f5f05044b1fb0d92814b1f06896235fc
Fix typo
commit sha ee49316029286e9bdb733a9d7f927cfa6859ffee
Add tests for untested many_to_many loader
commit sha 5d70e84679734d50408fc8a3081dd52fb6f2ea13
Handle where and join_where on deep many_to_many
commit sha 881e88a3ef8e0c4cbfe87f8588e0779fe3725937
Handle where and join_where on sandwiched many_to_many
commit sha 631f19f9033e44545a26d8b8b0e7d185469a8286
Fix bind
commit sha 575b84bc24b06d5edf6633f5fded1b18ea8d876f
Add test for where clause in has_many assoc
commit sha f52daa2336cf9f78eb1edfb89e4c31bc144f5d92
Add test for has_many through in first position
commit sha 35bbe2fc2e823f3880aa23f768cddeaa29957fbf
Add missing test cases for has_many
commit sha 252d0d7dece2b5465a48bae583c75694b180c90a
Improve test cases
commit sha a78ea35868b442a2157a3a5b73c53ac78f5a79d1
Improve tests and fix bug
commit sha d345d6b8873ea0507a876ce0b99608a977eaadb1
Remove has association handling
commit sha 1b330ae2d32957c456add4f14a842d901a7f57d7
Add test for filtered belongs_to assoc
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
push time in 3 months
PR merged absinthe-graphql/dataloader
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.
pr closed time in 3 months
PR opened absinthe-graphql/dataloader
I forgot to update README.md in https://github.com/absinthe-graphql/dataloader/pull/121.
pr created time in 3 months