Add types for all neo4j-graphql.js exports to https://github.com/DefinitelyTyped/DefinitelyTyped
What would you think of using typescript in this repo instead?
I find it very difficult to find my way around in the codebase to solve issues in the recursion, a fully typed codebase would help with that.
What would you think of using typescript in this repo instead?
I find it very difficult to find my way around in the codebase to solve issues in the recursion, a fully typed codebase would help with that.
I'm looking for a fully typed codebase, where do I can found it?
@johnymontana @michaeldgraham is there an estimated deadline to release a declaration file for neo4j-graphql-js?
I can find a changelog for the project, but not a roadmap (the project is also a bit empty). It's a bit unclear what are GRANDstack goals going forward.
Until then, has someone written a .d.ts file that I could plug to my project? That would be very helpful if you could share it, thanks in advance :)
:+1: here as well. I started making a neo4j.d.ts in my own project but unsure how well I will end up typing it, but if it becomes something I will create a pr, in the mean time if some one is faster than me feel free.
edit
Since this will be my first contrib to @types/ as well it might take some time.
For those interested, I've created a "transparency" PR in my fork of DefinitelyTyped, where i would like some input from the contributors on my types, as im not a super user of this project but would like to contribute:
https://github.com/Nopzen/DefinitelyTyped/pull/1
feel free to comment and help out.
Hey @Nopzen, sorry about the newbie question. How should I go about importing your declaration file in my project?
I copied your code to a local neo4j.d.ts file, and in the file importing the library, I added a triple-slash reference to the .d.ts
/// <reference path="./neo4j.d.ts" />
import { neo4jgraphql } from "neo4j-graphql-js";
But that doesn't work. And the error asks me to do exactly what I did :thinking:

This is probably related to the error shown on the declare module "neo4j-graphql-js" { line in the neo4j.d.ts file:
[tsserver 2665] [E] Invalid module name in augmentation. Module 'neo4j-graphql-
js' resolves to an untyped module at '/home/dori/Projects/Work/GOunite-v2/v3/
api_server/node_modules/neo4j-graphql-js/dist/index.js', which cannot be
augmented.
Edit: Fixed after reading this SO thread by moving the import within the declare scope

@AdrienLemaire thanks for helping me with those findings, also this have now been fixed in my latest commit in the PR. instead of just copy pastaing the code i think NPM can install a module directly from github:
https://medium.com/@jonchurch/use-github-branch-as-dependency-in-package-json-5eb609c81f1a then you can just do npm install to get the latest version i do when ever i publish something new, I will try and get around to define some more modules tonight after work.
@johnymontana & @Pruxis would you guys be able to take a look at my PR to see if these kinda types will suit this project, this is my first time I'm typing another open source project:
https://github.com/Nopzen/DefinitelyTyped/pull/1
I've tried to type out whatever that was documented in GRAND Stack API Refs and Graphql.
Feel free to come with feed back,
@AdrienLemaire did you get a chance to use the types?
not really ^^ I unfortunately can't spend much time on my grandstack project
Also, I couldn't figure out how to install the types/neo4j-graphql-js part of your Nopzen/DefinitelyTyped#feature/neo4j-graphql-js fork of @types with npm install.
Maybe the following, but it complains:
$ npm install --save-dev Nopzen/DefinitelyTyped/types/neo4j-graphql-js#feature/neo4j-graphql-js
npm ERR! code ENOLOCAL
npm ERR! Could not install from "Nopzen/DefinitelyTyped/types/neo4j-graphql-js#feature/neo4j-graphql-js" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/dori/.npm/_logs/2020-06-08T04_52_50_019Z-debug.log
@johnymontana - I would really love to hear back from you, if you like these types, and where you would like them to live? some neo4j products the types lives with the project and some it lives in DefinitlyTyped.
I can make PR's against any of the projects, but before doing this I would like some feedback from the owners / authors of the project.
My PR is still open, and a few people have added comments to this, I'm still looking for people to test these types I've added, as im no longer using Neo4j for my graphql project for now :) but if any is still interested in fixing this, I'm still able to help out, but might be a bit delayed in my answers now and then.
Most helpful comment
What would you think of using typescript in this repo instead?
I find it very difficult to find my way around in the codebase to solve issues in the recursion, a fully typed codebase would help with that.