Current section

Files

Jump to
potionx priv templates potion.gen.gql_for_model collection.gql
Raw

priv/templates/potion.gen.gql_for_model/collection.gql

query <%= model_name_graphql_case %>Collection(
$after: String,
$before: String,
$first: Int,
$last: Int,
$filters: <%= model_name %>Filters,
$search: String
) {
<%= model_name_graphql_case %>Collection(
after: $after,
before: $before,
first: $first,
filters: $filters,
last: $last,
search: $search
) {
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
count
countBefore
edges {
node {
__typename
internalId
<%= for field <- graphql_fields do %><%= field %>
<% end %>
}
cursor
}
}
}