Hướng dẫn sử dụng basics for the GraphQL Search API module

5th May 2022
Table of contents

Search condition could be anything, and it could change the search response's structure. eg. if we use the collapse for the elasticsearch, the returned response could be any structure, I guess that it is difficult to define the graphql for the search response. especially if the index include some dynamic fields, it is not easier to do that in strong type of graphQL.

I think that the response structure is known by the client who send the query or the business logic service, they can define the field for the graphql, they can transform the response from search engine. and the search engine should not havve any business logic, it have no idea about the api consumer , no idean about the business logic, so just return the JSON is fine or include a little fixed field for the node of the relayconnection.


Add new comment

Image CAPTCHA
Enter the characters shown in the image.

Related Articles

There’s no denying that GraphQL is the latest addition for API development. For front end frameworks many GraphQL clients are available and Apollo

However, there is one case that the Graphql module does not cover: building a Graphql schema for data that is not represented as a Drupal entity.

Over the past decade, REST has become the standard (yet a fuzzy one) for designing web APIs

The same route handler function is called in REST whereas in GraphQL query can be called to form nested response with multiple resources.

This session will introduce GraphQL queries and demonstrate the advantages of changing the Drupal push model to a pull model by letting the template define its data requirements