Questions tagged [falcor]
Netflix JavaScript library for efficient data fetching.
72
questions
0
votes
1
answer
316
views
Sending set and call requests with Falcor
I've been trying to send set and call-requests with Falcor model from react-client on port 3000 to node.js server which is serving the router on port 3001. The get-request is working without a problem ...
0
votes
1
answer
169
views
Setting request headers with Falcor
The documented way of setting request headers to Falcor HttpDataSource is not working out for me. It might be that I just have a silly mistake somewhere as Falcor is completely new concept for me.
...
0
votes
1
answer
94
views
Falcor - Deep nested references not cached
I'm seeing an problem in Falcor client when I request a route that contain nested references.
Here is an example:
Consider the following JsonGraph response from Falcor server on a model.get call
{
...
1
vote
1
answer
70
views
Falcor - 'get' no longer emits references as leaf values
I've recently upgraded from Falcor 0.x to 1.1.0 (2.x will be the next step)
According to the Falcor migration documentation, when calling model.get references are not emitted as json anymore.
I'm ...
1
vote
1
answer
127
views
Netflix Falcor - When to return pathValues versus jsonGraph from the data source?
In implementing a Falcor data source I am confused as to why sometimes you may return collections of path values:
[{path, value}, {path, value}]
And sometimes you must supply the return value as a ...
0
votes
1
answer
166
views
Combining Multiple Falcor Data Sources into Single Model
Modified the question to explain better:
I have two Falcor models from two different HttpDataSource, like below:
First model (User model):
const user_model = new falcor.Model(
{
source: new ...
0
votes
1
answer
109
views
get() is returning arrays as non-arrays
I have this model:
let model = new falcor.Model({
cache: {
hStudents: {
801: {
FirstName: 'Samuel',
LastName: 'Forbes'
},
...
0
votes
1
answer
122
views
Error while using Request-Promise with Falcor
I am trying to do a Falcor GET call to an external api using Request-Promise (rp) package. I am getting the response in "res" (line no.8) but I am not able to return it to the Falcor model path (line ...
0
votes
1
answer
313
views
Falcor - HTTPDataSource to post Json
Is it possible to post a Json file using the falcor.browser's model? I have used the get method in it. Below is what I require, but it is not working.
<script src="./js/falcor.browser.js"></...
0
votes
1
answer
176
views
Falcor Model with Cache data from External Api
How will the json data sent over from external Api be cached into the Falcor-Model? Also, how to specify in the Model to hit the external Api again if data not present in the cache?
My doubt was ...
0
votes
1
answer
121
views
Falcor Router should return the value from external API
I am new to JavaScript frameworks and currently trying to setup a falcor router calling an external api (for now consider it as an express api app + mango db, hosted at 3000 port).
Now, I am able to ...
0
votes
1
answer
222
views
Node JS - json to jsongraph converter
I need to convert normal JSON to JSON Graph. I tried json-graphify but the "import" statement in it throws an error saying it is not supported now.
0
votes
1
answer
72
views
How to spy on a Falcor Data Model constructor in Jasmine 1
I am trying to mock the constructor returned by require('falcor'); I have two routes and one calls the other route using var dataModel = new falcor({source: this});
Code looks like so
var falcor = ...
0
votes
0
answers
172
views
Issue in Rxjs and webpack
In my project, I am using falcor which happen to have Rxjs as a dependency which has a known problem with webpack.
So far after following what the previous link says everything works fine.
Alongside I ...
2
votes
1
answer
108
views
Using falcor to retrieve the value of a "node" rather than a "leaf"
For example, with the following code, I can retrieve a value for "leaf" c from a Falcor model
var model = new falcor.Model({ cache: { a: { b: { c: 'hi!'}}} })
model.getValue('a.b.c').then(val => ...
0
votes
0
answers
68
views
Inconsistent results in Falcor
I've been looking at the Netflix Falcor demo project, and have modified an example which adds a title, then immediately removes a title. When I run the following code repeatedly though, the last title ...
1
vote
1
answer
206
views
Multiple nesting in Falcor query
I am trying to query a multiple nested object with Falcor. I have an user which has beside other the value follower which itself has properties like name.
I want to query the name of the user and the ...
0
votes
1
answer
122
views
using falcor for a multi parameter request with transient data
I'm having trouble getting my head around how to use Falcor for a particular use case.
Basically I need to take a few fields from a page and execute server side validation business logic. The page ...
1
vote
1
answer
247
views
Optimising a node.js falcor router between a traditional REST API data source and a Falcor client
I have a traditional REST API, that returns data like so:
User list - GET /users.json
users: [
{id: 0, name: "John Smith"},
...
]
Users by Id - GET /users/0.json
user: {
id: 0,
...
7
votes
2
answers
2k
views
What is the role of falcor in a microservice architecture?
Say we have following taxi-hailing application that is composed of loosely coupled microservices:
The example is taken from https://www.nginx.com/blog/introduction-to-microservices/
Each services ...
1
vote
1
answer
74
views
Invalidate Falcor jsonGraph fragment using jsonGraphEnvelope
I'm trying to invalidate a part of my jsonGraph object via the response from the falcor-router after making a CREATE call. I can successfully do so when returning a list of pathValues, similar to ...
0
votes
1
answer
375
views
How does Falcor cache data in the server side?
I understand that in the falcor client side, it caches data in the model. On the application server side, we need to implement falcor routes as data source. Does Falcor cache data in the application ...
1
vote
1
answer
107
views
Falcor returning un-wanted atoms?
I'm doing some experimentation with Falcor (falcor-router), and wondering why it sometimes returns 'atom' values.
For example I'm asking for this path: ['items',{from: 0, to: 100},['name', 'value']]
...
0
votes
1
answer
339
views
Falcor GraphQL in big project
I read a lot of articles about Falcor and GraphQL. And noone can say how they help in big projects! I use Redux + React for a long time (also RESTAPI), can't understand what BIG problem Falcor and ...
2
votes
1
answer
605
views
What is "declarative data loading" in relation to Falcor, GraphQL and Resolver?
I was reading Redux Without Profanity and the author says the following:
The trend towards declarative data loading favours this model, mainly
as this is easier to work with. Newer React ...
1
vote
1
answer
101
views
Does Falcor support internationalization?
I've read through most of the docs, but I can't find any mention of internationalization. Does falcor have a standardized way of supporting internationalization, or is it left to the user to hack in? ...
9
votes
1
answer
1k
views
Falcor with java backend server
I recently started looking into the falcor library from Netflix and trying a proof of concept based on our data.
I have been looking at this library with some interest and although there are tons of ...
1
vote
2
answers
270
views
Reduce number of SQL queries with falcor-router references
Suppose I have two falcor-routes
route: 'users[{ranges}]'
and
route: 'UserById[{integers:ids}]["name","email"]'
whereas users returns references to the UserById-route. If I then fire a query
get('...
3
votes
1
answer
543
views
I need Falcor's `call` method explained; or a good example?
Is there a good detailed explanation or usage example anywhere of Falcor's call method?
I'm struggling to understand Falcor's call method. I understand the first to arguments (functionPath and args), ...
1
vote
2
answers
359
views
How do you invalidate a whole range in Falcor?
Suppose I have a simple system of categories and articles, and there's a path like this to get a list of all the articles in a specific category.
categoriesById[{integers:ids}].articles[{ranges:rows}]...
1
vote
1
answer
414
views
Netflix Falcor: Filters in model's get operation
We are trying to integrate Netflix's Falcor into our system.
How could we retrieve paths based on a filter. For example, if we would like to get Todos that have a done: false value.
JSON Graph ...
2
votes
1
answer
189
views
How to present sort order-by query in Falcor?
Suppose the model is structured as
{
events: [
{
date: '2016-06-01',
name: 'Children Day'
},
{
date: '2016-01-01',
name: 'New Year Day'
...
2
votes
1
answer
421
views
How to structure a multi-parameter search in Falcor
What are the best practices in constructing search paths for Falcor queries?
Here an example from a Staffing domain where a staffing coordinator is trying to staff people for project needs:
A need ...
0
votes
2
answers
96
views
Falcor - Is there a way to iterate a map
So far I have found that we can iterate on arrays using {from: x, to: y}. Is there a way to iterate on a map?
For example, I have the following map:
companyMap: {
61: {
name: ...
1
vote
1
answer
52
views
Getting Season Stats with Falcor
What's the best way to approach getting sport season stats with Falcor and Falcor router?
My data source for a season outputs data that looks like this:
{ id: 'recNMJfs4sqiJshna',
fields: {
...
1
vote
1
answer
148
views
Falcor: How to define a function in falcor's JSON Graph?
I'm very interested in this Modal Layer Library --- Falcor. And I read the official document of Falcor, and in JSON Graph section, a topic of The Abstract JSON Graph Operations, and when it is talking ...
2
votes
1
answer
163
views
Falcor Router Observable
Having trouble using the Observable in my route. The router is not sending the pathValue to the client. What am I doing wrong?
{
route: 'starshipsById[{integers:starshipIds}][{keys:props}]',
...
0
votes
2
answers
185
views
cannot inject falcor in angular app
I am using browserify in my angular app. I read some articles about falcor and decided to test but I have issue injecting it in my app. So I installed falcor via npm and I am trying to inject it like ...
0
votes
1
answer
580
views
Is it suitable to use angular with falcor?
I am just getting familiar with falcor and I intend to use it in my angular project. What worries me is that I cannot see almost any examples of using angular with falcor.
Has anybody used this ...
1
vote
1
answer
271
views
Having trouble getting falcor router to reference data using an external API through sidecar
I have set-up a few Netflix OSS microservices (Eureka, Falcor sidecar) as well as a very basic Falcor set-up in order to test the functionality. I am trying to make a call from the client-side of ...
0
votes
1
answer
144
views
Is it possible to start/stop a Falcor (NodeJS) app through its Sidecar Java Spring service?
I am setting up a test Java Spring environment using Netflix OSS software. Included in this I have the Eureka Discovery server, a basic test microservice and a Sidecar service that connects to a ...
1
vote
1
answer
254
views
Does proper Falcor architecture lead to monolithic routers?
I'm trying to get a grasp of Falcor and the concept behind it.
Having read all I could find about it, I understand that an application should employ a single Model. This Model has a single source, ...
0
votes
1
answer
199
views
Falcor Router not resolving $ref
I've got the following paths defined on my router:
getProjectById[{keys:ids}][{keys:props}]
projects[{ranges:ranges}][{keys:props}]
On client I'm able to successfully retrieve individual projects ...
0
votes
1
answer
108
views
How does Falcor Model handle references to strings?
In Javascript, strings are immutable, and making references to strings is equivalent to copying the string istelf.
In Falcor, I can make references to strings using {$type:"ref", value:[...]}. Falcor ...
1
vote
0
answers
386
views
Falcor and PouchDB working together to provide good developer and user experience
In this interview Nolan Lawson talks a little about how PouchDB relates to GraphQL and Falcor:
I think you're right that all of these projects are in the same family, in the same vein of saying, “...
1
vote
1
answer
264
views
How to lookup a individual item in Falcor
I am having trouble figuring out how to structure routes for retrieving individual records. For example, lets say I have these routes:
itemsById[{integers:itemIds}]["id"]["name"]
userItems[{integers:...
2
votes
1
answer
302
views
falcor: Subscribe to model changes?
Is it possible to subscribe to model changes, i.e. suppose I want to get('todos[0]["completed"]').subscribe(//render function) and after setValue('todos[0]["completed"]', true) model emits new data ...
3
votes
1
answer
2k
views
In Falcor how to work with database?
I am new to falcor data fetching framework. I tried with few example when I request for something like
model.get(["contacts", {0..2}, "name"])
.then(response => {
this.state.list = ...
2
votes
1
answer
1k
views
React Rxjs with Falcor or Relay
I have been playing with ReactiveX for a bit and really like the approach. I have also been following Relay and Falcor for a while and understand the advantages of declarative data fetching.
I have ...
2
votes
1
answer
366
views
Is Falcor suitable for dynamic data applications? [closed]
I went through the online Falcor videos and tutorials and it sounds very interesting. I am trying to determine if this would be a good fit for our application needs. Somewhere in the presentation I ...