edgehog icon indicating copy to clipboard operation
edgehog copied to clipboard

Remove get/list reads and just use the default read

Open rbino opened this issue 1 month ago • 0 comments

This is something we initially did to have different descriptions for the two queries, but now the description can be passed inline, and get? true doesn't really have any effect on GraphQL, so we should just use the default read for both.

Note that the default read paginates by default, so we have to pass paginate_with: nil to the list query until we handle pagination project-wide.

queries do
  get :resource, :read do
    description "blabla"
  end
  
  list :resources, :read do
    description "blablab"
    paginate_with nil
  end
end

# ...
actions do
  defaults [:read]
end

rbino avatar May 21 '24 12:05 rbino