Skip to content

Commit

Permalink
WIP: node query
Browse files Browse the repository at this point in the history
  • Loading branch information
rbino committed Jan 18, 2024
1 parent 43a5194 commit b3540a9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions lib/api/api.ex
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,39 @@ defmodule AshGraphql.Api do
[]
end

# TODO
# Node query makes sense only if we have global IDs
# node_query =
# if relay_ids? do
# [
# %Absinthe.Blueprint.Schema.FieldDefinition{
# arguments: [
# %Absinthe.Blueprint.Schema.InputValueDefinition{
# name: "id",
# identifier: :id,
# type: %Absinthe.Blueprint.TypeReference.NonNull{
# of_type: :id
# },
# description: "The Node unique identifier",
# __reference__: AshGraphql.Resource.ref(env)
# }
# ],
# identifier: :node,
# middleware: [
# {AshGraphql.Graphql.Resolver, :resolve_node}
# ],
# complexity: {AshGraphql.Graphql.Resolver, :query_complexity},
# module: schema,
# name: "Node",
# description: "Retrieves a Node from its global id",
# type: %Absinthe.Blueprint.TypeReference.NonNull{of_type: :node},
# __reference__: AshGraphql.Resource.ref(__ENV__)
# }
# ]
# else
# []
# end

relay_types ++ resource_types
else
resource_types
Expand Down

0 comments on commit b3540a9

Please sign in to comment.