diff --git a/packages/gatsby-admin/src/components/providers.tsx b/packages/gatsby-admin/src/components/providers.tsx index 2a312ee65182e..5ce872959cfb5 100644 --- a/packages/gatsby-admin/src/components/providers.tsx +++ b/packages/gatsby-admin/src/components/providers.tsx @@ -2,6 +2,7 @@ import React from "react" import { Provider, Client } from "urql" import { ThemeProvider, getTheme } from "gatsby-interface" import { ThemeProvider as StrictUIProvider } from "strict-ui" +import { Spinner } from "theme-ui" import { createUrqlClient } from "../urql-client" const baseTheme = getTheme() @@ -49,10 +50,15 @@ const GraphQLProvider: React.FC<{}> = ({ children }) => { }) }, []) - if (status === `loading`) return

Loading...

+ if (status === `loading`) return if (client === null) - return

It looks like no develop process is running.

+ return ( +

+ Please start gatsby develop to show the data about your + site. +

+ ) return {children} } diff --git a/packages/gatsby-admin/src/pages/index.tsx b/packages/gatsby-admin/src/pages/index.tsx index bd349610565e4..b4011fc64d84c 100644 --- a/packages/gatsby-admin/src/pages/index.tsx +++ b/packages/gatsby-admin/src/pages/index.tsx @@ -108,7 +108,14 @@ const Index: React.FC<{}> = () => { if (fetching) return - if (error) return

Oops something went wrong.

+ if (error) { + const errMsg = + (error.networkError && error.networkError.message) || + (Array.isArray(error.graphQLErrors) && + error.graphQLErrors.map(e => e.message).join(` | `)) + + return

Error: {errMsg}

+ } return (