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

fix: ignore inaccessible field argument for DEFAULT_VALUE_USES_INACCESSIBLE rule #39

Merged
merged 3 commits into from
Jan 8, 2024

Conversation

n1ru4l
Copy link
Member

@n1ru4l n1ru4l commented Jan 8, 2024

Ignore inaccessible field arguments within the DEFAULT_VALUE_USES_INACCESSIBLE rule.

Fixes an issue where an inaccessible field argument uses a default value that is inaccessible would
cause a false error.

type User @key(fields: "id") {
  id: ID
  friends(type: FriendType = FAMILY @inaccessible): [User!]!
}

enum FriendType {
  FAMILY @inaccessible
  FRIEND
}

Copy link
Contributor

github-actions bot commented Jan 8, 2024

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@theguild/federation-composition 0.7.1-alpha-20240108092712-235efa2 npm ↗︎ unpkg ↗︎

@kamilkisiela kamilkisiela merged commit e77eb2c into main Jan 8, 2024
4 checks passed
@kamilkisiela kamilkisiela deleted the fix-default-value-uses-inaccessible-check-type branch January 8, 2024 13:03
n1ru4l pushed a commit that referenced this pull request Jan 22, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @theguild/[email protected]

### Patch Changes

-   [#36](#36)

[`fdba937`](fdba937)
Thanks [@kamilkisiela](https://github.com/kamilkisiela)! - Visit every
field in provides and
    requires directives

-   [#36](#36)

[`fdba937`](fdba937)
Thanks [@kamilkisiela](https://github.com/kamilkisiela)! - Fix
unnecessary
join\_\_field(override:) on Query fields when it points to non-existing
subgraph

-   [#36](#36)

[`fdba937`](fdba937)
Thanks [@kamilkisiela](https://github.com/kamilkisiela)! - Deduplicate
composed directives

-   [#39](#39)

[`e77eb2c`](e77eb2c)
Thanks [@n1ru4l](https://github.com/n1ru4l)! - Ignore inaccessible field
arguments within the
    `DEFAULT_VALUE_USES_INACCESSIBLE` rule.

Fixes an issue where an inaccessible field argument uses a default value
that is inaccessible
    would cause a false error.

    ```graphql
    type User @key(fields: "id") {
      id: ID
      friends(type: FriendType = FAMILY @inaccessible): [User!]!
    }

    enum FriendType {
      FAMILY @inaccessible
      FRIEND
    }
    ```

-   [#36](#36)

[`fdba937`](fdba937)
Thanks [@kamilkisiela](https://github.com/kamilkisiela)! - Remove
duplicated link spec definitions

-   [#36](#36)

[`fdba937`](fdba937)
Thanks [@kamilkisiela](https://github.com/kamilkisiela)! - Drop unused
fields marked with
    @external only in a single type in Fed v1

-
[`220dfc0`](220dfc0)
Thanks [@kamilkisiela](https://github.com/kamilkisiela)! - Fix missing
usedOverridden on
    non-external key field

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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