Skip to content

Commit

Permalink
feat: connection needed filters
Browse files Browse the repository at this point in the history
  • Loading branch information
pbastia committed Apr 8, 2021
1 parent 41276c2 commit 74fe1ce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ export default createFragmentContainer(AllowableProductsSearchContainer, {
productNaicsCodesByNaicsCodeId(
first: 2147483647
filter: {deletedAt: {isNull: true}}
) {
)
@connection(
key: "AllowableProductsTable_productNaicsCodesByNaicsCodeId"
filters: []
) {
edges {
node {
deletedAt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default createFragmentContainer(AllowableProductsTableComponent, {
)
@connection(
key: "AllowableProductsTable_productNaicsCodesByNaicsCodeId"
filters: []
) {
edges {
node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ const mutation = graphql`
const createProductNaicsCodeMutation = async (
environment: RelayModernEnvironment,
variables: createProductNaicsCodeMutationVariables,
naicsCodeId: string
naicsCodeId: string,
connectionKey: string
) => {
const configs: DeclarativeMutationConfig[] = [
{
type: 'RANGE_ADD',
parentID: naicsCodeId,
connectionInfo: [
{
key: 'AllowableProductsTable_productNaicsCodesByNaicsCodeId',
key: connectionKey,
rangeBehavior: 'append'
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const updateProductNaicsCodeMutation = async (
};

const m = new BaseMutation<updateProductNaicsCodeMutationType>(
'update-product-naics_code-mutation'
'update-product_naics_code-mutation'
);
return m.performMutation(
environment,
Expand Down

0 comments on commit 74fe1ce

Please sign in to comment.