I have a schema setup like so:
defmodule DxAppRcWeb.Schema do
use Absinthe.Schema
import_sdl(path: "assets/gql/protected-schema.graphql")
def hydrate(%{identifier: :upsert_organization}, [%{identifier: :mutation} | _]),
do: {:resolve, &DxAppRc.Resolvers.upsert_organization/3}
# Etc...
I want to add a field to the schema, and I want to start using Absinthe’s native schema design tools (and incrementally transition away from my SDL being the Schema’s source of truth)
I tried adding this to the file above:
import_types(DxAppRcWeb.Schema.StaffUpdates)
query do
@desc "Change Staff Case Permissions"
field :change_staff_permission, :clinical_mutation_response do
arg(:input, non_null(:change_staff_permission))
resolve(DxAppRc.Resolvers.change_staff_permission() / 3)
end
end
I received an error that query is not a unique object. Is there a way to append to the query definition in the SDL file?