GraphQL actually support multiple programming languages; anyone knows which languages has best performance/support for the GraphQL?
Related
I'm newbie with graphql and spqr. I would like to serialize my dates with personal format. How I can do it?
The best answer I'd offer is: don't! SPQR serializes all temporal scalars as ISO 8601 strings in UTC zone for a reason. It is the most portable format, that any client can easily parse and understand, and any conversion and display logic is better left to the client itself.
If this is for some reason impossible (e.g. backwards compatibility with a legacy client), your best bet is providing your own scalar implementations. In the future there might be a feature to avoid this, but currently you have to implement your own scalars and a TypeMapper that will map the desired Java types to those scalars. See the existing ScalarMapper for inspiration. Once you have the mapper, register it via generator.withTypeMappers.
The following is true:
Javascript == Typescript
Typescript != Javascript
Can the same be said for Dgraph's GraphQL+?
GraphQL == GraphQL+
GraphQL+ != GraphQL
The reason for asking, I understand that GraphQL is not sufficient for Dgraph's goals. But does it process GraphQL if needed?
The first paragraph on their landing page reads:
We’ve modified the language to better support graph operations, adding and removing features
And also this
GraphQL+- is a work in progress. We’re adding more features and we might further simplify existing ones.
This means that these languages are incompatible. Similar, yes, but each have unique features.
To add to Sergio's answer, GraphQL+- is not fully compatible with GraphQL. We liked GraphQL and used that as a basis for a new graph query language.
However, I think we would likely look at how big of a gap is between GraphQL+- and GraphQL, and if can be bridged, we would (probably close to or after v1.0).
I am currently studying Datalog for my report in class, I only need to discuss basic syntax and a basic example.
I know Datalog is usually used as a query language and is usually only implemented to other languages such as Java, Lua, C, etc. but is it possible to teach Datalog only by itself, or am I required to use another language implementing it to show a simple working program?
There are a few online demos you can use:
http://iris-reasoner.org/demo
http://ysangkok.github.io/mitre-datalog.js/wrapper.html
https://repl.logicblox.com/ (docs here:
https://developer.logicblox.com/content/docs4/tutorial/repl/section/split.html )
I haven't tried it myself yet, but http://abcdatalog.seas.harvard.edu also looks nice and easy to run.
A complete overview is on Wikipedia: https://en.wikipedia.org/wiki/Datalog
Today twitting with a colleague, he said me that Groovy is like C# but without LINQ.
I don't know much about LINQ, but I answered him that Groovy has similarities to LINQ, for example, Groovy's class DataSet.
Can you tell me more about similarities / differences between Groovy and LINQ (C#)?
I wonder who told you that ;P
First, let me clarify my statement: Many of the things that I love about c# 4.0 are implemented on groovy, but groovy is already much more succinct.
There are other obvious differences like the dynamic/scripting nature of the groovy language and so forth.
now, linq is a step over closures, like a dsl inside c# to create closures in a query (sql) like sintax, with a pattern based on interfaces and a provider model behind to allow this closures to be translated to sql or to any kind of other representation.
In this respect, since groovy has closures and beautifully implemented, AND it has many dsl-building capabilities built in, it should be possible to make a linq-like feature.
The only similarity between C# and Groovy is their syntax. In other words, Groovy code looks fairly similar to C#. However, the true nature of the languages is very different. Groovy is more like Ruby in that it is dynamically typed and supports meta-programming. C# on the other hand is mostly statically typed.
As for similarities between LINQ and Groovy there are none really. Groovy is a general purpose language, whereas LINQ is a DSL for writing queries. A further difference is that C# and LINQ run on .Net whereas Groovy runs on the JVM.
I am currently using a CMS which uses an ORM with its own bespoke query language (i.e. with select/where/orderby like statements). I refer to this mini-language as a DSL, but I might have the terminology wrong.
We are writing controls for this CMS, but I would prefer not to couple the controls to the CMS, because we have some doubts about whether we want to continue with this CMS in the longer term.
We can decouple our controls from the CMS fairly easily, by using our own DAL/abstraction layer or what not.
Then I remembered that on most of the CMS controls, they provide a property (which is design-time editable) where users can type in a query to control what gets populated in the data source. Nice feature - the question is how can I abstract this feature?
It then occurred to me that maybe a DSL framework existed out there that could provide me with a simple query language that could be turned into a LINQ expression at runtime. Thus decoupling me from the CMS' query DSL.
Does such a thing exist? Am I wasting my time? (probably the latter)
Thanks
this isn't going to answer your question fully, but there is an extension for LINQ that allows you to specify predicates for LINQ queries as strings called Dynamic LINQ, so if you want to store the conditions in some string-based format, you could probably build your language on top of this. You'd still need to find a way to represent different clauses (where/orderby/etc.) but for the predicates passed as arguments to these, you could use Dynamic LINQ.
Note that Dynamic LINQ allows you to parse the string, but AFAIK doesn't have any way to turn existing Expression tree into that string... so there would be some work needed to do that.
(but I'm not sure if I fully understand the question, so maybe I'm totally of :-))