├── .eslintrc.js ├── .gitignore ├── README.md ├── babel.config.js ├── jest.config.js ├── next.config.js ├── package.json ├── pages ├── _app.js ├── _document.js ├── api │ └── graphql.js ├── index.js ├── local-form.js ├── mutations │ └── range-add.js ├── polling.js └── ssr.js ├── schema.graphql ├── scripts └── jest │ ├── custom-transformer.js │ ├── setEnvVars.js │ └── setupTests.js └── src ├── Homepage ├── __generated__ │ └── HomepageQuery.graphql.js ├── index.js └── locations │ ├── Location.js │ ├── LocationsList.js │ ├── LocationsPaginated.js │ ├── LocationsPaginatedBidirectional.js │ ├── LocationsPaginatedRefetch.js │ ├── __generated__ │ ├── Location.graphql.js │ ├── LocationsPaginated.graphql.js │ ├── LocationsPaginatedBidirectional.graphql.js │ ├── LocationsPaginatedBidirectionalRefetchQuery.graphql.js │ ├── LocationsPaginatedRefetch.graphql.js │ ├── LocationsPaginatedRefetchQuery.graphql.js │ └── LocationsPaginatedRefetchRefetchQuery.graphql.js │ └── __tests__ │ ├── LocationsPaginatedRefetch.test.js │ └── __generated__ │ └── LocationsPaginatedRefetchTestQuery.graphql.js ├── LocalForm ├── __generated__ │ └── LocalFormQuery.graphql.js └── index.js ├── Polling ├── __generated__ │ └── PollingQuery.graphql.js └── index.js ├── SSRLocations ├── LocationListItem.js ├── LocationsList.js ├── LocationsQuery.js └── __generated__ │ ├── LocationListItem.graphql.js │ ├── LocationsList.graphql.js │ └── LocationsQuery.graphql.js ├── SSRQueryRenderer.js ├── components ├── Navbar.js ├── Select.js └── TextInput.js ├── createRelayEnvironment.js ├── graphql ├── RootMutation.js ├── RootQuery.js ├── Schema.js ├── currency │ ├── queries │ │ └── Currency.js │ └── types │ │ └── output │ │ └── Currency.js ├── locations │ ├── datasets │ │ └── locations.json │ ├── locations.js │ ├── mutations │ │ ├── AddLocation.js │ │ └── __tests__ │ │ │ ├── __fixtures__ │ │ │ ├── addLocation.graphql │ │ │ └── addLocationError.graphql │ │ │ ├── __snapshots__ │ │ │ └── mutation.test.js.snap │ │ │ └── mutation.test.js │ ├── queries │ │ ├── Locations.js │ │ └── __tests__ │ │ │ ├── __fixtures__ │ │ │ └── locations.graphql │ │ │ ├── __snapshots__ │ │ │ └── queries.test.js.snap │ │ │ └── queries.test.js │ └── types │ │ ├── input │ │ └── AddLocationInput.js │ │ └── output │ │ ├── AddLocationError.js │ │ ├── AddLocationOrError.js │ │ ├── AddLocationResponse.js │ │ ├── Location.js │ │ ├── LocationArea.js │ │ └── LocationConnection.js ├── services │ └── executeTestQuery.js └── types │ └── Error.js ├── mutations ├── LocationsList.js ├── RangeAdd │ ├── LocationsForm.js │ ├── RangeAdd.js │ ├── __generated__ │ │ └── LocationsFormMutation.graphql.js │ └── __tests__ │ │ └── RangeAdd.test.js ├── SimpleLocationsQuery.js └── __generated__ │ ├── LocationsListSimple.graphql.js │ └── SimpleLocationsQuery.graphql.js ├── schemaExtensions ├── LocalForm.graphql └── Relay.graphql └── styles ├── app.css └── reset.css /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .next/ 2 | node_modules/ 3 | yarn.lock 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/README.md -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/babel.config.js -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/jest.config.js -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/next.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/package.json -------------------------------------------------------------------------------- /pages/_app.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/pages/_app.js -------------------------------------------------------------------------------- /pages/_document.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/pages/_document.js -------------------------------------------------------------------------------- /pages/api/graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/pages/api/graphql.js -------------------------------------------------------------------------------- /pages/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/pages/index.js -------------------------------------------------------------------------------- /pages/local-form.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/pages/local-form.js -------------------------------------------------------------------------------- /pages/mutations/range-add.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/pages/mutations/range-add.js -------------------------------------------------------------------------------- /pages/polling.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/pages/polling.js -------------------------------------------------------------------------------- /pages/ssr.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/pages/ssr.js -------------------------------------------------------------------------------- /schema.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/schema.graphql -------------------------------------------------------------------------------- /scripts/jest/custom-transformer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/scripts/jest/custom-transformer.js -------------------------------------------------------------------------------- /scripts/jest/setEnvVars.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/scripts/jest/setEnvVars.js -------------------------------------------------------------------------------- /scripts/jest/setupTests.js: -------------------------------------------------------------------------------- 1 | // @flow strict 2 | 3 | import '@testing-library/jest-dom/extend-expect'; 4 | -------------------------------------------------------------------------------- /src/Homepage/__generated__/HomepageQuery.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/__generated__/HomepageQuery.graphql.js -------------------------------------------------------------------------------- /src/Homepage/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/index.js -------------------------------------------------------------------------------- /src/Homepage/locations/Location.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/Location.js -------------------------------------------------------------------------------- /src/Homepage/locations/LocationsList.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/LocationsList.js -------------------------------------------------------------------------------- /src/Homepage/locations/LocationsPaginated.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/LocationsPaginated.js -------------------------------------------------------------------------------- /src/Homepage/locations/LocationsPaginatedBidirectional.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/LocationsPaginatedBidirectional.js -------------------------------------------------------------------------------- /src/Homepage/locations/LocationsPaginatedRefetch.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/LocationsPaginatedRefetch.js -------------------------------------------------------------------------------- /src/Homepage/locations/__generated__/Location.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/__generated__/Location.graphql.js -------------------------------------------------------------------------------- /src/Homepage/locations/__generated__/LocationsPaginated.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/__generated__/LocationsPaginated.graphql.js -------------------------------------------------------------------------------- /src/Homepage/locations/__generated__/LocationsPaginatedBidirectional.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/__generated__/LocationsPaginatedBidirectional.graphql.js -------------------------------------------------------------------------------- /src/Homepage/locations/__generated__/LocationsPaginatedBidirectionalRefetchQuery.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/__generated__/LocationsPaginatedBidirectionalRefetchQuery.graphql.js -------------------------------------------------------------------------------- /src/Homepage/locations/__generated__/LocationsPaginatedRefetch.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/__generated__/LocationsPaginatedRefetch.graphql.js -------------------------------------------------------------------------------- /src/Homepage/locations/__generated__/LocationsPaginatedRefetchQuery.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/__generated__/LocationsPaginatedRefetchQuery.graphql.js -------------------------------------------------------------------------------- /src/Homepage/locations/__generated__/LocationsPaginatedRefetchRefetchQuery.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/__generated__/LocationsPaginatedRefetchRefetchQuery.graphql.js -------------------------------------------------------------------------------- /src/Homepage/locations/__tests__/LocationsPaginatedRefetch.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/__tests__/LocationsPaginatedRefetch.test.js -------------------------------------------------------------------------------- /src/Homepage/locations/__tests__/__generated__/LocationsPaginatedRefetchTestQuery.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Homepage/locations/__tests__/__generated__/LocationsPaginatedRefetchTestQuery.graphql.js -------------------------------------------------------------------------------- /src/LocalForm/__generated__/LocalFormQuery.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/LocalForm/__generated__/LocalFormQuery.graphql.js -------------------------------------------------------------------------------- /src/LocalForm/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/LocalForm/index.js -------------------------------------------------------------------------------- /src/Polling/__generated__/PollingQuery.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Polling/__generated__/PollingQuery.graphql.js -------------------------------------------------------------------------------- /src/Polling/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/Polling/index.js -------------------------------------------------------------------------------- /src/SSRLocations/LocationListItem.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/SSRLocations/LocationListItem.js -------------------------------------------------------------------------------- /src/SSRLocations/LocationsList.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/SSRLocations/LocationsList.js -------------------------------------------------------------------------------- /src/SSRLocations/LocationsQuery.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/SSRLocations/LocationsQuery.js -------------------------------------------------------------------------------- /src/SSRLocations/__generated__/LocationListItem.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/SSRLocations/__generated__/LocationListItem.graphql.js -------------------------------------------------------------------------------- /src/SSRLocations/__generated__/LocationsList.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/SSRLocations/__generated__/LocationsList.graphql.js -------------------------------------------------------------------------------- /src/SSRLocations/__generated__/LocationsQuery.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/SSRLocations/__generated__/LocationsQuery.graphql.js -------------------------------------------------------------------------------- /src/SSRQueryRenderer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/SSRQueryRenderer.js -------------------------------------------------------------------------------- /src/components/Navbar.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/components/Navbar.js -------------------------------------------------------------------------------- /src/components/Select.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/components/Select.js -------------------------------------------------------------------------------- /src/components/TextInput.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/components/TextInput.js -------------------------------------------------------------------------------- /src/createRelayEnvironment.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/createRelayEnvironment.js -------------------------------------------------------------------------------- /src/graphql/RootMutation.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/RootMutation.js -------------------------------------------------------------------------------- /src/graphql/RootQuery.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/RootQuery.js -------------------------------------------------------------------------------- /src/graphql/Schema.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/Schema.js -------------------------------------------------------------------------------- /src/graphql/currency/queries/Currency.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/currency/queries/Currency.js -------------------------------------------------------------------------------- /src/graphql/currency/types/output/Currency.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/currency/types/output/Currency.js -------------------------------------------------------------------------------- /src/graphql/locations/datasets/locations.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/datasets/locations.json -------------------------------------------------------------------------------- /src/graphql/locations/locations.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/locations.js -------------------------------------------------------------------------------- /src/graphql/locations/mutations/AddLocation.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/mutations/AddLocation.js -------------------------------------------------------------------------------- /src/graphql/locations/mutations/__tests__/__fixtures__/addLocation.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/mutations/__tests__/__fixtures__/addLocation.graphql -------------------------------------------------------------------------------- /src/graphql/locations/mutations/__tests__/__fixtures__/addLocationError.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/mutations/__tests__/__fixtures__/addLocationError.graphql -------------------------------------------------------------------------------- /src/graphql/locations/mutations/__tests__/__snapshots__/mutation.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/mutations/__tests__/__snapshots__/mutation.test.js.snap -------------------------------------------------------------------------------- /src/graphql/locations/mutations/__tests__/mutation.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/mutations/__tests__/mutation.test.js -------------------------------------------------------------------------------- /src/graphql/locations/queries/Locations.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/queries/Locations.js -------------------------------------------------------------------------------- /src/graphql/locations/queries/__tests__/__fixtures__/locations.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/queries/__tests__/__fixtures__/locations.graphql -------------------------------------------------------------------------------- /src/graphql/locations/queries/__tests__/__snapshots__/queries.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/queries/__tests__/__snapshots__/queries.test.js.snap -------------------------------------------------------------------------------- /src/graphql/locations/queries/__tests__/queries.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/queries/__tests__/queries.test.js -------------------------------------------------------------------------------- /src/graphql/locations/types/input/AddLocationInput.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/types/input/AddLocationInput.js -------------------------------------------------------------------------------- /src/graphql/locations/types/output/AddLocationError.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/types/output/AddLocationError.js -------------------------------------------------------------------------------- /src/graphql/locations/types/output/AddLocationOrError.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/types/output/AddLocationOrError.js -------------------------------------------------------------------------------- /src/graphql/locations/types/output/AddLocationResponse.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/types/output/AddLocationResponse.js -------------------------------------------------------------------------------- /src/graphql/locations/types/output/Location.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/types/output/Location.js -------------------------------------------------------------------------------- /src/graphql/locations/types/output/LocationArea.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/types/output/LocationArea.js -------------------------------------------------------------------------------- /src/graphql/locations/types/output/LocationConnection.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/locations/types/output/LocationConnection.js -------------------------------------------------------------------------------- /src/graphql/services/executeTestQuery.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/services/executeTestQuery.js -------------------------------------------------------------------------------- /src/graphql/types/Error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/graphql/types/Error.js -------------------------------------------------------------------------------- /src/mutations/LocationsList.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/mutations/LocationsList.js -------------------------------------------------------------------------------- /src/mutations/RangeAdd/LocationsForm.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/mutations/RangeAdd/LocationsForm.js -------------------------------------------------------------------------------- /src/mutations/RangeAdd/RangeAdd.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/mutations/RangeAdd/RangeAdd.js -------------------------------------------------------------------------------- /src/mutations/RangeAdd/__generated__/LocationsFormMutation.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/mutations/RangeAdd/__generated__/LocationsFormMutation.graphql.js -------------------------------------------------------------------------------- /src/mutations/RangeAdd/__tests__/RangeAdd.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/mutations/RangeAdd/__tests__/RangeAdd.test.js -------------------------------------------------------------------------------- /src/mutations/SimpleLocationsQuery.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/mutations/SimpleLocationsQuery.js -------------------------------------------------------------------------------- /src/mutations/__generated__/LocationsListSimple.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/mutations/__generated__/LocationsListSimple.graphql.js -------------------------------------------------------------------------------- /src/mutations/__generated__/SimpleLocationsQuery.graphql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/mutations/__generated__/SimpleLocationsQuery.graphql.js -------------------------------------------------------------------------------- /src/schemaExtensions/LocalForm.graphql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/schemaExtensions/LocalForm.graphql -------------------------------------------------------------------------------- /src/schemaExtensions/Relay.graphql: -------------------------------------------------------------------------------- 1 | directive @live_query(polling_interval: Int) on QUERY 2 | -------------------------------------------------------------------------------- /src/styles/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/styles/app.css -------------------------------------------------------------------------------- /src/styles/reset.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adeira/relay-example/HEAD/src/styles/reset.css --------------------------------------------------------------------------------