Allow exact search of components via GraphQL

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • Component/s: Global - Search
    • None
    • 1

      Currently, the GraphQL query feature doesn't support exact matches for component names. Having such a feature can be useful when there many components with similar names being returned by the default GraphQL query.

      One workaround is possible using escape quotes for the query:

      query MyQuery {
        compass {
          searchComponents(
            cloudId: "<your_cloud_id>"
            query: {fieldFilters: {filter: {}, name: ""}, query: "\"<your_component_name>\""}
          ) {
            ... on CompassSearchComponentConnection {
              edges {
                node {
                  component {
                    name
                  }
                }
              }
            }
          }
        }
      }
      

      But this breaks for some special cases such as names containing dashes (i.e. "your-component-name"

            Assignee:
            Katie Silver (Inactive)
            Reporter:
            Vinicius (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: