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

Community: Convert real-time poll sample app to hooks [closes #7675] #7694

Closed
wants to merge 4 commits into from

Conversation

andykcom
Copy link
Contributor

Description

The PR updates the Real-time Poll sample app to use Apollo v3, converts the application from class-based components to functional components, and cleans up the code structure. The changes are internal only and do not affect functionality or look of the sample app.

Changelog

  • CHANGELOG.md is updated with user-facing content relevant to this PR. If no changelog is required, then add the no-changelog-required label.

Affected components

  • Community Content

Related Issues

Solution and Design

The old system was written 3 years ago when the implementation of the Apollo library used , , and components to fetch the data. Newer release of Apollo moved to a hooks-based approach.

The new design of the app leverages React hooks for a more modern and readable code.

Steps to test and verify

Manually tested the workflow.

Limitations, known bugs & workarounds

N/A

Server checklist

N/A

Catalog upgrade

Does this PR change Hasura Catalog version?

  • No
  • Yes
    • Updated docs with SQL for downgrading the catalog

Metadata

Does this PR add a new Metadata feature?

  • No
  • Yes
    • Does run_sql auto manages the new metadata through schema diffing?
      • Yes
      • Not required
    • Does run_sql auto manages the definitions of metadata on renaming?
      • Yes
      • Not required
    • Does export_metadata/replace_metadata supports the new metadata added?
      • Yes
      • Not required

GraphQL

  • No new GraphQL schema is generated
  • New GraphQL schema is being generated:
    • New types and typenames are correlated

Breaking changes

  • No Breaking changes

  • There are breaking changes:

    1. Metadata API

      Existing query types:

      • Modify args payload which is not backward compatible
      • Behavioural change of the API
      • Change in response JSON schema
      • Change in error code
    2. GraphQL API

      Schema Generation:

      • Change in any NamedType
      • Change in table field names

      Schema Resolve:-

      • Change in treatment of null value for any input fields
    3. Logging

      • Log JSON schema has changed
      • Log type names have changed

@andykcom andykcom requested a review from a team as a code owner October 17, 2021 17:51
@hasura-bot
Copy link
Contributor

Beep boop! 🤖

Hey @andykcom, thanks for your PR!

One of my human friends will review this PR and get back to you as soon as possible.

Stay awesome! 😎

@CLAassistant
Copy link

CLAassistant commented Oct 17, 2021

CLA assistant check
All committers have signed the CLA.

@andykcom
Copy link
Contributor Author

@praveenweb , can you please add no-changelog-required tag? Thanks!

@netlify
Copy link

netlify bot commented Oct 17, 2021

✔️ Deploy Preview for hasura-docs ready!

🔨 Explore the source changes: ed77611

🔍 Inspect the deploy log: https://app.netlify.com/sites/hasura-docs/deploys/61776e5dbedb21000728a765

😎 Browse the preview: https://deploy-preview-7694--hasura-docs.netlify.app

@mehtavishwa30 mehtavishwa30 changed the title Converts realtime poll sample app to hooks (close #7675) Community: Convert real-time poll sample app to hooks [closes #7675] Oct 25, 2021
@rikinsk
Copy link
Member

rikinsk commented Oct 26, 2021

/changelog ok

@hasura-bot hasura-bot closed this Oct 26, 2021
hasura-bot added a commit that referenced this pull request Oct 26, 2021
GITHUB_PR_NUMBER: 7694
GITHUB_PR_URL: #7694

PR-URL: hasura/graphql-engine-mono#2620
Co-authored-by: andykcom <532952+andykcom@users.noreply.github.com>
GitOrigin-RevId: 428d9a1
@hasura-bot
Copy link
Contributor

Beep boop! 🤖

GIF

Awesome work @andykcom!

Your changes were merged successfully. All of us at Hasura ❤️ what you did.

Thanks again 🤗

@mehtavishwa30
Copy link
Contributor

Hey @andykcom, 👋🏼

Thanks so much for contributing to Hasura through Hacktoberfest 2021! As a token of appreciation, we'd love to send you some swag. Do keep an eye out for an email with the link to the swag form. Do fill it out and your swag will be on its way soon! ❤️

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants