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

[web] Update Route<Component, Query> TypeScript definition #316

Merged
merged 3 commits into from
Feb 12, 2022

Conversation

koistya
Copy link
Member

@koistya koistya commented Feb 12, 2022

  • [web] Update Route<Component, Query> TypeScript definition
  • Update Yarn to 3.2.0-rc.15; ESLint to 8.9.0

Application Route (example)

  import { graphql } from "relay-runtime";
  import type { Route } from "../core";
- import type { SettingsQueryResponse } from "../queries/SettingsQuery.graphql";
+ import type { SettingsQuery } from "../queries/SettingsQuery.graphql";
  import type Settings from "./Settings";

  export default {
    path: "/settings",
    query: graphql`
      query SettingsQuery {
        me {
          id
          name
          email
        }
      }
    `,
    authorize: true,
    component: () => import(/* webpackChunkName: "settings" */ "./Settings"),
    response: (data) => ({
      title: "Account Settings",
      props: data,
    }),
- } as Route<typeof Settings, SettingsQueryResponse>;
+ } as Route<typeof Settings, SettingsQuery>;

@koistya koistya merged commit f6a525e into main Feb 12, 2022
@koistya koistya deleted the router-types branch February 12, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant