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

Automate adding issues and PRs to project board #243

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

chrispine
Copy link
Contributor

This introduces automation for adding issues and PRs to an org-wide project board. The goal is to have a clear view into incoming issues/PRs so that we know none can fall through the cracks.

This was first tested in examples-go: connectrpc/examples-go#145

This introduces automation for adding issues and PRs to an org-wide project board. The goal is to have a clear view into incoming issues/PRs so that we know none can fall through the cracks.

This was first tested in examples-go: connectrpc/examples-go#145
@nicksnyder nicksnyder merged commit a04784d into main Nov 14, 2023
5 checks passed
@nicksnyder nicksnyder deleted the cp-project-automation branch November 14, 2023 21:58
@paul-sachs paul-sachs mentioned this pull request Dec 8, 2023
paul-sachs added a commit that referenced this pull request Dec 8, 2023
## What's Changed
* V1 API: Wrapping react-query by @paul-sachs in
#224

## V1 Release 🚀 

Introducing a whole new API for connect-query. This API ties itself more
tightly with the fantastic `@tanstack/react-query` in order to improve
developer experience and reduce bundle size.

At the core of this change is the new `MethodUnaryDescriptor` type,
which is essentially just a self contained description of a service
method. The new code generator just outputs one of these per method and
those are passed to the hooks/methods. This new additional type brings a
huge level of flexibility about how we write additional methods, and
it's trivial to write your own hooks/methods around these simple types.

### Example usage

```tsx
import { useQuery } from "@connectrpc/connect-react-query";
import { say } from "./gen/eliza-ElizaService_connectquery";

...

const { data } = useQuery(say);
```

### Breaking changes

- `use*Query` hooks now return data instead of just options.
- Many `create*` methods have been removed.
- `protoc-gen-connect-query` now outputs very simple method descriptors
instead of a bunch of hooks per method.

### Reasoning

There are a number of reasons we've decided to make this major breaking
change.

1. The API surface is much smaller, leading to less confusion about how
to use each method.
2. Smaller core code size and more modular organization leads to better
tree shaking (since each generated method doesn't come along with a
generated hook).
3. Package names are now explicit about their dependencies, making it
easier to develop other packages based on these packages/generated code.
4. More tightly integrating with `@tanstack/react-query@5` provides
better usage of Suspense versions of the API.
5. New generated code is easier to expand and build your own custom
hooks for.

### Migration

The migration process is easy but manual:

#### Before

```tsx
import { getUserOrganization } from "@apigen/org/alpha/registry/v1alpha1/organization-OrganizationService_connectquery";
import { useQuery } from "@tanstack/react-query";

...

const getUserOrganizationQuery = useQuery({
    ...getUserOrganization.useQuery({
      userId: currentUser?.id,
      organizationId,
    }),
    useErrorBoundary: false,
    enabled: currentUser !== null,
});
```

#### After

```tsx
import { getUserOrganization } from "@apigen/org/alpha/registry/v1alpha1/organization-OrganizationService_connectquery";
import { useQuery } from "@connectrpc/connect-react-query";

...

const getUserOrganizationQuery = useQuery(getUserOrganization, {
      userId: currentUser?.id,
      organizationId,
    },
    {
      useErrorBoundary: false,
      enabled: currentUser !== null
    }
});
```

## New Contributors
* @chrispine made their first contribution in
#243

**Full Changelog**:
v0.6.0...v1.0.0
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.

2 participants