I've been thinking about client-server interactions in the . isn't widely used, and most clients rely on Mastodon-compatible APIs instead.

What if we created a new standardized API based on GraphQL + Relay for client-server communication, while keeping ActivityPub for server-to-server federation?

The Mastodon-compatible API lacks formal schema definitions for code generation and type checking, which hurts developer productivity. And ActivityPub C2S is honestly too cumbersome to use directly from client apps.

would give us type safety, efficient data fetching (only get what you need), and the ability to evolve the API without breaking clients. 's features for pagination, caching, and optimistic updates seem perfect for social apps.

Would this be valuable to our community? What challenges do you see? How might we handle backward compatibility? And should this be formalized as an FEP?

Curious what others think about this approach.

@hongminhee洪 民憙 (Hong Minhee) I think it goes beyond that: if C2S was actually useful for building applications & didn't require heavy processing on the client, then it'd likely be more used.

But it doesn't define like "give me a chronological feed of all incoming posts" or "give me a chronological feed of all my notifications" or "give me all my follow requests that I haven't accepted or rejected"

Those are application concerns, which to implement with current C2S would mean fetching the entire inbox and/or outbox collection and filtering/reducing that dataset.

The consequence is that you inherently end up with either a backend for frontend (custom API / AppView) or a very heavy and potentially slow client application.

0

If you have a fediverse account, you can quote this note from your own instance. Search https://hachyderm.io/users/thisismissem/statuses/114504374999045609 on your instance and quote it. (Note that quoting is not supported in Mastodon.)