GraphQL ã® startCursor/endCursor 㯠nullable ã§ããã
GraphQL 㧠ãã¼ã¸ãã¼ã·ã§ã³ãå®è£
ããã¨ããRelay GraphQL Cursor Connections Specification ã«åãã¨ã startCursor/endCursor 㯠non-null
ã«ããå¿
è¦ãããã
GraphQL Cursor Connections Specification
PageInfo must contain fields hasPreviousPage and hasNextPage, both of which return non-null booleans. It must also contain fields startCursor and endCursor, both of which return non-null opaque strings.
ãã ãè¦ç´ ã空ã®å ´åã¯æã示ã cursor èªä½åå¨ããªãã®ã§ ââ
ã®ãããªç©ºã®æååãè¿ããã¨ã«ãªãããããã¡ãã£ã¨æ°æã¡æªãã
2019å¹´é ãã startCursor/endCursor 㯠nullable ã«ãã¦ã¯ã©ããã¨ãã issue ãçµã£ã¦è°è«ããã¦ãããã ãã©ãæè¿ã©ãããé²å±ããã£ã¦ nullable ã許容ãããæ§åã ç¾å®çã«ã¯ nullable ã§å®è£ ããã¦ãããã¨ãå¤ãã®ã§ãä»æ§ããã£ã¡ã«å¯ãã¾ããã¿ãããªå 容ã
https://github.com/facebook/relay/pull/2655#pullrequestreview-857972245
It's clear to me that startCursor/endCursor should be nullable, are treated as nullable by Relay, and are generally implemented in the community as nullable. The specification should reflect this de facto reality.
ããã¥ã¡ã³ãèªä½ã¯ã¾ã æ´æ°ããã¦ããªãæ§åã ãã©ããã®ãã¡å¤åæ´æ°ããããã