Skip to content

Commit

Permalink
https://github.com/bonfire-networks/bonfire-app/issues/915
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Apr 23, 2024
1 parent 3649a59 commit ecd2b9e
Showing 1 changed file with 41 additions and 43 deletions.
84 changes: 41 additions & 43 deletions lib/hydration.ex
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
if Code.ensure_loaded?(Bonfire.API.GraphQL) do
defmodule Bonfire.Geolocate.GraphQL.Hydration do
alias Bonfire.API.GraphQL.CommonResolver
defmodule Bonfire.Geolocate.GraphQL.Hydration do
alias Bonfire.API.GraphQL.CommonResolver

def hydrate() do
%{
spatial_thing: %{
# FIXME:
# canonical_url: [
# resolve: &CommonsPub.Characters.GraphQL.Resolver.canonical_url_edge/3
# ],
# display_username: [
# resolve: &CommonsPub.Characters.GraphQL.Resolver.display_username_edge/3
# ],
in_scope_of: [
resolve: &CommonResolver.context_edge/3
]
},
geolocation_query: %{
spatial_thing: [
resolve: &Bonfire.Geolocate.GraphQL.geolocation/2
],
spatial_things_pages: [
resolve: &Bonfire.Geolocate.GraphQL.geolocations/2
],
spatial_things: [
resolve: &Bonfire.Geolocate.GraphQL.all_geolocations/2
]
},
geolocation_mutation: %{
create_spatial_thing: [
resolve: &Bonfire.Geolocate.GraphQL.create_geolocation/2
],
update_spatial_thing: [
resolve: &Bonfire.Geolocate.GraphQL.update_geolocation/2
],
delete_spatial_thing: [
resolve: &Bonfire.Geolocate.GraphQL.delete_geolocation/2
]
}
# geo_scope: [
# resolve_type: &CommonResolver.resolve_context_type/2
# ]
def hydrate() do
%{
spatial_thing: %{
# FIXME:
# canonical_url: [
# resolve: &CommonsPub.Characters.GraphQL.Resolver.canonical_url_edge/3
# ],
# display_username: [
# resolve: &CommonsPub.Characters.GraphQL.Resolver.display_username_edge/3
# ],
in_scope_of: [
resolve: &CommonResolver.context_edge/3
]
},
geolocation_query: %{
spatial_thing: [
resolve: &Bonfire.Geolocate.GraphQL.geolocation/2
],
spatial_things_pages: [
resolve: &Bonfire.Geolocate.GraphQL.geolocations/2
],
spatial_things: [
resolve: &Bonfire.Geolocate.GraphQL.all_geolocations/2
]
},
geolocation_mutation: %{
create_spatial_thing: [
resolve: &Bonfire.Geolocate.GraphQL.create_geolocation/2
],
update_spatial_thing: [
resolve: &Bonfire.Geolocate.GraphQL.update_geolocation/2
],
delete_spatial_thing: [
resolve: &Bonfire.Geolocate.GraphQL.delete_geolocation/2
]
}
end
# geo_scope: [
# resolve_type: &CommonResolver.resolve_context_type/2
# ]
}
end
end

0 comments on commit ecd2b9e

Please sign in to comment.