Skip to content

Wpgraphql resover for WoGraphql missing #2447

@pairviewwebmaster

Description

@pairviewwebmaster

I create a relationship using ACF between a custom post type (store) has a product. So the store has products. But keep getting this error when trying to query the related products under the Store.

Abstract type Store_StoreListing_RelateProduct must resolve to an Object type at runtime for field  Store_StoreListing.relateProduct with value \"instance of WPGraphQL\\Model\\Post\", received \"Product\". Either the  Store_StoreListing_RelateProduct type should provide a \"resolveType\" function or each possible type should provide an \"isTypeOf\" function.

Query is

 Store{
    nodes {
      StoreListing{
        fieldGroupName
        relateProduct {
          ... on Product {
            id
            name
          }
        }
      }
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: interfacesRelating to GraphQL Interface Typesdep: acfInvolving Advanced Custom Fields functionalitydep: woocommerceIntegration or compatibility with WooCommercestale?May need to be revalidated due to prolonged inactivitytype: bugIssue that causes incorrect or unexpected behavior

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions