Re:Build Better GraphQL APIs: Thinking in Graphs
by manigandham on Friday December 01, 2017 @10:02AM
(#15824161)
Blanking out the article and showing a newsletter signup form after less than 1 second on page = worthless. These tactics do not work, you just end up annoying readers and getting spam entries.
Re:Build Better GraphQL APIs: Thinking in Graphs
by nothrabannosir on Friday December 01, 2017 @11:28AM
(#15824876)
Do they really not work? Every bi department I’ve ever heard running the numbers, so far, have been sorry to say they do. I’ve never met a company happy to put them in, either. It’s always “ugh, the numbers show big tick ups in engagement, we have to do this -.-“
Re:Build Better GraphQL APIs: Thinking in Graphs
by manigandham on Friday December 01, 2017 @11:45AM
(#15825025)
People do sign up for newsletters, but not before they even get a chance to read anything. It's a fine balance between value and trust.
Business websites are different, usually with some important gated material behind an email signup but even then there is plenty of spam. Most marketing departments never bother to measure the bounce rate and attrition from these tactics so if all you look at are email signups, then of course it looks like it works.
Re:Build Better GraphQL APIs: Thinking in Graphs
by madamelic on Friday December 01, 2017 @12:46PM
(#15825654)
>People do sign up for newsletters, but not before they even get a chance to read anything. It's a fine balance between value and trust.
There was an article that did it really well. I forget who it was but it was a good article about Mongo, about 1/2 - 2/3rds of the way through, it put a CTA and an email input box inline. It was obvious what it was, but didn't shove it in your face.
Re:Build Better GraphQL APIs: Thinking in Graphs
by GrinningFool on Friday December 01, 2017 @10:58AM
(#15824575)
True. Much like spam, success rates - depending on the goals - can be measured in the low single-digit percentages. If you scare away 95% of folks but your target is harvesting 3% of visitors' email address, this is a successful approach.
That's fine, to each his/her own. I'll stick with the 95% that ignore the prompt or (in my case) close the window when the screen blanks.
Re:Build Better GraphQL APIs: Thinking in Graphs
by madamelic on Friday December 01, 2017 @12:54PM
(#15825708)
I'd love to see the numbers on open rates of the emails he gets this way. (I am going to guess they are incredibly close to 0%). Let alone any conversion from the email.
Re:Build Better GraphQL APIs: Thinking in Graphs
by donatj on Friday December 01, 2017 @09:50AM
(#15824105)
I was very disappointed to find out that GraphQL wasn’t a generalized query language and much more discreet manually defined API, more of a rest api pretending to be a query language.
That is to say I can only filter in ways the API developer thought of, specifically blessed.
Don’t get me wrong, it’s amazingly useful. A process that took us 40 seconds of back and forth with GitHub now takes less than one second.
Re:Build Better GraphQL APIs: Thinking in Graphs
by obi1kenobi on Friday December 01, 2017 @10:34AM
(#15824383)
I was very disappointed with the same thing! However, it is very easy to get rid of the resolver-based execution model and turn it into a generalized graph query language. We've done that at my company and it's been working well for us -- here's our blog post: https://blog.kensho.com/compiled-graphql-as-a-database-query...
Re:Build Better GraphQL APIs: Thinking in Graphs
by hirundo on Friday December 01, 2017 @12:41PM
(#15825594)
I'm implementing filtering in a graphql api now, on a sql backend (a fixed constraint). We decided we just can't support arbitrary filtering. Full table scans don't scale, and an index for every column is costly. So we'll support it only on indexed columns and add indexes selectively.
If graphql did require arbitrary filtering it would be useless to us at this point.
Re:Build Better GraphQL APIs: Thinking in Graphs
by cvburgess on Friday December 01, 2017 @02:41PM
(#15826671)
Check out [0] and similar projects out there. GraphQL is a query language. It doesn't have to be used for APIs - the Apollo team is using it for state management [1] and others are using it to handle all sorts of non-API data. That being said, it is a Facebook technology released in the context of APIs and it is only three years (publicly) old, so naturally, that is where you are going to see the majority of usage.
Re:Build Better GraphQL APIs: Thinking in Graphs
by acjohnson55 on Monday December 04, 2017 @10:46AM
(#15844708)
As other folks have mentioned, there's no reason this has to be the case. It's totally possible to take a basic GraphQL schema and programmatically enhance it with generated filters based on field types. Graphcool offers this. I think it makes a much better platform for this than REST. My guess is that eventually, standards will emerge. We can already see it in Relay, with their connection pattern for pagination.
Re:Build Better GraphQL APIs: Thinking in Graphs
by sharatv on Friday December 01, 2017 @02:36PM
(#15826616)
Resolving functions are included. I'm using it to power a fully-functional GraphQL service backed by a PostgresQL database. There's a newer version at https://www.graphile.org/postgraphile/ by the same author.
Re:Build Better GraphQL APIs: Thinking in Graphs
by dmitriid on Friday December 01, 2017 @06:59AM
(#15823320)
> Stop Thinking In Endpoints
> How To Start Thinking In Graphs
Ok. I've started to think in graphs. You know. Neo4J, Tinkerpop Gremlin, all that.
Oh, wait. How does that help me create that graph in a sane and meaningful way from a relational database and a number of microservices, especially if all the requests can be ad-hoc graph queries?
Ah, yes. The article (and all other articles on GraphQL) never answer that, do they?
Re:Build Better GraphQL APIs: Thinking in Graphs
by obi1kenobi on Friday December 01, 2017 @10:38AM
(#15824409)
My company has built and open-sourced a tool that can turn your ad-hoc graph queries into database queries. We've completely abandoned GraphQL's resolver-based execution model, and we simply turn the GraphQL directly into a database query and run it on the database itself.
Re:Build Better GraphQL APIs: Thinking in Graphs
by taco_emoji on Friday December 01, 2017 @10:20AM
(#15824267)
Yeah, IMO GraphQL is not at all hard to grok, and its benefits to an API consumer are pretty obvious. But I have no idea, as a developer, how I'm supposed to implement a GraphQL interface to my non-graphical database(s) in a secure, performant, and repeatable way.
Re:Build Better GraphQL APIs: Thinking in Graphs
by jonbarker on Friday December 01, 2017 @09:52AM
(#15824117)
I propose that if you have tables and want graphs, you will have to consider the tradeoff in compute resources required to generate meaningful aggregate results (count all customers, etc). So the answer is usually keep your tables and use graphs when appropriate.
Re:Build Better GraphQL APIs: Thinking in Graphs
by markjspivey on Friday December 01, 2017 @02:51AM
(#15822582)
Hypermedia (HATEOAS, REST, etc) is graph thinking as well. “endpoints” is not synonymous with “REST”, it is merely an address (likely paired with an expectation (or affordance).
Re:Build Better GraphQL APIs: Thinking in Graphs
by weego on Friday December 01, 2017 @08:38AM
(#15823699)
I really appreciate when anyone is willing to share knowledge and experience on subjects... but in this case none of what is said has any real unique insight to graphs over just really really basic data modelling. Even just the notion of needing to think in graphs for GraphQL is really an unnecessary conflation of modelling theory and technical abstraction.
Do you have different experiences?
Business websites are different, usually with some important gated material behind an email signup but even then there is plenty of spam. Most marketing departments never bother to measure the bounce rate and attrition from these tactics so if all you look at are email signups, then of course it looks like it works.
There was an article that did it really well. I forget who it was but it was a good article about Mongo, about 1/2 - 2/3rds of the way through, it put a CTA and an email input box inline. It was obvious what it was, but didn't shove it in your face.
I thought I opened an article, not a newsletter subscription.
Who sane in their brain thinks this actually lead to new newsletter subscriptions? It's content hijacking.
No, unfortunately it's shit. Not even a worked out full example.
https://blog.graph.cool/thinking-in-terms-of-graphs-a9087423... https://dev-blog.apollodata.com/the-concepts-of-graphql-bc68...
And a more full featured tutorial:
https://www.howtographql.com/
Full disclosure - I'm the co-founder of Graphcool.
They probably have metrics showing so. Otherwise they really are insane.
That's fine, to each his/her own. I'll stick with the 95% that ignore the prompt or (in my case) close the window when the screen blanks.
That is to say I can only filter in ways the API developer thought of, specifically blessed.
Don’t get me wrong, it’s amazingly useful. A process that took us 40 seconds of back and forth with GitHub now takes less than one second.
We also open-sourced the GraphQL compiler code that lets us write graph queries: https://github.com/kensho-technologies/graphql-compiler
One the one hand, you need to be flexible. On the other, allowing any query no matter how horrendous can be bad for a public API.
IMO, GraphQL strikes the perfect balance for a public API.
If graphql did require arbitrary filtering it would be useless to us at this point.
[0] https://github.com/apollographql/graphql-anywhere [1] https://github.com/apollographql/apollo-link-state
https://github.com/postgraphql/postgraphql
http://orientdb.com
Ok. I've started to think in graphs. You know. Neo4J, Tinkerpop Gremlin, all that.
Oh, wait. How does that help me create that graph in a sane and meaningful way from a relational database and a number of microservices, especially if all the requests can be ad-hoc graph queries?
Ah, yes. The article (and all other articles on GraphQL) never answer that, do they?
Check out our blog post: https://blog.kensho.com/compiled-graphql-as-a-database-query...
Open-sourced tool: https://github.com/kensho-technologies/graphql-compiler
It's quite an undertaking, increases the surface of bugs and attacks etc.