DotNet4Neo4j / Neo4jClient

.NET client binding for Neo4j
https://www.nuget.org/packages/Neo4jClient
Microsoft Public License
430 stars 146 forks source link

Return result as json string (no deserialization) #122

Open dnauck opened 9 years ago

dnauck commented 9 years ago

During a community conference last weekend we discussed about Neo4j and Neo4jClient.

We came to the conclusion that it would be nice to have:

cskardon commented 9 years ago

Hi,

When you say serialize as Json, do you mean the data, or the whole node as well?

And you can send just text if you really want to, I'm on my phone so don't have a great way to type it, and it's from memory, so possibly (probably) wrong! I'll elaborate later, but something like:

((IRawGraphClient) client).ExecuteCypher(new CypherQuery(/**/));

With a return equivalent.

-----Original Message----- From: "Daniel Nauck" notifications@github.com Sent: ‎19/‎10/‎2015 06:29 To: "Readify/Neo4jClient" Neo4jClient@noreply.github.com Subject: [Neo4jClient] Return result as json string (no deserialization)(#122)

During a community conference last weekend we discussed about Neo4j and Neo4jClient. We came to the conclusion that it would be nice to have: return query result as plain json (no deserialization, etc) to send the result directly back to the client in a web service scenario. Also add the possibility of setting up the representation of the result (e.g. graph return type). In most scenarios i don't need to deserialize the nodes and serialize them back to json two statements later. add possibility to send a query as string and not to use the fluent interface (just for params) — Reply to this email directly or view it on GitHub.

dnauck commented 9 years ago

Hi,

i mean to return the raw result of my query (i want to return the "graph" (nor "row") return type of my query to my client in its original json presentation). So using Neo4jClient as simple REST Client in this case.

cskardon commented 9 years ago

So, just to make sure I get what you're wanting.

You are wanting all the node identifiers etc, not just the data you've put up there? If that is the case, I'll have a look and see what you can get that way, it's a little tricky not being at a computer :)

-----Original Message----- From: "Daniel Nauck" notifications@github.com Sent: ‎19/‎10/‎2015 06:44 To: "Readify/Neo4jClient" Neo4jClient@noreply.github.com Cc: "Chris Skardon" cskardon@xclave.co.uk Subject: Re: [Neo4jClient] Return result as json string (no deserialization)(#122)

Hi, i mean to return the raw result of my query (i want to return the "graph" (nor "row") return type of my query to my client in its original json presentation). So using Neo4jClient as simple REST Client in this case. — Reply to this email directly or view it on GitHub.

tathamoddie commented 9 years ago

In that case, what value does Neo4jClient even add?

Why not just do a REST call?

Tatham Oddie Tiny phone keyboard = tiny message and tpyos


From: Daniel Nauckmailto:notifications@github.com Sent: ‎19/‎10/‎2015 21:44 To: Readify/Neo4jClientmailto:Neo4jClient@noreply.github.com Subject: Re: [Neo4jClient] Return result as json string (no deserialization) (#122)

Hi,

i mean to return the raw result of my query (i want to return the "graph" (nor "row") return type of my query to my client in its original json presentation). So using Neo4jClient as simple REST Client in this case.

— Reply to this email directly or view it on GitHubhttps://github.com/Readify/Neo4jClient/issues/122#issuecomment-149182401.

cskardon commented 9 years ago

There is that, but you might want to use the fluent interface for some things and then do some raw calls as well without wanting another client and connection..?

-----Original Message----- From: "Tatham Oddie" notifications@github.com Sent: ‎19/‎10/‎2015 07:02 To: "Readify/Neo4jClient" Neo4jClient@noreply.github.com Cc: "Chris Skardon" cskardon@xclave.co.uk Subject: Re: [Neo4jClient] Return result as json string (no deserialization)(#122)

In that case, what value does Neo4jClient even add?

Why not just do a REST call?

Tatham Oddie Tiny phone keyboard = tiny message and tpyos


From: Daniel Nauckmailto:notifications@github.com Sent: ‎19/‎10/‎2015 21:44 To: Readify/Neo4jClientmailto:Neo4jClient@noreply.github.com Subject: Re: [Neo4jClient] Return result as json string (no deserialization) (#122)

Hi,

i mean to return the raw result of my query (i want to return the "graph" (nor "row") return type of my query to my client in its original json presentation). So using Neo4jClient as simple REST Client in this case.

— Reply to this email directly or view it on GitHubhttps://github.com/Readify/Neo4jClient/issues/122#issuecomment-149182401.

— Reply to this email directly or view it on GitHub.

dnauck commented 9 years ago

Yes, the Neo4jClient does some stuff that i otherwise need to implement myself:

Sure, i can easily use the HttpClient myself and perform REST calls but its also some extra work if there is already an implementation ;)

dnauck commented 8 years ago

@cskardon any news on this?

cskardon commented 8 years ago

I'll happily look at pull requests for it (two really)

I'm afraid I don't have the time to implement these myself as I've 2 major changes (dotnetcore and Bolt) that need most attention at the moment.