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

integrate JabRef online #7796

Closed
wants to merge 7 commits into from

Conversation

Ali96kz
Copy link
Contributor

@Ali96kz Ali96kz commented Jun 4, 2021

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

@Ali96kz
Copy link
Contributor Author

Ali96kz commented Jun 4, 2021

I send next requests:
{ "operationName": "getDocumentById", "variables": { "id": "ckph1zzv600141wzgtgbe2eg2" }, "query": "query getDocumentById($id: ID!) {\n getUserDocumentRaw(id: $id) {\n type\n citationKey\n fields {\n field\n value\n }\n }\n}\n" }
To get entry by id

And next request to save it by id
{ "data": { "addUserDocumentRaw": { "id": "ckpi4mtn800191wves7cxzwhi" } } }

@Ali96kz
Copy link
Contributor Author

Ali96kz commented Jun 4, 2021

Is it ok?
If it's ok, I will add test cases and prettify the code

@Ali96kz
Copy link
Contributor Author

Ali96kz commented Jun 4, 2021

I have a problem with adding Appollo as a dependency, and the next reason is I am not sure that we need a special library to make HTTP request, cause in all other places we fetch data from web with the simple HTTPUrlConnection

@tobiasdiez
Copy link
Member

Thanks a lot for your work. This already looks very nice.

Two general comments:

  • Please try to use the apollo library. For simple, queries and mutations manually creating the http requests may work. But for more advanced things like subscriptions and caching, it would be good if we wouldn't need to reinvent the wheel. Moreover, apollo creates most of the data holder classes automatically from the schema, which will easy maintenance in the future. @Siedlerchr just now made some progress in this direction, see Add integration with Jabref Online #7582 (comment).
  • As @koppor remarked in one of the sync-issues (cannot find the exact comment right now), the goal would be to implement some form of the https://github.com/JabRef/jabref/blob/main/src/main/java/org/jabref/logic/shared/DBMSProcessor.java class (probably it's a good idea to first extract an interface from this class that abstracts the "shared sync" functionality, but doesn't rely on the database-specifics).

@tobiasdiez
Copy link
Member

tobiasdiez commented Jun 5, 2021

Can you please try this version after downloading https://repo1.maven.org/maven2/com/apollographql/apollo/apollo-api/2.5.8/apollo-api-2.5.8.jar and putting this jar file in lib.

Maybe modularity.patchModule("apollo.runtime", "apollo-api-2.5.8.jar") needs to be changed to a different name than "apollo.runtime", not sure.

@Siedlerchr
Copy link
Member

@tobiasdiez That worked partly. I could at least generate some files now
. @Ali96kz https://github.com/JabRef/jabref/tree/jabrefonline

However, it's still not building, there seems to be api missing

@koppor koppor changed the title 7582 integrate jaber online integrate JabRef online Jun 7, 2021
@Siedlerchr
Copy link
Member

I am still working on integration the apollo libs and make it possible for eclipse. I will therefore close your PR for the moment.
Feel free to contribtute to koppor#505

@Siedlerchr Siedlerchr closed this Jun 16, 2021
@Siedlerchr Siedlerchr mentioned this pull request Jun 19, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants