# Search UI with GraphQL Server

**URL:** <https://discuss.elastic.co/t/search-ui-with-graphql-server/319661>\
**Category:** Elastic Search\
**Tags:** elastic-site-search\
**Created:** [November 23, 2022, 12:56pm UTC](https://discuss.elastic.co/t/search-ui-with-graphql-server/319661 "2022-11-23T12:56:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![iany](https://avatars.discourse-cdn.com/v4/letter/i/6a8cbe/32.png) [@iany](https://discuss.elastic.co/u/iany)\
**Post date:** [November 23, 2022, 12:56pm UTC](https://discuss.elastic.co/t/search-ui-with-graphql-server/319661/1 "2022-11-23T12:56:31Z")

</div>

I see that Search UI is meant to work with "any backend". Does this include a standard GraphQL server?

Also, can someone confirm the exact benefits over a search framework such as Search UI vs a UI library such as MUI or PrimeReact? They also contain form components which can be used for frontend search. Is it the more reactive features as a whole?

---

<div class="post-metadata">

**Author:** ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)\
**Post date:** [November 23, 2022, 6:51pm UTC](https://discuss.elastic.co/t/search-ui-with-graphql-server/319661/2 "2022-11-23T18:51:50Z")

</div>

Hey @iany

You can build a custom connector to integrate a backend. Some documentation here to help you get started [Building a custom connector | Elastic docs](https://docs.elastic.co/search-ui/guides/building-a-custom-connector)

The benefits are:

- out of the box components that deal with common search use-case features like Search Input, autocomplete, facets, sorting and pagination that you would need to build on your own with MUI or primeReact
- Search UI also maintains the state of the search to the components (what is the search term, filters, sorting, page). Something you would need to build on your own too

Hope this helps!  
Joe

---

<div class="post-metadata">

**Author:** ![iany](https://avatars.discourse-cdn.com/v4/letter/i/6a8cbe/32.png) [@iany](https://discuss.elastic.co/u/iany)\
**Post date:** [November 24, 2022, 3:16pm UTC](https://discuss.elastic.co/t/search-ui-with-graphql-server/319661/3 "2022-11-24T15:16:53Z")

</div>

Thanks for the helpful information @joemcelroy.

If I had a search-based site but the search was fairly simple and the dataset fairly small would Search UI be overkill? The search fields are main select boxes (and multi-selects), radio buttons, and requires a button click to submit the search. It has a results pane and the results need to paginate with the URL bar updated to reflect the search options. I'm trying to determine how much I'd save by using a search framework over an API vs a UI framework in this case.

Thanks

---

<div class="post-metadata">

**Author:** ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)\
**Post date:** [November 28, 2022, 12:33pm UTC](https://discuss.elastic.co/t/search-ui-with-graphql-server/319661/4 "2022-11-28T12:33:36Z")

</div>

Depends on your frontend experience but I would say it does sound like an overkill solution to use Search UI for your needs.

---

<div class="post-metadata">

**Author:** ![iany](https://avatars.discourse-cdn.com/v4/letter/i/6a8cbe/32.png) [@iany](https://discuss.elastic.co/u/iany)\
**Post date:** [November 29, 2022, 10:42am UTC](https://discuss.elastic.co/t/search-ui-with-graphql-server/319661/5 "2022-11-29T10:42:26Z")

</div>

Thanks for the insight @joemcelroy. I think then I'll start with raw components and see if I can build the link-up functionality myself.

I take it that the benefits of using Search UI would mostly come down to the complexity of the search controls on the site rather than the size of the dataset?

---

<div class="post-metadata">

**Author:** ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)\
**Post date:** [November 29, 2022, 12:00pm UTC](https://discuss.elastic.co/t/search-ui-with-graphql-server/319661/6 "2022-11-29T12:00:50Z")

</div>

Whilst Search UI has connector support, Search UI is still coupled to App Search paradigms. I would be surprised if you didn't encounter issues as you build your own connector on a very different API.

> [@iany](#):
>
> I take it that the benefits of using Search UI would mostly come down to the complexity of the search controls on the site rather than the size of the dataset?

Yes I would say that is true also. If you just have a search input and results list then search ui isn't necessarily needed 🙂

---

<div class="post-metadata">

**Author:** ![iany](https://avatars.discourse-cdn.com/v4/letter/i/6a8cbe/32.png) [@iany](https://discuss.elastic.co/u/iany)\
**Post date:** [December 1, 2022, 2:08pm UTC](https://discuss.elastic.co/t/search-ui-with-graphql-server/319661/7 "2022-12-01T14:08:10Z")

</div>

By build it myself, I mean just regular querying of an API and handling the response rather than build a connector for Search UI. Like you say, for simple search I think Search UI may be more than I need and would present its own challenges in integrating.

Thanks for the advice. Much appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 29, 2022, 2:08pm UTC](https://discuss.elastic.co/t/search-ui-with-graphql-server/319661/8 "2022-12-29T14:08:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
