profile
viewpoint
Ivan Kleshnin ivan-kleshnin Paqmind Warsaw, Poland https://paqmind.com Move slow and make things 🐢🐢

ivan-kleshnin/cyclejs-examples 128

CycleJS examples

ivan-kleshnin/frontend-mindmaps 121

Frontend / React Developer Mindmaps for 2020. Roadmaps.

ivan-kleshnin/dataflows 38

Web app dataflows

ivan-kleshnin/html-to-hyperscript 18

Convert HTML to HyperScript

ivan-kleshnin/csp-frp-foundation 16

CSP as FRP foundation. Sketches

ivan-kleshnin/graphql-roadmap 14

GraphQL Developer Roadmap for 2019

ivan-kleshnin/fullstack-roadmap 13

Junior Frontend / React Developer Roadmap for 2020

ivan-kleshnin/kefir.db 10

Reactive state management toolkit based on Kefir

ivan-kleshnin/backends 8

Analysis of approaches to high-level backend development.

ivan-kleshnin/express-passport-react 7

Express + Passport + React. A sandbox to experiment with different auth techniques.

startedivan-kleshnin/frontend-mindmaps

started time in 3 hours

startedpmndrs/react-spring

started time in 18 hours

fork selfrefactor/ra-jsonapi-client

JSON API data provider for react-admin.

fork in 18 hours

fork michaeldgraham/example-projects

Example projects using Modern Web tools

fork in a day

issue commentneo4j-graphql/neo4j-graphql-js

apollo-server-lambda times out when calling assertSchema

Thanks, @michaeldgraham. I've been reading issues in apollo-server-lambda and it may be related to this one: https://github.com/apollographql/apollo-server/issues/398

I'll give it a try during this week and write back here if it worked.

adrianicv

comment created time in a day

startedhonkit/honkit

started time in 2 days

startedivan-kleshnin/frontend-mindmaps

started time in 2 days

issue commentneo4j-graphql/neo4j-graphql-js

apollo-server-lambda times out when calling assertSchema

Hey there, I've tried this out locally - running assetSchema without await and without apollo-server-lambda, and it works, so it may be an issue with something going on in apollo-server-lambda - I'll look into this further~

adrianicv

comment created time in 2 days

issue commentneo4j-graphql/neo4j-graphql-js

Can't access node as one object property in GraphQL using @cypher directive

@CostaFernando @benjamin-rood I can confirm the same problem of not being able to return nested fields (Get the "variable 'undefined' not defined" error). I just needed that for a single query and so, did the required processing on the client side. Definitely not optimal, but it works for this simple case. I am using neo4j-graphql-js@2.14.0 and neo4j-driver@4.0.2. However, since the problem seems to be in the cypher generated by neo4j-graphql.js, I would be very surprised if it was a problem with the driver

@michaeldgraham this is a pretty valid use case, and so, do let us know as soon as it is fixed :smile:

CostaFernando

comment created time in 2 days

startedben-rogerson/twin.macro

started time in 2 days

startedFullHuman/purgecss

started time in 2 days

issue commentneo4j-graphql/neo4j-graphql-js

Can't access node as one object property in GraphQL using @cypher directive

Weird, apparently it is not related with the neo4j-driver, then. @benjamin-rood , do you have some example using this in your application? Maybe I'm doing something wrong.

CostaFernando

comment created time in 2 days

startedboypt/simple-torrent

started time in 2 days

startedkanboard/kanboard

started time in 2 days

issue commentneo4j-graphql/neo4j-graphql-js

Can't access node as one object property in GraphQL using @cypher directive

@CostaFernando I'm on neo4j-driver@4.1.0

CostaFernando

comment created time in 3 days

fork selfrefactor/awesome-javascript

🐢 A collection of awesome browser-side JavaScript libraries, resources and shiny things.

fork in 3 days

startedgoogle/OpenSK

started time in 3 days

startedcdevroe/unmark-chrome

started time in 3 days

created repositoryanuraghazra/rust-particles

Particle System written in rust for learning purposes.

created time in 3 days

startedfirefly-iii/firefly-iii

started time in 3 days

fork kitten/monacode

An es-module wrapper around the monaco editor and prettier

https://monacode.live

fork in 3 days

issue commentneo4j-graphql/neo4j-graphql-js

Can't access node as one object property in GraphQL using @cypher directive

Thank you for the response @benjamin-rood ! I just tried with versions neo4j-graphql-js@2.14.0 and neo4j-graphql-js@2.14.4 and I got the same error.

What version of neo4j-driver are you using? I'm using neo4j-driver@4.1.2. Maybe this could be a source of problem too.

CostaFernando

comment created time in 4 days

issue commentneo4j-graphql/neo4j-graphql-js

Can't access node as one object property in GraphQL using @cypher directive

@CostaFernando Have you tried using an older version of the package?

CostaFernando

comment created time in 4 days

startedharryheman/Modern-HTML-Starter-Template

started time in 4 days

issue commentneo4j-graphql/neo4j-graphql-js

Can't access node as one object property in GraphQL using @cypher directive

@johnymontana , @michaeldgraham . Is there a way that I can help to solve this issue? Maybe a pull request with a correction proposal? Because this is being a big pain for us.

CostaFernando

comment created time in 5 days

fork kitten/ga-lite

Small, cacheable and open version of Google Analytics JS client

fork in 5 days

issue openedneo4j-graphql/neo4j-graphql-js

Wrong generated query when using interfaces

Bug

Hi guys, I want to report what I think it's a bug which is not letting us go forward with our graphql API using your framework.

Our project uses the same version as in the starter project: neo4j-graphql-js 2.17.0

I'm experiencing some troubles with your framework, receiving wrong data in some queries which were working well until I started to use interfaces. After watching the generated cypher queries I figured out that the interface label is generated as variable name instead of generating the variable name of the type which implements the interface.

I tried to reproduce the problem with the grandstack starter project.

Schema

interface Entity {
  name: String!
  descriptions:[DescriptionRel]
}

type Description {
  DescriptionID:ID! 
  description:String
  created_at:Date
  entity: DescriptionRel
}

type DescriptionRel @relation(name: "DESCRIPTION") {
  lang:String
  from: Entity
  to: Description
}


type Business implements Entity {
  businessId: ID!
  address: String
  name: String!
  descriptions:[DescriptionRel]
  city: String
  state: String
  location: Point
  avgStars: Float
    @cypher(
      statement: "MATCH (this)<-[:REVIEWS]-(r:Review) RETURN coalesce(avg(r.stars),0.0)"
    )
  reviews: [Review] @relation(name: "REVIEWS", direction: "IN")
  categories: [Category] @relation(name: "IN_CATEGORY", direction: "OUT")
}

type User {
  userId: ID!
  name: String
  reviews: [Review] @relation(name: "WROTE", direction: "OUT")
  avgStars: Float
    @cypher(
      statement: "MATCH (this)-[:WROTE]->(r:Review) RETURN toFloat(avg(r.stars))"
    )
  numReviews: Int
    @cypher(statement: "MATCH (this)-[:WROTE]->(r:Review) RETURN COUNT(r)")
  recommendations(first: Int = 3): [Business]
    @cypher(
      statement: "MATCH (this)-[:WROTE]->(r:Review)-[:REVIEWS]->(:Business)<-[:REVIEWS]-(:Review)<-[:WROTE]-(:User)-[:WROTE]->(:Review)-[:REVIEWS]->(rec:Business) WHERE NOT EXISTS( (this)-[:WROTE]->(:Review)-[:REVIEWS]->(rec) ) WITH rec, COUNT(*) AS num ORDER BY num DESC LIMIT $first RETURN rec"
    )
}



type Review {
  reviewId: ID!
  stars: Float
  text: String
  date: Date
  business: Business @relation(name: "REVIEWS", direction: "OUT")
  user: User @relation(name: "WROTE", direction: "IN")
}

type Category {
  name: ID!
  businesses: [Business] @relation(name: "IN_CATEGORY", direction: "IN")
}

type RatingCount {
  stars: Float!
  count: Int!
}

type Mutation {
  mergeBusinessCategory(categories: [String!]!, businessId: ID!): Business
    @cypher(
      statement: "MATCH (b:Business {businessId: $businessId}) UNWIND $categories AS cat MERGE (c:Category {name: cat}) MERGE (b)-[:IN_CATEGORY]->(c) RETURN b"
    )
}

type Query {
  userCount: Int! @cypher(statement: "MATCH (u:User) RETURN COUNT(u)")
  ratingsCount: [RatingCount]
    @cypher(
      statement: "MATCH (r:Review) WITH r.stars AS stars, COUNT(*) AS count ORDER BY stars RETURN {stars: stars, count: count}"
    )
}

Graphql Query

After creating this dumm elements

mutation create{
  CreateBusiness(businessId:999999,name:"test"){
    businessId
    name
  }
  CreateDescription(DescriptionID:1,description:"hello world"){
    DescriptionID
    description
  }
  AddDescriptionEntity(from:{name:"test"},to:{DescriptionID:1},data:{lang:"en"}){
    from{
      name
    }
    to{
      DescriptionID
      DescriptionID
    }
    lang
  }
}

This is the query I need to work

query bussiness{
  Business(businessId:999999){
    businessId
    descriptions(filter:{
      OR:[{lang:"de"},
      {Description:{description_not:""}}
      ]
      }){
      lang
      Description{
        description
      }
    }
  }
}

The generated Query

MATCH (`business`:`Business` {businessId:$businessId}) RETURN `business` 
{ .businessId ,

descriptions: [(`business`)-[`business_descriptions_relation`:`DESCRIPTION`]->(:`Description`) WHERE 
(ANY(_OR IN $1_filter.OR WHERE 
(_OR.lang IS NULL OR `business_descriptions_relation`.lang = _OR.lang) AND 
(_OR.Description IS NULL OR ALL(`description` IN 
**[(`entity`)-[`entity_filter_description`]->(`_description`:Description) | `_description`]** WHERE 
(_OR.Description.description_not IS NULL OR NOT `description`.description =  _OR.Description.description_not))))) | 
business_descriptions_relation { 
    .lang ,Description: head([(:`Entity`)-[`business_descriptions_relation`]->(`business_descriptions_Description`:`Description`) | 
    business_descriptions_Description { .DescriptionID , .description }]) }] } AS `business`

I think the part [(`entity`)-[`entity_filter_description`]->(`_description`:Description) | `_description`] is wrong, because:

  1. It retrieves every node from the database which has a connection with every Description
  2. In my real case, I have thousands of nodes which fill this part of the query query, therefore this query doesn't returns what I want
  3. In the part of the query (`entity`) should be generated (`business`) instead.

I tested it myself replacing the entity for the real label and it worked as I expected.

What can I do? Am I missing something here?

Thank for your work and for your help

created time in 5 days

startedpatternfly/patternfly

started time in 5 days

issue commentneo4j-graphql/neo4j-graphql-js

Filtering _Neo4jDateTime within AND, OR condition resulting in "Neo4jError: No such field: formatted"

Happy Thanks giving mate, Yes I just made changes to move to apollo client. The issue is with APOC not this library though from what I found from my neo4j logs

CraigDeverall

comment created time in 5 days

startedreact-hook-form/react-hook-form

started time in 5 days

more