profile
viewpoint
Pablo Damnhorns nodkz Kazakhstan https://twitter.com/nodkz Pavel Chertorogov – is my original name for Russian speaking peoples.

graphql-compose/graphql-compose 793

Toolkit for generating complex GraphQL Schemas on Node.js

graphql-compose/graphql-compose-mongoose 455

Mongoose model converter to GraphQL types with resolvers for graphql-compose https://github.com/nodkz/graphql-compose

graphql-compose/graphql-compose-elasticsearch 426

Hide Elastic Search REST API behind GraphQL.

graphql-compose/graphql-compose-examples 123

Live examples of schemas builded with graphql-compose

jbdemonte/mongoose-elasticsearch-xp 83

A mongoose plugin that indexes models into Elasticsearch 2 / 5 / 6 and 7

graphql-rules/graphql-rules 68

GraphQL Rules

graphql-compose/graphql-compose-connection 38

Plugin for TypeComposer (graphql-compose), that adds `connection` resolver.

nodkz/babel-plugin-transform-relay-hot 28

🔥 BabelRelayPlugin with hot reload

graphql-compose/graphql-compose-pagination 27

Plugin for TypeComposer (graphql-compose), that adds `pagination` resolver.

push eventnodkz/wrike-graphql

nodkz

commit sha cb666f585ffc63042d5b247cf35e13fa82e93261

feat: add CRUD for Dependencies & Timeline

view details

push time in 14 hours

push eventnodkz/wrike-graphql

nodkz

commit sha 022bb8ef76457e008d9b2b8c2527229ef2343acf

feat: add folder copy mutations

view details

nodkz

commit sha a2f6eabcb2993b228ed44b7d098350aa3159e732

feat: add CRUD for Comments

view details

push time in 2 days

issue commentgraphql-compose/graphql-compose

Trying to use ApolloFederation..

@MDrooker need minimal repro case with your problem. Without it very difficult to understand what's wrong.

MDrooker

comment created time in 2 days

push eventnodkz/wrike-graphql

nodkz

commit sha 9271c2194dd0d0d6ed03932ba1d1d5f5ae76386a

feat: add crud for Workflow & CustomFields, add rud for Folders

view details

push time in 2 days

push eventgraphql-compose/graphql-compose.github.io

Pavel Chertorogov

commit sha 5b7b5eb458d6aacf90d262b0dcc67f0b816f0479

Deploy website Deploy website version based on 6d01dc802e6b05e988310610fea1cb0471585706

view details

push time in 3 days

release graphql-compose/graphql-compose

v7.16.1

released time in 3 days

created taggraphql-compose/graphql-compose

tagv7.16.1

Toolkit for generating complex GraphQL Schemas on Node.js

created time in 3 days

push eventgraphql-compose/graphql-compose.github.io

Pavel Chertorogov

commit sha 1a3f5268b450b28395dfb65f16f59fb1214e0cd0

Deploy website Deploy website version based on 6d01dc802e6b05e988310610fea1cb0471585706

view details

push time in 3 days

push eventgraphql-compose/graphql-compose

nodkz

commit sha e49aeee554abbde9db5b4b780ed43bc08929bb8c

fix: add typescript definitions for interfaces manipulation in InterfaceTypeComposer

view details

push time in 3 days

push eventgraphql-compose/graphql-compose.github.io

Pavel Chertorogov

commit sha aae53a3f730cb5dd340f2e152e3c6fdeec2e6892

Deploy website Deploy website version based on 6d01dc802e6b05e988310610fea1cb0471585706

view details

push time in 3 days

issue commentgraphql-compose/graphql-compose

Support for adding interfaces to other interfaces

:tada: This issue has been resolved in version 7.16.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

loicmarie

comment created time in 3 days

pull request commentgraphql-compose/graphql-compose

feat: support for adding interfaces to other interfaces

:tada: This PR is included in version 7.16.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

nodkz

comment created time in 3 days

release graphql-compose/graphql-compose

v7.16.0

released time in 3 days

created taggraphql-compose/graphql-compose

tagv7.16.0

Toolkit for generating complex GraphQL Schemas on Node.js

created time in 3 days

push eventgraphql-compose/graphql-compose.github.io

Pavel Chertorogov

commit sha acf58db57ffd1f25635183b8184f8dece09fab75

Deploy website Deploy website version based on 6d01dc802e6b05e988310610fea1cb0471585706

view details

push time in 3 days

push eventgraphql-compose/graphql-compose

nodkz

commit sha eb4a903096b7de2e2f26e8b1ff055bbfc6f85c3d

ci: add compatibility check with graphql 14.2

view details

nodkz

commit sha 1abb2ed71cc8227fadce871fd8dd2a7571626985

ci: install latest graphql at the end of test-prev-vers script

view details

nodkz

commit sha 5b41ef84dc423d75c429fc10e1ea98fe0f920de5

feat: support for adding interfaces to other interfaces

view details

nodkz

commit sha 75f2246e85738f4817fd5c9b6bcabd5b88ff1c69

docs: chamge readme a little bit

view details

push time in 3 days

PR merged graphql-compose/graphql-compose

feat: support for adding interfaces to other interfaces

From GraphQL 15.0.0 Interfaces can now implement other interfaces. So adding the following helper methods to InterfaceTypeComposer:

  • getInterfaces()
  • getInterfacesTypes()
  • setInterfaces()
  • hasInterface()
  • addInterface()
  • addInterfaces()
  • removeInterface()

Closes #251

+250 -18

0 comment

7 changed files

nodkz

pr closed time in 3 days

issue closedgraphql-compose/graphql-compose

Support for adding interfaces to other interfaces

In the latest GraphQL spec release, interfaces can now implement other interfaces. It has been shipped in GraphQL JS 15.0.0 so it should already be available in this repo.

This is a very useful feature when dealing with many deeply nested subsumption relations :+1:

Would it be possible to add ObjectTypeComposer interface methods to InterfaceTypeComposer ? Such as:

  • getInterfaces()
  • getInterfacesTypes()
  • setInterfaces()
  • hasInterface()
  • addInterface()
  • addInterfaces()
  • removeInterface()

closed time in 3 days

loicmarie

push eventgraphql-compose/graphql-compose

nodkz

commit sha b54c8a4206b3d9170e38a472f0be9037e0ca5f03

ci: install latest graphql at the end of test-prev-vers script

view details

nodkz

commit sha 3a793167ed567af6ab4c44ce66f3d1bc6d5839a3

feat: support for adding interfaces to other interfaces

view details

nodkz

commit sha e0a6abe1d70ab3e033f5970dd965cd4409f5e721

docs: chamge readme a little bit

view details

push time in 3 days

PR opened graphql-compose/graphql-compose

feat: support for adding interfaces to other interfaces

From GraphQL 15.0.0 Interfaces can now implement other interfaces. So adding the following helper methods to InterfaceTypeComposer:

  • getInterfaces()
  • getInterfacesTypes()
  • setInterfaces()
  • hasInterface()
  • addInterface()
  • addInterfaces()
  • removeInterface()

Closes #251

+3 -1

0 comment

2 changed files

pr created time in 3 days

create barnchgraphql-compose/graphql-compose

branch : interfaces

created branch time in 3 days

issue commentgraphql-compose/graphql-compose-mongoose

Feature Request: Aggregate lookups for nested relationships

Try to find time in this or next month and add DataLoader to existing Resolvers.

koredefashokun

comment created time in 4 days

issue commentgraphql-compose/graphql-compose

How can i perform some task after mutation

@gvvsriram where did you find info about pre-hook? Please send me a link, I try to add these examples there.

gvvsriram

comment created time in 4 days

issue commentgraphql-compose/graphql-compose

How can i perform some task after mutation

if you use graphql-compose-mongoose

You may get existing Resolver and wrap its resolve method.

UserTC.wrapResolverResolve('createOne', (next) => async (rp) => {
  const doc = await next(rp);
  // any logic after saving document in DB
  return doc;
});

if you create schema in any another way

Just get fieldConfig and wrap its resolve method manually

const fc = schemaComposer.Mutation.getField('create');
const prevResolve = fc.resolve;
fc.resolve = async (source, args, context, info) => {
  const record = await prevResolve(source, args, context, info);
  // any logic after saving
  return record;
};
gvvsriram

comment created time in 4 days

issue commentgraphql-compose/graphql-compose-mongoose

Authorization using wrapResolve

Yep it possible and a solution is very obvious:

function requirePermissions(resolvers: Record<string, Resolver>, ...permissions: Array<string>): Record<string, Resolver> {
    Object.keys(resolvers).forEach((k) => {
        resolvers[k] = resolvers[k].wrapResolve(next => async rp => {
            const username: string = rp.context.req.user.username.toLowerCase();

            const User = await User.findOne({ username: username }).exec();

            if (!User) {
                global.app.logger.warning('Document for user ' + username + ' not found');
                throw new Error('Internal');
            }

            if (!User.checkPermissions(permissions)) {
                global.app.logger.warning('User ' + username + ' attempted actions ' + permissions.join(', ') +  ' with missing permissions');
                error = new Error('Unauthorized');
            }

-             return next(rp);
+             let result = await next(rp);
+             result = changeResultAsYouWishOrThrowError(result);
+             return result;
        });
    });

    return resolvers;
};
Scriptkid2001

comment created time in 4 days

issue commentgraphql-compose/graphql-compose

Support for adding interfaces to other interfaces

Try to add these methods in this month. Or you may add them yourself via Pull Request 😉

loicmarie

comment created time in 4 days

push eventgraphql-compose/graphql-compose-bullmq

intpro

commit sha 1013f4fcc463b3b6011153259a63943ea59a906d

feat: pep up queue, helps to alive broken cron tasks via `...:delay` steam * fix: job name not necessarily * feat: add pepUp queue mutation

view details

push time in 4 days

PR merged graphql-compose/graphql-compose-bullmq

Reviewers
Pep up queue

Fix delay stream: add now() record for stimulate delayed jobs processing.

+100 -0

0 comment

5 changed files

intpro

pr closed time in 4 days

push eventnodkz/mongodb-memory-server

Deployment

commit sha 2974d49aebe35f176af2a20c5e28da563008b34d

v6.6.1

view details

push time in 5 days

created tagnodkz/mongodb-memory-server

tagv6.6.1

Spinning up mongod in memory for fast tests. If you run tests in parallel this lib helps to spin up dedicated mongodb servers for every test file in MacOS, *nix, Windows or CI environments (in most cases with zero-config).

created time in 5 days

release nodkz/mongodb-memory-server

v6.6.1

released time in 5 days

pull request commentnodkz/mongodb-memory-server

Fix #308 - read strict-ssl from npm config

Thanks!

mlev

comment created time in 5 days

push eventnodkz/mongodb-memory-server

mlev

commit sha 3ede8d1dc2e8052ea96acd152847322ff7b3da80

fix: read strict-ssl from npm config (#310) Close #308

view details

push time in 5 days

issue closednodkz/mongodb-memory-server

npm strict-ssl checking doesn't work

<!-- Make sure you read Mastering-Markdown -->

Versions

  • NodeJS: v12.16.3
  • mongodb-memory-server-*: 6.6.0
  • system: MacOS
  • npm: 6.14.4

package: mongo-memory-server

What is the Problem?

I was hitting this issue: https://github.com/nodkz/mongodb-memory-server/issues/162 and saw that it should have been fixed in V6.6.0. But the fix to specify strict-ssl=false doesn't work for me on MacOS.

Do you know why it happens?

After a bit of digging the reasons seems to be (at least on MacOS):

  • The environment variable at runtime is named npm_config_strict_ssl not npm_config_strict-ssl as in the code.
  • When you specify --strict-ssl=false npm does not populate the variable as the string 'false'. It is an empty string. If you specify as true or omit it is set to 'true'.

NOTE: This appears like it could affect other places that pickup npm_config_* variables. e.g. npm_config_https-proxy

closed time in 5 days

mlev

PR merged nodkz/mongodb-memory-server

Fix #308 - read strict-ssl from npm config

<!--

Make sure you have done these steps

  • Make sure you read Mastering-Markdown
  • remove the parts that are not applicable
  • Please have "Allow edits from maintainers" activated -->

Fix for #308 :

  • Read from environment variable npm_config_strict_ssl (i.e. all underscores)
  • Will honour whatever the npm config value is. npm/yarn will set true properties to the string 'true' and false properties to an empty string. The current npm default is true so even without specifying --strict-ssl this will be set to 'true' in environment variables.
+7 -5

1 comment

2 changed files

mlev

pr closed time in 5 days

push eventgraphql-compose/graphql-compose-bullmq

intpro

commit sha 30a90f4c4289abde547e9b836f4cfe046faf2380

fix: job name not necessarily (#12) * fix: job name not necessarily * feat: additional options to repeat Co-authored-by: Boris Dorofeev <bdorofeev@bdorofeev-laptop.corp.ps.kz>

view details

push time in 5 days

PR merged graphql-compose/graphql-compose-bullmq

Reviewers
fix: job name not necessarily

Name in the bullmq is not required, mark as not necessarily.

+16 -1

0 comment

4 changed files

intpro

pr closed time in 5 days

startedagenda/agenda

started time in 5 days

push eventnodkz/wrike-graphql

nodkz

commit sha 077bfa37c5880a8c37e2875cdb903590b74f2d65

refactor: better namings, add relations between entities

view details

push time in 7 days

release graphql-compose/graphql-compose-json

v5.3.0

released time in 7 days

created taggraphql-compose/graphql-compose-json

tagv5.3.0

This is a plugin for graphql-compose, which generates GraphQLTypes from any JSON.

created time in 7 days

push eventgraphql-compose/graphql-compose-json

nodkz

commit sha 99edddbd6841314534a42014301d3c0f0b38c616

feat: allow to pass SchemaComposer's type instances without wrapping them in functions

view details

push time in 7 days

issue commentgraphql-compose/graphql-compose

Trying to use ApolloFederation..

@MDrooker I think you cannot return strings in resolveType method. It contains GraphQL logic and should return graphql objects.

Try addTypeResolver method:

const Content = schemaComposer.createUnionTC({
    name: 'Content',
    types: ['videoContent', 'articleContent', 'podcast'],
});
Content.addTypeResolver('videoContent', () => value.type === 'curatedClip');
Content.addTypeResolver('articleContent', () => value.type === 'publishedArticle');
Content.addTypeResolver('podcast', () => value.type === 'wm.podcast');
MDrooker

comment created time in 7 days

issue commentgraphql-compose/graphql-compose-mongoose

Filtering on an existing field with wrapResolve

It's very strange, we have a lot of places with such logic and it works.

Maybe you have an error in your code? In your example, I see that you provide resolver activeOrders field but query findMany field.

wrapResolve creates a new resolver and keeps the initial resolver unchanged.

TheWillMundy

comment created time in 7 days

issue commentgraphql-compose/graphql-compose-elasticsearch

Question: Does elastic plugin support composeWithDataLoader ?

No. There is no such ready solution. You need to implement DataLoader in some your own way.

graphql-compose-dataloader was written by another person. So try to reimplement it. And if you'll found a working solution, please send PR.

Tnx.

amarflybot18

comment created time in 7 days

issue commentgraphql-compose/graphql-compose-mongoose

Authorization using wrapResolve

@MasterCoder3000 you should not use async & callback simultaneously with mongoose. If you provide a callback, then promise doesn't work.

Try to rewrite your code in such way:

function requirePermissions(resolvers: Record<string, Resolver>, ...permissions: Array<string>): Record<string, Resolver> {
    Object.keys(resolvers).forEach((k) => {
        resolvers[k] = resolvers[k].wrapResolve(next => async rp => {
            const username: string = rp.context.req.user.username.toLowerCase();

            const User = await User.findOne({ username: username }).exec();

            if (!User) {
                global.app.logger.warning('Document for user ' + username + ' not found');
                throw new Error('Internal');
            }

            if (!User.checkPermissions(permissions)) {
                global.app.logger.warning('User ' + username + ' attempted actions ' + permissions.join(', ') +  ' with missing permissions');
                error = new Error('Unauthorized');
            }

            return next(rp);
        });
    });

    return resolvers;
};

MasterCoder3000

comment created time in 7 days

push eventgraphql-compose/graphql-compose-bullmq

intpro

commit sha 6c3a7ecd2623fa99187274d6a896f2a12c2a639a

feat: Queue.jobs add sorting order * feat: add queue delete mutation * fix: clean console.log * refactor: return promis from deleteQueue * fix: remove import * refactor: pipeline for keys del * feat: add remove bulk mutation * fix: add unknown state job * fix: every type * feat: order for jobs query * feat: order for jobs query * fix: no delete by prefix name Co-authored-by: Boris Dorofeev <bdorofeev@bdorofeev-laptop.corp.ps.kz>

view details

push time in 8 days

PR merged graphql-compose/graphql-compose-bullmq

Reviewers
Jobs order

Add order arg to jobs list.

+25 -4

0 comment

3 changed files

intpro

pr closed time in 8 days

push eventnodkz/wrike-graphql

nodkz

commit sha b7b42a849b6924c8320d30f481f2fab156096869

feat: add folderFindMany operation

view details

push time in 8 days

push eventnodkz/wrike-graphql

nodkz

commit sha 50b156b3680a1659037051e76c6eb2f9e9a9769e

feat: add Account operations

view details

push time in 8 days

push eventnodkz/wrike-graphql

nodkz

commit sha 83b825d48236df2a889c86f882c84f40ccbbf0e3

feat: describe Account entity

view details

push time in 8 days

push eventnodkz/wrike-graphql

nodkz

commit sha 9b7269d7c9b2ffbe9390e4cbf4e78eba331976ff

feat: add `Invitation` entity with CRUD operations

view details

push time in 8 days

push eventnodkz/wrike-graphql

nodkz

commit sha ed28fd738990ab10899db482336efe2b66069b38

feat: add `Group` entity with crud operations

view details

push time in 8 days

pull request commentrelay-tools/react-relay-network-modern

Add `skipBatch` to cacheConfig options

:tada: This PR is included in version 4.7.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

ekosz

comment created time in 8 days

issue commentrelay-tools/react-relay-network-modern

batchMiddleware - avoid batching certain query IDs

:tada: This issue has been resolved in version 4.7.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

matt-dalton

comment created time in 8 days

release relay-tools/react-relay-network-modern

v4.7.0

released time in 8 days

created tagrelay-tools/react-relay-network-modern

tagv4.7.0

Relay Modern Network Layer with middlewares — cache, auth, retry, batch, logger, SSR

created time in 8 days

pull request commentrelay-tools/react-relay-network-modern

Add `skipBatch` to cacheConfig options

Thanks 🙏

ekosz

comment created time in 8 days

push eventrelay-tools/react-relay-network-modern

Eric Koslow

commit sha 0a678f69699adc62a36b04ec333dcd5852e0e5e7

feat: add `skipBatch` to cacheConfig options for batchMiddleware (#100) When `cacheConfig.skipBatch` is truthy, we skip batching for that request even when the batchMiddleware is present. This allows users to better control what requests are batched together.

view details

push time in 8 days

PR merged relay-tools/react-relay-network-modern

Add `skipBatch` to cacheConfig options

When cacheConfig.skipBatch is truthy, we skip batching for that request even when the batchMiddleware is present. This allows users to better control what requests are batched together.

Use case:

We have a bunch of QueryRenderers on the page at once. Some of those queries are very fast, but a couple of them are very slow. When they're all batched together those fast queries are now just as slow as the slowest query in the batch. This allows us to skip batching for those very fast queries so that user's get a snappier experience.

Fixes #80

This is my first PR on this project so please let me know what I may have missed or what I can do to further help!

+43 -1

0 comment

4 changed files

ekosz

pr closed time in 8 days

issue closedrelay-tools/react-relay-network-modern

batchMiddleware - avoid batching certain query IDs

There might be a reason why this wasn't included, but it would be nice to be able to pass an array of query IDs into batchMiddleware that we want to fire off separately.

I would think this is a reasonably common use-case. For example, we have a home screen query that we'd like returned as soon as possible so we can show the user data, whereas it's nice for the other screens' queries to be batched up. I've been trying to build my own additional middleware to do this, but haven't succeeded so far.

Is there a reason why this is a bad idea?

closed time in 8 days

matt-dalton

pull request commentnodkz/conf-talks

Update README.md

Спасибо!

endorphin82

comment created time in 8 days

push eventnodkz/conf-talks

endorphin

commit sha df4507213e9d99a789ef944c1e350718e8033d17

Update README.md

view details

push time in 8 days

PR merged nodkz/conf-talks

Update README.md
+1 -1

0 comment

1 changed file

endorphin82

pr closed time in 8 days

push eventgraphql-compose/graphql-compose-bullmq

intpro

commit sha fb2b02cbf3ade7d1048f6485e202f154abbbb2b8

feat: add queue.jobs sorting order ASC, DESC

view details

push time in 8 days

PR merged graphql-compose/graphql-compose-bullmq

Jobs order

Add order for jobs queue.

+24 -3

0 comment

2 changed files

intpro

pr closed time in 8 days

push eventnodkz/wrike-graphql

nodkz

commit sha 16601ddd75a843679eef758223d607ce228343e5

add graphql-voyager

view details

nodkz

commit sha 0ee5f0a1a22d2da35339af6688f0d495ee09814d

feat: add update task mutations

view details

nodkz

commit sha e8e4bdd7f8c29e1ad295781a9c2f471fa9327cc7

feat: add Contacts & Users

view details

push time in 9 days

pull request commentnodkz/mongodb-memory-server

Fix English in the lead paragraph

Thanks!

dandv

comment created time in 9 days

push eventnodkz/mongodb-memory-server

Dan Dascalescu

commit sha fda7febb87204c0dae6a92ec31bd0253384b0480

docs: fix English in the lead paragraph (#307)

view details

push time in 9 days

push eventgraphql-compose/graphql-compose-bullmq

Boris Dorofeev

commit sha ff4c2be95b08a4cbf6da1d729da6a30cc5b3d07f

feat: add queue delete mutation

view details

Boris Dorofeev

commit sha 9e583a6dd0d150999e747a0f90cfb8bab5aa8d2d

fix: clean console.log

view details

Boris Dorofeev

commit sha 4703cee1ba535010a8bdc1cbff5c4d7197d0d489

refactor: return promis from deleteQueue

view details

Boris Dorofeev

commit sha 4ff97d7bd8bff5111ba36dc16fa03d845c5aafc6

fix: remove import

view details

Boris Dorofeev

commit sha 5750e0d424081e737d95a592863d4e6b598fc9f9

refactor: pipeline for keys del

view details

Boris Dorofeev

commit sha c251f2f23a7c42a2f2d2b11847ce7b33c5fbf000

feat: add remove bulk mutation

view details

Boris Dorofeev

commit sha 8e9b126426c3ee5384de2d77b1a2e3a21ecd765c

fix: add unknown state job

view details

Boris Dorofeev

commit sha 80ef7e16e6aea306946fbb6a0629bb493ab9c604

fix: every type

view details

push time in 9 days

PR merged graphql-compose/graphql-compose-bullmq

Reviewers
feat: add queue delete mutation

Add queueDelete mutation: delete multiple keys matching queue prefix+name*, using redis scan + del method.

+144 -2

0 comment

10 changed files

intpro

pr closed time in 9 days

startedBentoumiTech/denox

started time in 9 days

pull request commentgraphql-compose/graphql-compose-mongoose

Pm/add edge type name

:tada: This PR is included in version 7.3.8 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

PeteMac88

comment created time in 11 days

issue commentgraphql-compose/graphql-compose-mongoose

Add edgeTypeName option to connection function

:tada: This issue has been resolved in version 7.3.8 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

PeteMac88

comment created time in 11 days

release graphql-compose/graphql-compose-mongoose

v7.3.8

released time in 11 days

created taggraphql-compose/graphql-compose-mongoose

tagv7.3.8

Mongoose model converter to GraphQL types with resolvers for graphql-compose https://github.com/nodkz/graphql-compose

created time in 11 days

push eventgraphql-compose/graphql-compose-mongoose

Peter Macherey

commit sha 1a6e7d027fdc5ddef9a34a9a3730dd1292e36c96

fix: add `edgeTypeName` param to ConnectionOpts * feat: add edgeTypeName param to ConnectionOpts * chore: update graphql-compose-connection version * fix: allow upper version for graphql-compose-connection * fix: update package.json and yarn.lock

view details

push time in 11 days

issue closedgraphql-compose/graphql-compose-mongoose

Add edgeTypeName option to connection function

Follow up for graphql-compose/graphql-compose-connection#52 . Passing through edgeTypeName option form connection function to prepareConnectionResolver to set custom edge type.

closed time in 11 days

PeteMac88

PR merged graphql-compose/graphql-compose-mongoose

Pm/add edge type name

Closes https://github.com/graphql-compose/graphql-compose-mongoose/issues/220

+18 -6

2 comments

4 changed files

PeteMac88

pr closed time in 11 days

pull request commentgraphql-compose/graphql-compose-mongoose

Pm/add edge type name

I cannot fix optional-dependencies

- "graphql-compose-connection": "6.2.0",
+ "graphql-compose-connection": "^6.2.0",

ERROR: Permission to gastromatic/graphql-compose-mongoose.git denied to nodkz. fatal: Could not read from remote repository.

Please allow installing upper versions.

PeteMac88

comment created time in 11 days

issue commentgraphql-compose/graphql-compose-connection

Option for defining name for edgeType

:tada: This issue has been resolved in version 6.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

PeteMac88

comment created time in 11 days

pull request commentgraphql-compose/graphql-compose-connection

feat: Add possibility to pass name for connection edge type

:tada: This PR is included in version 6.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

PeteMac88

comment created time in 11 days

release graphql-compose/graphql-compose-connection

v6.2.0

released time in 11 days

created taggraphql-compose/graphql-compose-connection

tagv6.2.0

Plugin for TypeComposer (graphql-compose), that adds `connection` resolver.

created time in 11 days

issue commentgraphql-compose/graphql-compose-connection

Option for defining name for edgeType

Sorry. I missed with correct name for commit message.

Now added a new one with feat:. Semantic-release publishes new package automatically with feat:, fix: prefixes.

PeteMac88

comment created time in 11 days

push eventgraphql-compose/graphql-compose-connection

nodkz

commit sha 4f351bbb943978f8885a6101d26a69b8bbdca55a

feat: Add possibility to pass name for connection edge type in https://github.com/graphql-compose/graphql-compose-connection/commit/29269dde58c72333fb853c7037f2cdd58be489aa

view details

push time in 11 days

issue commentgraphql-compose/graphql-compose-connection

Option for defining name for edgeType

@PeteMac88 btw in graphql-compose@7.15.0 were added useful getters which help to write less code:

const UserTC = schemaComposer.createObjectTC(`type User { name: String }`);
schemaComposer.Query.addFields({
   // equivalent to SDL `users: [User!]`
-  users: { type: new ListComposer(new NonNullComposer(UserTC))}
-  users: { type: UserTC.getTypeNonNull().getTypePlural() }
+  users: { type: UserTC.NonNull.List }
});
PeteMac88

comment created time in 11 days

issue commentgraphql-compose/graphql-compose-connection

Option for defining name for edgeType

Geat! Let's improve it.

PeteMac88

comment created time in 11 days

issue closedgraphql-compose/graphql-compose-connection

Option for defining name for edgeType

With the changes we made in https://github.com/graphql-compose/graphql-compose-connection/issues/50 the connection resolver becomes much more flexible. The problem i have now is that thetype name for the edge of the connection resolver is always dereived from the node type

https://github.com/graphql-compose/graphql-compose-connection/blob/d9df62600bd4de0028c7ff0b3e1d8e7cfd67af00/src/types/connectionType.js#L54

I would propose to extend the ComposeWithConnectionOpts with edgeTypeName as followed:

export type ComposeWithConnectionOpts<TContext> = {
  connectionResolverName?: string,
  findResolverName: string,
  countResolverName: string,
  sort: ConnectionSortMapOpts,
  defaultLimit?: ?number,
  edgeTypeName?: string,
  edgeFields?: ObjectTypeComposerFieldConfigMap<any, TContext>,
};

I would also do an additional change to graphql-compose-mongoose to use this new option through the connection function.

Short feedback would be appriciated. Thanks!

closed time in 11 days

PeteMac88

PR merged graphql-compose/graphql-compose-connection

feat: Add possibility to pass name for connection edge type

This PR closes #52 . Gives the possibility to define the name of the edge type by passing it as an option to prepareConnectionResolver.

+20 -4

0 comment

3 changed files

PeteMac88

pr closed time in 11 days

push eventnodkz/wrike-graphql

nodkz

commit sha 1bc919aa8554bc370c5a7f06d3ff7b3e6e8416bc

build: add Debug vscode launch script for server

view details

nodkz

commit sha c1faae43c6bcefdd7d946dcfb9b50a9cba151d84

feat: add task remove operation

view details

push time in 12 days

issue commentgraphql-compose/graphql-compose-mongoose

Authorization using wrapResolve

Try to use rp.beforeQuery here is a small test case: https://github.com/graphql-compose/graphql-compose-mongoose/blob/a880f3eaa9f33f337539d80879157e8b89e92864/src/tests/github_issues/219-test.js

Feel free to extend it as you wish.

MasterCoder3000

comment created time in 12 days

push eventgraphql-compose/graphql-compose-mongoose

nodkz

commit sha a880f3eaa9f33f337539d80879157e8b89e92864

test: add example for `beforeQuery` param Related #219

view details

push time in 12 days

issue commentgraphql-compose/graphql-compose-mongoose

Extend options for creation connection resolver

:tada: This issue has been resolved in version 7.3.7 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

PeteMac88

comment created time in 12 days

pull request commentgraphql-compose/graphql-compose-mongoose

fix(connection): Add customization options to connection resolver

:tada: This PR is included in version 7.3.7 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

PeteMac88

comment created time in 12 days

release graphql-compose/graphql-compose-mongoose

v7.3.7

released time in 12 days

created taggraphql-compose/graphql-compose-mongoose

tagv7.3.7

Mongoose model converter to GraphQL types with resolvers for graphql-compose https://github.com/nodkz/graphql-compose

created time in 12 days

pull request commentgraphql-compose/graphql-compose-mongoose

fix(connection): Add customization options to connection resolver

Thanks!

Don't worry about $FlowFixMe in tests. I the future I want to migrate all codebase on TypeScript. I'm very tired of Flow.

PeteMac88

comment created time in 12 days

push eventgraphql-compose/graphql-compose-mongoose

Peter Macherey

commit sha 843735772fadf6dd7641f1f3a0bcd5f373571609

fix(connection): Add customization options to connection resolver (#218) * Add customization options to connection resolver * fix: flow type checking * chore: add tests Co-authored-by: Michael Beaumont <mjboamail@gmail.com>

view details

push time in 12 days

more