Graphql support with Unpoly

27 views
Skip to first unread message

Ram

unread,
May 4, 2021, 2:29:18 AM5/4/21
to unpoly
I plan to use unpoly for my GraphQL Implementation.. not sure how to begin with...
I would how to communicate my Graphql API with server sider rendering... 

1. Are there any examples available in unpoly community?
2. Is it possible to use third-party graphql client like (apollo, urql) along with unpoly?
3. support for Graphqul subscription. 
4. http/2 or http/3 support.

These are all some of the questions I have ... it would help me before the adoption. 

Thanks in advance...
Ram

adam.me...@gmail.com

unread,
May 4, 2021, 6:31:38 AM5/4/21
to unpoly
What are the technical reasons you chose to use Unpoly with GraphQL?

They both deal with server-side rendering, but generally Unpoly interacts with HTML and
GraphQL interacts with JSON, making them somewhat incompatible.

You can use up.fetch (and the new API in v2 for up.fetch'ing JSON) to query a GraphQL API,
but that's not unique to Unpoly, as you could use fetch directly.

Understanding your technical reasoning might help provide better guidance. 

Ram

unread,
May 4, 2021, 6:52:39 AM5/4/21
to unpoly

What are the technical reasons you chose to use Unpoly with GraphQL?

I have a server that only supports GraphQL API, no other particular reason, I kind of combining the best of both worlds...  

adam.me...@gmail.com

unread,
May 4, 2021, 11:33:17 AM5/4/21
to unpoly
Does the server render HTML? If it doesn't, you might want to look at something like React or Vue.

I'm not a GraphQL expert so I could be incredibly off base here, but I don't see how Unpoly would fit.

Marcelo Duarte

unread,
May 4, 2021, 1:17:16 PM5/4/21
to unp...@googlegroups.com
If you only have a GraphQL server, and you already decided on using unpoly with server rendered HTML, you will probably need a second backend application interacting with the GraphQL API.

Since securing a GraphQL API is not a trivial thing, this could turn out to be a better option than using a client side rendering framework.

--
You received this message because you are subscribed to the Google Groups "unpoly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unpoly+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unpoly/0d9c0236-ddb4-46d5-bdee-86ef464d345an%40googlegroups.com.


--
Att.,
Marcelo Duarte
Reply all
Reply to author
Forward
0 new messages