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

feat: use an enhanced CypherAPI to refactor it #2143

Merged
merged 16 commits into from
Mar 15, 2023
Merged

feat: use an enhanced CypherAPI to refactor it #2143

merged 16 commits into from
Mar 15, 2023

Conversation

lynnbond
Copy link
Contributor

@lynnbond lynnbond commented Mar 6, 2023

I have added a more powerful Cypher API that is enhanced by cypher-gremlin-extensions. The old one has been removed.

@lynnbond lynnbond changed the title A enhanced CypherAPI An enhanced CypherAPI Mar 6, 2023
@imbajin imbajin changed the title An enhanced CypherAPI feat: use a enhanced CypherAPI to refactor it Mar 6, 2023
@imbajin imbajin added the cypher label Mar 6, 2023
@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #2143 (5457d18) into master (6409d92) will increase coverage by 7.16%.
The diff coverage is 58.90%.

@@             Coverage Diff              @@
##             master    #2143      +/-   ##
============================================
+ Coverage     61.48%   68.65%   +7.16%     
- Complexity      484      977     +493     
============================================
  Files           491      497       +6     
  Lines         40221    40564     +343     
  Branches       5615     5662      +47     
============================================
+ Hits          24731    27849    +3118     
+ Misses        12973    10023    -2950     
- Partials       2517     2692     +175     
Impacted Files Coverage Δ
.../org/apache/hugegraph/opencypher/CypherPlugin.java 0.00% <0.00%> (ø)
...org/apache/hugegraph/api/cypher/CypherManager.java 53.12% <53.12%> (ø)
...apache/hugegraph/opencypher/CypherOpProcessor.java 53.71% <53.71%> (ø)
.../org/apache/hugegraph/api/cypher/CypherClient.java 54.71% <54.71%> (ø)
...ava/org/apache/hugegraph/api/cypher/CypherAPI.java 60.86% <60.86%> (ø)
...g/apache/hugegraph/auth/StandardAuthenticator.java 59.16% <66.66%> (+5.32%) ⬆️
...a/org/apache/hugegraph/api/cypher/CypherModel.java 73.68% <73.68%> (ø)
...aph/traversal/optimize/HugePrimaryKeyStrategy.java 85.36% <85.36%> (ø)
.../src/main/java/org/apache/hugegraph/HugeGraph.java 65.30% <100.00%> (+0.72%) ⬆️
...org/apache/hugegraph/auth/StandardAuthManager.java 92.56% <100.00%> (+0.10%) ⬆️

... and 100 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@imbajin
Copy link
Member

imbajin commented Mar 6, 2023

Thanks a lot for your contribution and adopt with the Apache version, you could also use/import hugegraph-style.xml in IDEA to format the import/align.

And if possible, give more context (docs/tests/example) about the change/refactor, so that we could review it quickly 👾

@jadepeng You can also help to review the new design

@lynnbond lynnbond changed the title feat: use a enhanced CypherAPI to refactor it feat: use an enhanced CypherAPI to refactor it Mar 8, 2023
javeme
javeme previously approved these changes Mar 8, 2023
@lynnbond lynnbond closed this Mar 9, 2023
@imbajin
Copy link
Member

imbajin commented Mar 9, 2023

image

@shangrilaxie you could try the latest code in Cypher API (in this PR) to check if the error code disappear?

And contact us for the Python RESTful API , contributions are welcome and we can provide related support:

  1. sent your Wechat/TG ID in email to me(in profile)
  2. leave your ID here with comment (I'll delete it after contact finished)
  3. Or any other ways convenient for you

We will improve the way and channel of "contacting us" soon 💬

@lynnbond lynnbond requested a review from javeme March 9, 2023 08:46
javeme
javeme previously approved these changes Mar 14, 2023
Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@javeme javeme merged commit 4b74ab6 into apache:master Mar 15, 2023
@shangrilaxie
Copy link

shangrilaxie commented Mar 17, 2023

克隆最新代码,编译打包正常。运行结果:post还是不行,get也不行了。错误信息一样:
请求:

http://localhost:8080/graphs/hugegraph/cypher?cypher=MATCH (m:person) RETURN m

返回:(get和post都一样了,原来1.0.0版本的post返回500,get正常)

{
    "exception": "class jakarta.ws.rs.NotAuthorizedException",
    "message": "HTTP 401 Unauthorized",
    "cause": ""
}

@imbajin
Copy link
Member

imbajin commented Mar 17, 2023

克隆最新代码,编译打包正常。运行结果:post还是不行,get也不行了。错误信息一样:

@lynnbond could u check the problem or give a short comment for the proper usage?

@shangrilaxie please wait author's reply, if we ensure it's a bug, please submit a separate issue

@shangrilaxie
Copy link

启动hugeserver,配置好hugegrap图,使用postman发送GET、POST请求。

@lynnbond
Copy link
Contributor Author

lynnbond commented Mar 17, 2023

@shangrilaxie 看错误提示,感觉您好像是没有配置Authorization header

如果使用类 Postman 这种标准的 API 测试工具进行测试, 麻烦把报错时候发送的 url/header/param 和返回的地方直接截图粘贴一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants