You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into the error described here: #1331 (comment) sometime ago and used the unreleased commit (ref: 3d0823bd71c2ebb94357a5588c723e053de8c66a) to fix my compilation problem, but the problem has returned.
== Compilation error in file lib/sga/frontend_schema.ex ==
** (ArgumentError) could not load module SGA.Pipeline.PublicFieldVisibility due to reason :nofile
(elixir 1.17.2) lib/code.ex:1837: Code.ensure_loaded!/1
(absinthe 1.7.8) lib/absinthe/schema.ex:382: anonymous fn/3 in Absinthe.Schema.apply_modifiers/3
(elixir 1.17.2) lib/enum.ex:2531: Enum."-reduce/3-lists^foldl/2-0-"/3
(absinthe 1.7.8) lib/absinthe/schema.ex:405: Absinthe.Schema.__after_compile__/2
(stdlib 5.2) lists.erl:1594: :lists.foldl/3
Removing _build fixes it at the time, but it has recurred 3 times across 2 different developers in the past few weeks. Here is the pipeline definition and how it is used, in case I'm 'holding it wrong':
public_field_visibility.ex:
defmoduleSGA.Pipeline.PublicFieldVisibilitydoaliasAbsinthe.{Blueprint,Phase,Pipeline}# Add this module to the pipeline of phases# to run on the schemadefpipeline(pipeline)doPipeline.insert_after(pipeline,Phase.Schema.TypeImports,__MODULE__)end# Here's the blueprint of the schema, let's do whatever we want with it.defrun(%Blueprint{}=blueprint,_)doblueprint=update_in(blueprint,[Access.key!(:schema_definitions),Access.all(),Access.key!(:type_definitions),Access.all()],&update_type_def/1){:ok,blueprint}enddefpupdate_type_def(%Absinthe.Type.Object{fields: type_fields}=type_def)dopublic_fields=Absinthe.Type.meta(type_def,:public_fields)||[]public_fields=[:id|public_fields]filtered_fields=filter_fields(public_fields,type_fields)%{type_def|fields: filtered_fields}enddefpupdate_type_def(type_def),do: type_def# we probably want to whitelist certain fields (specifically Relay fields like pageInfo { hasNextPage etc... })defpfilter_fields(public_fields,type_def_fields)doEnum.filter(type_def_fields,&(&1.identifierinpublic_fields))endend
Since originally fixing the problem ancillary things have changed in the codebase, like Elixir version updated to 1.17.2, so I am now using the most recent commit, {:absinthe, github: "absinthe-graphql/absinthe", ref: "d28ebb4fdb16c195a41259ea12552800a695df42", override: true}, but updating absinthe did not make the error go away.
The text was updated successfully, but these errors were encountered:
I ran into the error described here: #1331 (comment) sometime ago and used the unreleased commit (
ref: 3d0823bd71c2ebb94357a5588c723e053de8c66a
) to fix my compilation problem, but the problem has returned.Removing
_build
fixes it at the time, but it has recurred 3 times across 2 different developers in the past few weeks. Here is the pipeline definition and how it is used, in case I'm 'holding it wrong':public_field_visibility.ex:
frontend_schema.ex:
router.ex:
Since originally fixing the problem ancillary things have changed in the codebase, like Elixir version updated to 1.17.2, so I am now using the most recent commit,
{:absinthe, github: "absinthe-graphql/absinthe", ref: "d28ebb4fdb16c195a41259ea12552800a695df42", override: true},
but updating absinthe did not make the error go away.The text was updated successfully, but these errors were encountered: