Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect pano to GQL #572

Merged
merged 22 commits into from
Aug 4, 2023
Merged

Connect pano to GQL #572

merged 22 commits into from
Aug 4, 2023

Conversation

usirin
Copy link
Member

@usirin usirin commented Jul 30, 2023

This PR connects pano to GQL.

Closes #544
Closes #545
Closes #582
Closes #588
Closes #589
Closes #590

@usirin usirin requested a review from a team as a code owner July 30, 2023 09:41
@usirin usirin requested review from tw4 and csoylu July 30, 2023 09:41
@vercel
Copy link

vercel bot commented Jul 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kampus-gql ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2023 6:12pm
kampus-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2023 6:12pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
kampus-next ⬜️ Ignored (Inspect) Visit Preview Aug 4, 2023 6:12pm
kampus-pasaport ⬜️ Ignored (Inspect) Visit Preview Aug 4, 2023 6:12pm

apps/gql/package.json Outdated Show resolved Hide resolved
Copy link
Member

@rasitds rasitds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

const IS_SERVER = typeof window === typeof undefined;
const CACHE_TTL = 5 * 1000; // 5 seconds, to resolve preloaded results

const HTTP_ENDPOINT = IS_SERVER ? (process.env.NEXT_PUBLIC_GQL_URL as string) : "/gql";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line requires apps using this package to have a rewrite rule configured for /gql url to real graphql url (eg https://gql.dev.kamp.us/graphql)

@usirin
Copy link
Member Author

usirin commented Aug 4, 2023

Merging this to unblock stuff, we can open bug tickets if we see something broken.

@cansirin
Copy link
Contributor

cansirin commented Aug 4, 2023

Merging this to unblock stuff, we can open bug tickets if we see something broken.

Makes sense tbh! Sounds awesome, can't wait to develop all the features with GQL/relay 🤌🏻😍

@usirin usirin merged commit ecc6c6d into dev Aug 4, 2023
2 checks passed
@usirin usirin deleted the pano-gql-connection branch August 4, 2023 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review add this label when your PR is ready for review
Projects
None yet
4 participants