You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mentorship/2021/gsoc/README.md
+47-3Lines changed: 47 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,11 +34,55 @@ As you develop ideas, please add them using this template:
34
34
35
35
Good luck! If you have questions, please reach out to [[email protected]](mailto:[email protected]). You can also find us and ask questions to the mentors in the [#gsoc](https://graphql.slack.com/archives/CUB2DBYTF) channel on the [GraphQL Slack](https://graphql.slack.com). ([get an invite](https://slack-invite.graphql.org))
36
36
37
-
--
37
+
### Make queries/SDL outputed by `graphql-js` compatible with `prettier` (Hard)
38
38
39
-
Please add your ideas here.
39
+
**Make GraphQL.js's print/printSchema functions format their output in way that is prettier compatible**
40
40
41
-
---
41
+
`graphql-js` provide [print](https://github.com/graphql/graphql-js/blob/main/src/language/printer.js)/[printSchema](https://github.com/graphql/graphql-js/blob/main/src/utilities/printSchema.js) functions that output strings in GraphQL language format.
42
+
Currently they are implemented in very simple manner so their output sometimes contains very long string or some other artifacts that look unpleasant.
43
+
[Prettier](https://prettier.io/) becames de facto standard for formatting source code and it has support for GraphQL for years.
44
+
So instead of reinventing the wheel we can make our implementation compatible with prettier.
45
+
Also since prettier already using our `parse` function, as part of this project, we can collaborate with Prettier team to figure out if it possible for them to also use our `print` function.
46
+
47
+
**Expected outcomes**
48
+
49
+
*`print`/`printSchema` functions output is compatible with prettier
50
+
* A lot of new test cases and 100% coverage for `print`/`printSchema` functions
51
+
* Complited research project on switching Prettier to use GraphQL.js's `print` function
52
+
53
+
**Skills required/preferred**
54
+
55
+
* Strong knowledge of JavaScript/TypeScript
56
+
* Experience with GraphQL
57
+
* Experience with writing AST related code (Babel plugings, ESLint rules, etc.)
### Integrate `graphql-relay-js` into `graphql-js`(Medium)
64
+
65
+
**Move source code from `graphql-relay-js` into `graphql-js` repo to ease maintanance burden**
66
+
67
+
Relay style pagination became popular standard in GraphQL world and we provide useful utils to make it easier to implement as part of [graphql/graphql-relay-js](https://github.com/graphql/graphql-relay-js) however maintaining it as separate repo significantly increase maintainance burden.
68
+
Since `graphql-relay` package has zero dependencies (beyound `graphql`) we can easily integrate it into `graphql` package as subfolder.
69
+
Biggest challenge would be to bring migrated code to TS and bring it up to `graphql-js` standards (test coverage, docs, etc.).
70
+
71
+
**Expected outcomes**
72
+
73
+
* All opened issues and PRs on `graphql-relay-js` are triaged and either fixed/closed or transfered to `graphql-js` repository.
74
+
* All source code from [graphql/graphql-relay-js](https://github.com/graphql/graphql-relay-js) moved into [graphql/graphql-js](https://github.com/graphql/graphql-js) and released as part of [graphql]() package on NPM.
75
+
* Migrated code is up to `graphql-js` is converted to TS, passing all checks and validations.
76
+
77
+
**Skills required/preferred**
78
+
79
+
* Strong knowledge of JavaScript/TypeScript
80
+
* Experience with GraphQL and implementing Relay connection specification in particular
0 commit comments