What does this operator (>>=) mean?


I have meet some code about GraphQL.
Could you tell me what is this operator : >>= ?
Where can I find the document of this operator?
Thank you!

 let execute_request = (ctx, schema, _req, body) =>
   >>= (
     body' => {


There is a similar question here:

you can find answer in this documentation:

is bind operator with this signature:
val ( >>= ): 'a Lwt.t -> ('a -> 'b Lwt.t) -> 'b Lwt.t


And just in case, bind goes by the name of flatMap in a lot of libraries, including Belt.


Note that different modules can redefine the same operator and many do. In this specific case it’s coming from this module: https://ocsigen.org/lwt/5.1.0/api/Lwt.Infix

The Lwt docs actually recommend to use their PPX (syntax extension) instead of operators so dealing with promises looks more like async/await syntax in JavaScript. So your above example would become:

let execute_request = (ctx, schema, _req, body) => {
  let%lwt body = Cohttp_lwt.Body.to_string(body);