feat(pg-pubsub): add option to immediately get a result on listen
Description
Motivation:
Pretty much the same as https://github.com/graphile/graphile-engine/pull/612
subscription MySubscription {
listen(topic: "user:2", immediate: true) {
relatedNodeId
query {
user(id: "2") {
email
}
}
}
}
This allows to get a live view of the user email with id 2. Without the option to immediately trigger the query, this would depend on something triggering a NOTIFY first.
This is a non breaking change that adds a feature, it's off by default.
It seems like the tests only check the generated schema, so I only updated that test and didn't add a new one
Regarding documentation, should I open a PR on https://github.com/graphile/graphile.github.io before this is merged?
Performance impact
This is optional and disabled by default, thus there is no performance impact
Security impact
I can't think of a scenario where this impacts security
Checklist
- [x] My code matches the project's code style and
yarn lint:fixpasses. - [ ] I've added tests for the new feature, and
yarn testpasses. - [ ] I have detailed the new feature in the relevant documentation.
- [ ] I have added this feature to 'Pending' in the
RELEASE_NOTES.mdfile (if one exists). - [ ] If this is a breaking change I've explained why.
reserver's are not good at scouting, they are too heavy: claim body part to move over swamps
maybe your could transform them into claimer if Memory.myRooms.length < Game.gcl.level
https://github.com/TooAngel/screeps/blob/8221c00ae9bc6f0b92d5c480b29767e200d96344/src/role_claimer.js
recycle it for now and see if it can do. I planned to build a mechanism to:
- add to recycle list
- check build queue and fetch usable creep in recycle list, and fetch out some useful creeps to make them work.
- real recycle the useless creeps.
reserver's are not good at scouting, they are too heavy: claim body part to move over swamps
yes it be. it moves really slow...
I thought about it this way.
If a room is controlled, we don't start to reserve it. If it is not controlled and we start to reserve it, it is our room. So we reserve and harvest it. If someone attacks the room, we need to defend it and not just stop harvesting.