question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discussion: Modernization

See original GitHub issue

This is merely a rough draft for a foundation of discussion

Design Criteria

Before getting into design details I think it’s worth while to provide a definition of graphiql in order to provide context for this design; graphiql: An in-browser IDE for exploring GraphQL.

This definition means that graphiql can be split into two components: ui and business logic (i.e. http req/resp). The primary use case for graphiql (in my opinion) is for development/testing of a graphql service, which means assuming an offline environment is not too far of a reach.

Now, equipped with the criteria of providing a ui, business logic (http req/resp), and an offline experience, what follows is my proposal for redesign. (Note: the current design does satisfy all of these criteria)

Design Proposal

Web Component

In line with the current design, a web component (built with StencilJS?) will be provided to allow for embedding of graphiql into another project. The exported component need not be a web component, per se, it could still just be a React component, but a web component would be more framework neutral.

One major difference will be that the component must be provided an http client object instead of the fetcher function. A default client will also be exported.

Default Environment

A default graphiql app would be hosted on github pages at https://graphiql.github.io. The main ui of the site will be the graphiql component but combined with a form input field to change the graphql http endpoint. The schema would then be loaded from this endpoint through introspection.

<form>
  Endpoint: <input typ="text" name="endpoint"/>
</form>

<graphiql endpoint=endpoint></graphiql> <!-- Web component -->
<!-- Have a script tag update endpoint value and the web component should rerender itself -->

To support offline development, instead of requiring developers to spin up there own server just to display graphiql, a Service Worker will be registered to cache all assets associated with graphiql.github.io.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
imolorhecommented, Oct 18, 2019

GraphiQL.github.io is not ours: https://github.com/graphiql/graphiql.github.io

I think this is a case that should be potentially reported to Github? Anyone could easily fall for thinking that URL belongs to the graphiql team. Looks like a clear case of impersonation to me.

1reaction
benjiecommented, Jun 5, 2019

GraphiQL.github.io is not ours: https://github.com/graphiql/graphiql.github.io

We’re not planning to move this specific project away from React, but with the v1 rearchitecture overhaul we’re aiming to make GraphiQL even more modular so you can reuse parts of it to build your own web component editor.

Read more comments on GitHub >

github_iconTop Results From Across the Web

a Discussion of Modernization - Webflow
Introduction: Why was there such a vast disparity between China and the West in the modern era? How could China overcome this disparity?...
Read more >
Modernization | Nature, Features, Examples, & Facts | Britannica
modernization, in sociology, the transformation from a traditional, rural, agrarian society to a secular, urban, industrial society.
Read more >
China and Modernization: Past and Present a Discussion - jstor
Riesman discusses it in terms of characterological changes in peoples as a result of responding to new socio-economic and demographic structures in society; ......
Read more >
Modernization Theory - an overview | ScienceDirect Topics
Modernization theory refers to a body of theory that became prominent in the 1950s and 1960s in relation to understanding issues of economic...
Read more >
Discussion on the Modernization of Computer Science and ...
Therefore, this paper also focuses on the analysis and discussion of the modern application of computer science and technology, and the existing ones....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found