Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ When adding filtering predicates or aggregation functions:
3. **Query Translation**: Implement GraphQL → datastore query translation with unit, integration, and acceptance tests
4. **Documentation**: Add user-facing docs with working examples to `config/site/`

### Verification

After completing a chunk of work, run `script/run_specs` and `script/type_check` to verify correctness across all gems and type signatures.

### Test Strategy

Three layers of testing:
Expand Down Expand Up @@ -186,6 +190,10 @@ Custom gems can be added via `Gemfile-custom` (see `Gemfile-custom.example`), th

## Important Patterns

### Schema Definition

- When referencing derived type names (e.g. filter input types), never hardcode names like `"StringFilterInput"`. Always use `schema_def_state.type_ref("String").as_filter_input.name` (or similar `as_*` methods on type references). Hardcoded names break when schema element names are customized (e.g. camelCase schemas).

### Schema Artifacts
After schema definition changes, always run:
```bash
Expand Down
32 changes: 32 additions & 0 deletions config/schema/artifacts/runtime_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3820,6 +3820,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
DistributionChannelFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
DistributionChannelGroupedBy:
graphql_fields_by_name:
active:
Expand Down Expand Up @@ -4182,6 +4186,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
InventorFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
InventorGroupedBy:
graphql_fields_by_name:
name:
Expand Down Expand Up @@ -5098,6 +5106,8 @@ object_types_by_name:
name: object_without_lookahead
NamedEntityFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
amount_cents2:
name_in_index: amount_cents
created_at2:
Expand Down Expand Up @@ -5422,6 +5432,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
NamedInventorFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
NamedInventorGroupedBy:
graphql_fields_by_name:
name:
Expand Down Expand Up @@ -5630,6 +5644,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
PartFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
PartGroupedBy:
graphql_fields_by_name:
created_at:
Expand Down Expand Up @@ -6195,6 +6213,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
RetailFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
RetailGroupedBy:
graphql_fields_by_name:
active:
Expand Down Expand Up @@ -6506,6 +6528,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
StoreFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
StoreGroupedBy:
graphql_fields_by_name:
active:
Expand Down Expand Up @@ -7540,6 +7566,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
WholesaleFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
WholesaleGroupedBy:
graphql_fields_by_name:
active:
Expand Down Expand Up @@ -8869,6 +8899,8 @@ object_types_by_name:
name: object_without_lookahead
WidgetOrAddressFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
amount_cents2:
name_in_index: amount_cents
created_at2:
Expand Down
72 changes: 72 additions & 0 deletions config/schema/artifacts/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2694,6 +2694,14 @@ Input type used to specify filters on `DistributionChannel` fields.
Will match all documents if passed as an empty object (or as `null`).
"""
input DistributionChannelFilterInput {
"""
Filters `DistributionChannel` records by concrete type. Only concrete type names are valid values —
filtering on an abstract type name will match nothing, since records only have concrete
type names for their `__typename` value.
Analogous to the `__typename` return field.
"""
_typename: StringFilterInput

"""
Used to filter on the `active` field.

Expand Down Expand Up @@ -3968,6 +3976,14 @@ Input type used to specify filters on `Inventor` fields.
Will match all documents if passed as an empty object (or as `null`).
"""
input InventorFilterInput {
"""
Filters `Inventor` records by concrete type. Only concrete type names are valid values —
filtering on an abstract type name will match nothing, since records only have concrete
type names for their `__typename` value.
Analogous to the `__typename` return field.
"""
_typename: StringFilterInput

"""
Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL.

Expand Down Expand Up @@ -6255,6 +6271,14 @@ Input type used to specify filters on `NamedEntity` fields.
Will match all documents if passed as an empty object (or as `null`).
"""
input NamedEntityFilterInput {
"""
Filters `NamedEntity` records by concrete type. Only concrete type names are valid values —
filtering on an abstract type name will match nothing, since records only have concrete
type names for their `__typename` value.
Analogous to the `__typename` return field.
"""
_typename: StringFilterInput

"""
Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL.

Expand Down Expand Up @@ -7636,6 +7660,14 @@ Input type used to specify filters on `NamedInventor` fields.
Will match all documents if passed as an empty object (or as `null`).
"""
input NamedInventorFilterInput {
"""
Filters `NamedInventor` records by concrete type. Only concrete type names are valid values —
filtering on an abstract type name will match nothing, since records only have concrete
type names for their `__typename` value.
Analogous to the `__typename` return field.
"""
_typename: StringFilterInput

"""
Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL.

Expand Down Expand Up @@ -7994,6 +8026,14 @@ Input type used to specify filters on `Part` fields.
Will match all documents if passed as an empty object (or as `null`).
"""
input PartFilterInput {
"""
Filters `Part` records by concrete type. Only concrete type names are valid values —
filtering on an abstract type name will match nothing, since records only have concrete
type names for their `__typename` value.
Analogous to the `__typename` return field.
"""
_typename: StringFilterInput

"""
Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL.

Expand Down Expand Up @@ -11397,6 +11437,14 @@ Input type used to specify filters on `Retail` fields.
Will match all documents if passed as an empty object (or as `null`).
"""
input RetailFilterInput {
"""
Filters `Retail` records by concrete type. Only concrete type names are valid values —
filtering on an abstract type name will match nothing, since records only have concrete
type names for their `__typename` value.
Analogous to the `__typename` return field.
"""
_typename: StringFilterInput

"""
Used to filter on the `active` field.

Expand Down Expand Up @@ -12494,6 +12542,14 @@ Input type used to specify filters on `Store` fields.
Will match all documents if passed as an empty object (or as `null`).
"""
input StoreFilterInput {
"""
Filters `Store` records by concrete type. Only concrete type names are valid values —
filtering on an abstract type name will match nothing, since records only have concrete
type names for their `__typename` value.
Analogous to the `__typename` return field.
"""
_typename: StringFilterInput

"""
Used to filter on the `active` field.

Expand Down Expand Up @@ -15388,6 +15444,14 @@ Input type used to specify filters on `Wholesale` fields.
Will match all documents if passed as an empty object (or as `null`).
"""
input WholesaleFilterInput {
"""
Filters `Wholesale` records by concrete type. Only concrete type names are valid values —
filtering on an abstract type name will match nothing, since records only have concrete
type names for their `__typename` value.
Analogous to the `__typename` return field.
"""
_typename: StringFilterInput

"""
Used to filter on the `active` field.

Expand Down Expand Up @@ -17708,6 +17772,14 @@ Input type used to specify filters on `WidgetOrAddress` fields.
Will match all documents if passed as an empty object (or as `null`).
"""
input WidgetOrAddressFilterInput {
"""
Filters `WidgetOrAddress` records by concrete type. Only concrete type names are valid values —
filtering on an abstract type name will match nothing, since records only have concrete
type names for their `__typename` value.
Analogous to the `__typename` return field.
"""
_typename: StringFilterInput

"""
Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL.

Expand Down
32 changes: 32 additions & 0 deletions config/schema/artifacts_with_apollo/runtime_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3922,6 +3922,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
DistributionChannelFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
DistributionChannelGroupedBy:
graphql_fields_by_name:
active:
Expand Down Expand Up @@ -4284,6 +4288,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
InventorFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
InventorGroupedBy:
graphql_fields_by_name:
name:
Expand Down Expand Up @@ -5221,6 +5229,8 @@ object_types_by_name:
name: object_without_lookahead
NamedEntityFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
amount_cents2:
name_in_index: amount_cents
created_at2:
Expand Down Expand Up @@ -5545,6 +5555,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
NamedInventorFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
NamedInventorGroupedBy:
graphql_fields_by_name:
name:
Expand Down Expand Up @@ -5753,6 +5767,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
PartFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
PartGroupedBy:
graphql_fields_by_name:
created_at:
Expand Down Expand Up @@ -6324,6 +6342,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
RetailFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
RetailGroupedBy:
graphql_fields_by_name:
active:
Expand Down Expand Up @@ -6635,6 +6657,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
StoreFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
StoreGroupedBy:
graphql_fields_by_name:
active:
Expand Down Expand Up @@ -7669,6 +7695,10 @@ object_types_by_name:
node:
resolver:
name: object_without_lookahead
WholesaleFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
WholesaleGroupedBy:
graphql_fields_by_name:
active:
Expand Down Expand Up @@ -8998,6 +9028,8 @@ object_types_by_name:
name: object_without_lookahead
WidgetOrAddressFilterInput:
graphql_fields_by_name:
_typename:
name_in_index: __typename
amount_cents2:
name_in_index: amount_cents
created_at2:
Expand Down
Loading
Loading