Skip to content

Commit

Permalink
Fix/non blocking error (#1381)
Browse files Browse the repository at this point in the history
* fix: non blocking error handling

* fix: Add  changeset
  • Loading branch information
ErwinOtten authored Apr 5, 2022
1 parent 7ab521d commit 9b3488c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-dolls-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-product': patch
---

Non blocking error handling
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gql, ApolloClient, NormalizedCacheObject , Exact } from '@graphcommerce/graphql'
import { gql, ApolloClient, NormalizedCacheObject, Exact } from '@graphcommerce/graphql'
import { AllFilterInputTypes, FilterTypes } from './filterTypes'

const allFilterInputTypes: AllFilterInputTypes[] = [
Expand Down Expand Up @@ -42,7 +42,7 @@ export async function getFilterTypes(

;(await filterInputTypes).data?.__type.inputFields.forEach(({ name, type }) => {
if (!allFilterInputTypes.includes(type.name))
throw new Error(`filter ${name} with FilterTypeInput ${type.name} not implemented`)
console.warn(`filter ${name} with FilterTypeInput ${type.name} not implemented`)
typeMap[name] = type.name
})

Expand Down

1 comment on commit 9b3488c

@vercel
Copy link

@vercel vercel bot commented on 9b3488c Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.