Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ra-data-graphcool dataProvider #5015

Merged
merged 2 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ build-ra-data-graphql:
@echo "Transpiling ra-data-graphql files...";
@cd ./packages/ra-data-graphql && yarn -s build

build-ra-data-graphcool:
@echo "Transpiling ra-data-graphcool files...";
@cd ./packages/ra-data-graphcool && yarn -s build

build-ra-data-graphql-simple:
@echo "Transpiling ra-data-graphql-simple files...";
@cd ./packages/ra-data-graphql-simple && yarn -s build
Expand All @@ -88,7 +84,7 @@ build-data-generator:
@echo "Transpiling data-generator files...";
@cd ./examples/data-generator && yarn -s build

build: build-ra-core build-ra-ui-materialui build-ra-data-fakerest build-ra-data-json-server build-ra-data-simple-rest build-ra-data-graphql build-ra-data-graphcool build-ra-data-graphql-simple build-ra-i18n-polyglot build-ra-input-rich-text build-data-generator build-ra-language-english build-ra-language-french build-react-admin ## compile ES6 files to JS
build: build-ra-core build-ra-ui-materialui build-ra-data-fakerest build-ra-data-json-server build-ra-data-simple-rest build-ra-data-graphql build-ra-data-graphql-simple build-ra-i18n-polyglot build-ra-input-rich-text build-data-generator build-ra-language-english build-ra-language-french build-react-admin ## compile ES6 files to JS

doc: ## compile doc as html and launch doc web server
@yarn -s doc
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/CreatePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default url => ({
},

submitWithKeyboard() {
cy.get('input:first').type('{enter}');
cy.get("input[type='text']:first").type('{enter}');
cy.get(this.elements.snackbar);
cy.get(this.elements.body).click(); // dismiss notification
cy.wait(200); // let the notification disappear (could block further submits)
Expand Down
3 changes: 1 addition & 2 deletions docs/DataProviders.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The react-admin project includes 4 Data Providers:

* Simple REST: [marmelab/ra-data-simple-rest](https://github.com/marmelab/react-admin/tree/master/packages/ra-data-simple-rest) ([read more below](#usage)). It serves mostly as an example. Incidentally, it is compatible with the [FakeRest](https://github.com/marmelab/FakeRest) API.
* **[JSON server](https://github.com/typicode/json-server)**: [marmelab/ra-data-json-server](https://github.com/marmelab/react-admin/tree/master/packages/ra-data-json-server). Great for prototyping an admin over a yet-to-be-developed REST API.
* [Graphcool](https://www.graph.cool/): [marmelab/ra-data-graphcool](https://github.com/marmelab/react-admin/tree/master/packages/ra-data-graphcool). A provider for GraphQL servers following the Graphcool convention. Incidentally, this package builds up on [marmelab/ra-data-graphql](https://github.com/marmelab/react-admin/tree/master/packages/ra-data-graphql), which lets you develop providers for other GraphQL conventions.
* [Simple GraphQL](http://graphql.org/): [marmelab/ra-data-graphql-simple](https://github.com/marmelab/react-admin/tree/master/packages/ra-data-graphql-simple). A GraphQL provider built with Apollo and tailored to target a simple GraphQL implementation.
* Local JSON: [marmelab/ra-data-fakerest](https://github.com/marmelab/react-admin/tree/master/packages/ra-data-fakerest). Based on a local object, it doesn't even use HTTP. Use it for testing purposes.

Developers from the react-admin community have open-sourced Data Providers for many more backends:
Expand All @@ -70,7 +70,6 @@ Developers from the react-admin community have open-sourced Data Providers for m
* **[Feathersjs](http://www.feathersjs.com/)**: [josx/ra-data-feathers](https://github.com/josx/ra-data-feathers)
* **[Firebase Firestore](https://firebase.google.com/docs/firestore)**: [benwinding/react-admin-firebase](https://github.com/benwinding/react-admin-firebase).
* **[Firebase Realtime Database](https://firebase.google.com/docs/database)**: [aymendhaya/ra-data-firebase-client](https://github.com/aymendhaya/ra-data-firebase-client).
* **[GraphCool](http://www.graph.cool/)**: [marmelab/ra-data-graphcool](https://github.com/marmelab/react-admin/tree/master/packages/ra-data-graphcool) (uses [Apollo](http://www.apollodata.com/))
* **[GraphQL](http://graphql.org/)**: [marmelab/ra-data-graphql](https://github.com/marmelab/react-admin/tree/master/packages/ra-data-graphql) (uses [Apollo](http://www.apollodata.com/))
* **[HAL](http://stateless.co/hal_specification.html)**: [b-social/ra-data-hal](https://github.com/b-social/ra-data-hal)
* **[Hasura](https://github.com/hasura/graphql-engine)**: [hasura/ra-data-hasura](https://github.com/hasura/graphql-engine/tree/master/community/tools/ra-data-hasura)
Expand Down
13 changes: 13 additions & 0 deletions examples/simple/src/Dashboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';

import { useQuery } from 'react-admin';

export default () => {
const { data } = useQuery({
type: 'getOne',
resource: 'users',
payload: { id: 1 },
});

return <span>{data && JSON.stringify(data)}</span>;
};
2 changes: 2 additions & 0 deletions examples/simple/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Layout from './Layout';
import posts from './posts';
import users from './users';
import tags from './tags';
import Dashboard from './Dashboard';

render(
<Admin
Expand All @@ -22,6 +23,7 @@ render(
i18nProvider={i18nProvider}
title="Example Admin"
layout={Layout}
dashboard={Dashboard}
customRoutes={[
<Route
exact
Expand Down
9 changes: 9 additions & 0 deletions examples/simple/src/posts/PostCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import {
TextInput,
Toolbar,
required,
FileInput,
FileField,
} from 'react-admin'; // eslint-disable-line import/no-unresolved
import { FormSpy } from 'react-final-form';

Expand Down Expand Up @@ -85,6 +87,13 @@ const PostCreate = ({ permissions, ...props }) => {
return errors;
}}
>
<FileInput
source="pdffile"
label="PDF-Template"
accept="application/pdf"
>
<FileField source="src" title="title" />
</FileInput>
<TextInput autoFocus source="title" />
<TextInput source="teaser" fullWidth={true} multiline={true} />
<RichTextInput source="body" validate={required()} />
Expand Down
175 changes: 0 additions & 175 deletions packages/ra-data-graphcool/README.md

This file was deleted.

51 changes: 0 additions & 51 deletions packages/ra-data-graphcool/package.json

This file was deleted.

Loading