This commit is contained in:
Mayel de Borniol 2021-12-03 13:34:19 +13:00
parent 4c09736673
commit b651020ee7
7 changed files with 37 additions and 17 deletions

View file

@ -185,8 +185,8 @@ js.ext.deps.get:
deps.outdated:
@make mix.remote~"hex.outdated --all"
dep.clean~%:
@make mix~"deps.clean $* --build"
dep.clean:
make --no-print-directory cmd cmd="mix deps.clean $(dep) --build"
dep.clone.local: ## Clone a git dep and use the local version, eg: `make dep.clone.local dep="bonfire_me" repo=https://github.com/bonfire-networks/bonfire_me`
git clone $(repo) $(FORKS_PATH)$(dep) 2> /dev/null || (cd $(FORKS_PATH)$(dep) ; git pull)

View file

@ -157,7 +157,7 @@ config :bonfire_data_identity, Character,
has_one: [inbox: {Inbox, foreign_key: :id}],
has_many: [feed_publishes: {FeedPublish, references: :id, foreign_key: :feed_id}],
has_many: [followers: {Follow, foreign_key: :following_id, references: :id}],
has_many: [followings: {Follow, foreign_key: :follower_id, references: :id}],
has_many: [followed: {Follow, foreign_key: :follower_id, references: :id}],
has_one: [follow_count: {FollowCount, foreign_key: :id}]
config :bonfire_data_identity, Credential,
@ -185,13 +185,13 @@ config :bonfire_data_identity, User,
has_many: [created: {Created, foreign_key: :creator_id}],
has_many: [creations: {[through: [:created, :pointer]]}],
has_many: [posts: {[through: [:created, :post]]}],
has_many: [activities: {Activity, foreign_key: :subject_id, references: :id}],
has_many: [user_activities: {Activity, foreign_key: :subject_id, references: :id}],
has_many: [boosted: {Boost, foreign_key: :booster_id, references: :id}],
has_many: [boost_activities: {[through: [:boosted, :activity]]}],
has_many: [liked: {Like, foreign_key: :liker_id, references: :id}],
has_many: [like_activities: {[through: [:liked, :activity]]}],
has_many: [followers: {Follow, foreign_key: :followed_id, references: :id}],
has_many: [followings: {Follow, foreign_key: :follower_id, references: :id}]
has_many: [followed: {Follow, foreign_key: :follower_id, references: :id}]
# bonfire_data_social

View file

@ -157,7 +157,7 @@ config :bonfire_data_identity, Character,
has_one: [inbox: {Inbox, foreign_key: :id}],
has_many: [feed_publishes: {FeedPublish, references: :id, foreign_key: :feed_id}],
has_many: [followers: {Follow, foreign_key: :following_id, references: :id}],
has_many: [followings: {Follow, foreign_key: :follower_id, references: :id}],
has_many: [followed: {Follow, foreign_key: :follower_id, references: :id}],
has_one: [follow_count: {FollowCount, foreign_key: :id}]
config :bonfire_data_identity, Credential,
@ -185,13 +185,14 @@ config :bonfire_data_identity, User,
has_many: [created: {Created, foreign_key: :creator_id}],
has_many: [creations: {[through: [:created, :pointer]]}],
has_many: [posts: {[through: [:created, :post]]}],
has_many: [activities: {Activity, foreign_key: :subject_id, references: :id}],
has_many: [user_activities: {Activity, foreign_key: :subject_id, references: :id}],
has_many: [user_feed: Activity], # requires custom filtering
has_many: [boosted: {Boost, foreign_key: :booster_id, references: :id}],
has_many: [boost_activities: {[through: [:boosted, :activity]]}],
has_many: [liked: {Like, foreign_key: :liker_id, references: :id}],
has_many: [like_activities: {[through: [:liked, :activity]]}],
has_many: [followers: {Follow, foreign_key: :followed_id, references: :id}],
has_many: [followings: {Follow, foreign_key: :follower_id, references: :id}]
has_many: [followed: {Follow, foreign_key: :follower_id, references: :id}]
# bonfire_data_social

View file

@ -156,7 +156,7 @@ config :bonfire_data_identity, Character,
has_one: [inbox: {Inbox, foreign_key: :id}],
has_many: [feed_publishes: {FeedPublish, references: :id, foreign_key: :feed_id}],
has_many: [followers: {Follow, foreign_key: :following_id, references: :id}],
has_many: [followings: {Follow, foreign_key: :follower_id, references: :id}],
has_many: [followed: {Follow, foreign_key: :follower_id, references: :id}],
has_one: [follow_count: {FollowCount, foreign_key: :id}]
config :bonfire_data_identity, Credential,

View file

@ -156,7 +156,7 @@ config :bonfire_data_identity, Character,
has_one: [inbox: {Inbox, foreign_key: :id}],
has_many: [feed_publishes: {FeedPublish, references: :id, foreign_key: :feed_id}],
has_many: [followers: {Follow, foreign_key: :following_id, references: :id}],
has_many: [followings: {Follow, foreign_key: :follower_id, references: :id}],
has_many: [followed: {Follow, foreign_key: :follower_id, references: :id}],
has_one: [follow_count: {FollowCount, foreign_key: :id}]
config :bonfire_data_identity, Credential,

View file

@ -139,11 +139,28 @@ defmodule Bonfire.GraphQL.Schema do
[]
end
union :any_character do
description("Any type of character (eg. Category, Thread, Geolocation, etc), actor (eg. User/Person), or agent (eg. Organisation)")
# TODO: autogenerate from extensions
# types(SchemaUtils.context_types)
types([
# :community,
# :collection,
:user,
# :organisation,
:category,
:spatial_thing
])
resolve_type(&schema_to_api_type/2)
end
union :any_context do
description("Any type of known object")
# TODO: autogenerate from extensions
# TODO: autogenerate from extensions or pointers
# types(SchemaUtils.context_types)
types([
@ -151,7 +168,7 @@ defmodule Bonfire.GraphQL.Schema do
# :collection,
# :comment,
# :flag,
# :follow,
:follow,
:activity,
:post,
:user,
@ -175,7 +192,9 @@ defmodule Bonfire.GraphQL.Schema do
%Bonfire.Data.Social.Activity{} -> :activity
# %Bonfire.Data.SharedUser{} ->
%Bonfire.Data.Social.Follow{} -> :follow
# %Bonfire.Data.SharedUser{} ->
# :organisation
%Bonfire.Geolocate.Geolocation{} -> :spatial_thing
@ -198,7 +217,7 @@ defmodule Bonfire.GraphQL.Schema do
if recursing != true do
schema_to_api_type(struct(type), true)
else
Logger.warn("API any_context: no API type is defined for schema #{type}")
Logger.error("API any_context: no API type is defined for schema #{type}")
end
_ ->

View file

@ -12,7 +12,7 @@
"bonfire_boundaries": {:git, "https://github.com/bonfire-networks/bonfire_boundaries", "317f30450088f2b040a2e983743d6185d704c458", [branch: "main"]},
"bonfire_breadpub": {:git, "https://github.com/bonfire-networks/bonfire_breadpub", "081af45429cea4f6d15e5c3b7364153b92150aff", [branch: "main"]},
"bonfire_classify": {:git, "https://github.com/bonfire-networks/bonfire_classify", "1d0baba20111f831592b8de35c8c2b3a7b0ca236", [branch: "main"]},
"bonfire_common": {:git, "https://github.com/bonfire-networks/bonfire_common", "c1c8ed892b23040c953e72a3b52f8cb9d09cd90f", [branch: "main"]},
"bonfire_common": {:git, "https://github.com/bonfire-networks/bonfire_common", "623675844571d3b4b2ce01dd609584d3052455ea", [branch: "main"]},
"bonfire_data_access_control": {:git, "https://github.com/bonfire-networks/bonfire_data_access_control", "6db3a7ff966de9b4b13b9d2bed094fc68d440cfa", [branch: "main"]},
"bonfire_data_activity_pub": {:git, "https://github.com/bonfire-networks/bonfire_data_activity_pub", "9e8113bfb1a07a381f911e350f2ad11922679ad9", [branch: "main"]},
"bonfire_data_assort": {:git, "https://github.com/bonfire-networks/bonfire_data_assort", "143c39bc3400bffa2e61d1d98e22e24b7c00d2b1", []},
@ -25,7 +25,7 @@
"bonfire_files": {:git, "https://github.com/bonfire-networks/bonfire_files", "05da65b5053319df64094fbf713b83c09c9bdc87", [branch: "main"]},
"bonfire_geolocate": {:git, "https://github.com/bonfire-networks/bonfire_geolocate", "5be6bc99c920ebc2ddad29e3a2cb503bd4d14a34", [branch: "main"]},
"bonfire_mailer": {:git, "https://github.com/bonfire-networks/bonfire_mailer", "0175c69995a06e02cb59c4edee9414708c90daab", [branch: "main"]},
"bonfire_me": {:git, "https://github.com/bonfire-networks/bonfire_me", "0196147f497ca1615371717e1b44ba76b2f44b65", [branch: "main"]},
"bonfire_me": {:git, "https://github.com/bonfire-networks/bonfire_me", "9675aeaa6ac225a78c03107ef78cf311713e6149", [branch: "main"]},
"bonfire_quantify": {:git, "https://github.com/bonfire-networks/bonfire_quantify", "4feb5e710660491c2a94504c5eab5d40e2219340", [branch: "main"]},
"bonfire_search": {:git, "https://github.com/bonfire-networks/bonfire_search", "ced98627dc5daaa4d26b0c73fdb68953e87b427b", [branch: "main"]},
"bonfire_social": {:git, "https://github.com/bonfire-networks/bonfire_social", "7e5a869500c565ed932b3b84ce392190b14ec3e5", [branch: "main"]},