{"_id":"@apollosproject/data-connector-rock","_rev":"633-3cd6fa913cec83e0c4c9be91d1636df9","name":"@apollosproject/data-connector-rock","dist-tags":{"beta":"2.0.0-beta.1","v1":"1.8.0","latest":"2.43.1","next":"3.0.0-canary.36","canary":"2.43.2-canary.16","v2":"2.47.9"},"versions":{"0.8.0-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"0.8.0-alpha.4","_id":"@apollosproject/data-connector-rock@0.8.0-alpha.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"4461af112fc06295034d150bbd7578bf2d71cdb9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.0-alpha.4.tgz","fileCount":57,"integrity":"sha512-9+jngP+KL9XxOb0pz1WyH45J3qMuKxFJrKG5TDxgujYIJcZGWIknWN2UB+iOptZDfEHzRsRwctOGSX8g8TOL8w==","signatures":[{"sig":"MEYCIQD5rgVjardgnD8RvZbf+IqzA0zZuS55d97WlOAJHhMZuAIhAICBGWMix5UZJ26glUtcImHh+dZaCqWFlDEjXZuD8f/i","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":323075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEo5gCRA9TVsSAnZWagAA4cAP/jcYkY0sHgxLcDmGWBDr\nj3Ybafhx3HPqiANmTBB0SkAOrVkybLQLwU3ww4+HKUhyFj5qEppH39jXFquq\nCZf3mxbsIsu0KH3trXYYU2Nh5kPJTFckd0NwrGAR+APPXaxDIQ+UkkhIDa3O\neqjHyBVpMcoL3ctZFXX6gv30HWPflB6LniY5gsFBYR/7utscH/pxWne5ftGX\nQ81uSQyqKn00mKHI7lbSHvDPu5yESKz9pPF5OWq+cJgX+MV0UnrJVPOurUgl\nvCCVsNmzEUwLNbNDnHikaGWy7s0qNYaEKXnXeyEDJTswm7WA5qTUMCXaczCz\nrIxBW1clC0SJyMTAvWGTYpZYzS+POxQ0ZSzK7NtZoOkuoe+N2akuNuScTDcs\nowkyUqDjSeRIG3oA8FJW5tXWSqBuYrJtRky9iw8wWYAnzTCpekCvNPxqNQUF\nqeobSdOb6XW7Dor6BmeDQFsxm+xxgRjlaUQXnDfMUpItVrJ4yRu1+nXkW1+U\nFMCiG3jntslHwwAo8PcUpQbKxZ55CvzaTOmWfL/CwZYbP0hL0ufogN4Gi6/t\n5AOlxWeTuKTOuE8Gt3ISNFsfuy8X3QeDDtfwfh/xIh2ej+gM7H+BHJjcS6Go\nrBRUTeFMH3cevWF02hiAPrMa9f2sVTcqg15xeib5BN7LuhcLJhsHZvBWp4X7\nvdJx\r\n=rYek\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node"},"main":"lib/index.js","gitHead":"375e9a2d747fe4c0b5406681e2db676d60c24227","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"description":"> TODO: description","directories":{},"dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","@apollosproject/data-schema":"^0.8.0-alpha.4","@apollosproject/server-core":"^0.8.0-alpha.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@apollosproject/babel-preset-apollos":"^0.8.0-alpha.4","@apollosproject/apollo-server-env-mock":"^0.8.0-alpha.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.0-alpha.4_1544719968144_0.6629869782979294","host":"s3://npm-registry-packages"}},"0.8.0-alpha.5":{"name":"@apollosproject/data-connector-rock","version":"0.8.0-alpha.5","_id":"@apollosproject/data-connector-rock@0.8.0-alpha.5","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"e5636c5d8bf01722a562b87b21079d2ff8fa65b5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.0-alpha.5.tgz","fileCount":39,"integrity":"sha512-yO+BAO8O1w/FnLoXctQjg/vrhobEYxK/B2Mg4GXoHGhM9BiobUQ+HyAo7eUVthil7zdfftUm/Cr83YmDabL7rA==","signatures":[{"sig":"MEYCIQDUHFbUN8vPqPmOdEkbM9U4tkvul8AFHoUCN95IgKac1QIhAKBUfmP1tb8+umEegL0/ibJ9R26BSh9CN3qeNbJ8mgfX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcE/LMCRA9TVsSAnZWagAAKIMQAJpbc5TluNbVdhcdTDYS\nQKJxEUiM/2ILLczC2wlOp8MnmNM+o7jh2H5saJHkoRpOBDD9jDD5MRlXp8yV\njTvXH5eiL6uxEgrOZYFL+jpUCyI3RJHG9A09SnN7Y76G/fCOSKCrzA6TG8Ny\n0LqJcIlf8EBLvV9roBPNF2II0qubAnsnDjhztwxUQUY7TP9JMnKCyxeCm04V\n7+W5PMEB4qH8+QUN018cPOXceu31bu/4vBeMGZLytMLefAbh4NeiTJsiKoic\nFXXluNJ+ZI9t1zIR0XtTKdj/wYkf04ap0HZUr+SzqnGDxc/jYd1XFhhhpuMA\n5PdAt9ObjQve6Lw+1ujQfLpFF4AF271YLEnoWHOE2oqNvBkg1tjXdyCEeGdI\nwW0kR51haEcDVxm6UqwTEaEMhWq8rh6F9cjf6BVsOqHeRgy/7ebDsH6o85FZ\nkxUTWe1NKO5QoqaMCHg8tk5D/a/zDeJGRvg14+DQRpu12cx/TrQNyQzJ3Li/\nS58GpJEHopZru05WFAV0Ox6y3NoIyDNcLS+DSFg2EBKe9iF4oV/FQksoRcha\nqkUQqzql7Zbqngruuh15z/RyUpnPADecqSpMhPIBNIJi/3Dnp6YbYl+Ng/rR\nYTDUtUXYKsRTdQY08uK1w7G1zHyuK2o3YNLQE2k4IsFcZhW3SBvSJDRHbByo\nqVT9\r\n=xZ3L\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node"},"main":"lib/index.js","gitHead":"e303a0b024a7026ecf7f04dfef9b61cfaad85e87","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"description":"> TODO: description","directories":{},"dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","@apollosproject/data-schema":"^0.8.0-alpha.5","@apollosproject/server-core":"^0.8.0-alpha.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@apollosproject/babel-preset-apollos":"^0.8.0-alpha.5","@apollosproject/apollo-server-env-mock":"^0.8.0-alpha.5"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.0-alpha.5_1544811211822_0.9380940097186037","host":"s3://npm-registry-packages"}},"0.8.0-alpha.6":{"name":"@apollosproject/data-connector-rock","version":"0.8.0-alpha.6","_id":"@apollosproject/data-connector-rock@0.8.0-alpha.6","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"32495c91f4c4c8bc8320a864ee74efe363cb74a3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.0-alpha.6.tgz","fileCount":39,"integrity":"sha512-U+8pwr1sjZloWJcWTeK4n5DKtpJkn5G4VYZ/IHYkl2ygDr+WTneFKX2qN5Tc1WE8bXWa3CFzPHPf/wx/P+dLkA==","signatures":[{"sig":"MEQCIFSNU1ze7LRkgK8pGQkRhBZCcu6z63DvWQwTEVLrGOS1AiBrfvgKAHSJooiPcdRjtLlrXXqupR/sJRYCnK/TYslfQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":334298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcG7SdCRA9TVsSAnZWagAAKG8QAIteNfcR6lPQs3y134b5\nwvC8sNF8iayw6nkxrakA9In8tMLzwBP8VF+QMa2ojLoFNFy2BsFoH4PLA6E9\nyHqJ1IHbmBzX7z96P5gVodOUcvB+of5S7SWYZL2UBx7H56vcSm43RMmdZMhI\nItRNTeMkRX/8gjNESX3c+GQw61rRJEf13F9EOZRv265UqduatMY8uX7/02lt\nlP3HZzPLyNgckeX2dgHmxqnHEVN//9DMbbT9YkULyUTbjFEzwIAl5CFE5Pmx\nU42DMXSQZZTlnNlZmB6OUUI3QvO2VYoMotHWoH6fT9hOU+wQEOfcn1wdyL2/\nhSUbJIeGmjkXnL+nxp3WS4ED/0yiEKi7v8ZiDOzLmJlpqRXQ4wctAi4hZsB1\n+LTQeWaBcbWRiAhntCvoks/hhEWiqDu6pXVeE7Ze/YKZfq5V4i53DDiaFYzs\nHEXYSE8DwumOJ2EQHhq16CFFRROSbpogxVhJeUyn6b0R8afeJFShrkeF8V6M\n9apXUzoTM6SWUkN/Rqp6bbPeDI6gGBv3dX4ZmXcYSmnZVr+a66BiJ9qELxP5\nK8m3HBgaPFdYnN5HiR2zIhDibXv2gbu5hFQaNVp018C/effxhy5bLpQOF+Vb\nhgBwKUjASsM1Mejgove9OyHZxP+UC0NxkoGH8lc1lBF12RCrHdBHIQOj2jbz\n/Lry\r\n=D0FY\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node"},"main":"lib/index.js","gitHead":"4886f964f517df32bf13bd751f17dc28bebf9610","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"description":"> TODO: description","directories":{},"dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","@apollosproject/data-schema":"^0.8.0-alpha.6","@apollosproject/server-core":"^0.8.0-alpha.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@apollosproject/babel-preset-apollos":"^0.8.0-alpha.6","@apollosproject/apollo-server-env-mock":"^0.8.0-alpha.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.0-alpha.6_1545319581192_0.7687387300695956","host":"s3://npm-registry-packages"}},"0.8.0-alpha.7":{"name":"@apollosproject/data-connector-rock","version":"0.8.0-alpha.7","_id":"@apollosproject/data-connector-rock@0.8.0-alpha.7","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"d7641f71af649c539d93d12ac4b87c98fe70b73d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.0-alpha.7.tgz","fileCount":42,"integrity":"sha512-M5GTybzrfukAD4xk9/C1KUiqLdtPYldi7w0jgYH1d5eOXADtG4YrvmXKbFceU4i/Hlxf3bzYOyquJESr+evC4A==","signatures":[{"sig":"MEUCIQCHaoPJ81mqW4Dmz4+h+KKbW04pUsyZltVbWitrfIBaIwIgbl3/8V7BRhuoCGe1tGKKw03Q1x7SNcn+ClbDj2H8caA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":349572,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQfuMCRA9TVsSAnZWagAA2e8P/2kUom98apfe3+cnbZ3x\nfT76Pfmb6JtmuWLjUHL86thl9UCyZY4PyE4KABin6TOVkI+MD6y0NV7F8iXI\nfUTBLiBf+b7eFthBRTKEBRdH7ObJZ05fqGbiCf5GFvRklwDuSnIE5qAkwEGd\nsmm2URifIWVLwgT7GUltdJXYC6xn7nZnhdG9XPVATCjnuXUe6fRZi6mM1Hyk\n7gISF6KFGiWOdePy7y/GlYMKVUcV8XmahcbqM7YRFujMKZTwrT78Wb409+F1\n3tcSFy3vSs3q8rDuiQVQ+sF25N0zV70c4lpgmft61VDwUSC//uSJx+eJB9t4\nO9v7POOOew5FE/GdvkdwL89usD9r3r8SAWQhCgTIwvhgHxy93y23cjFMLwF0\nWaBaKyqvplykGYiFy5N79Yo9h9PV/KB1m5ssShoRnX0E6+BA06RwnAncqnze\nnHQRXXM7TZLQ6JWtcBnZz38vkyksz+NjAxCFgC51+8MglRh103L19goL/9YU\nToEekDTurMus/qtUOiVPEZeFRQDnQFvin1d5d1J/8td0mSMqeK+05w+BbMka\n3ECmpl4WGXwsyKzCtpUsh9n2i+Q2OHRXzLHppAlLvn0fi+BrLJVfGn31LeUL\ntFs2MIzasqMSlNTveOxirinlcsNyCIJaLAmi4Ph1oCB2q/vqOxxiKB5IdaAc\ne7qH\r\n=1CO3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node"},"main":"lib/index.js","gitHead":"234ae2007ba55de13ae55d5ce485fb562f7cd6ff","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"description":"> TODO: description","directories":{},"dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","@apollosproject/data-schema":"^0.8.0-alpha.7","@apollosproject/server-core":"^0.8.0-alpha.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@apollosproject/babel-preset-apollos":"^0.8.0-alpha.7","@apollosproject/apollo-server-env-mock":"^0.8.0-alpha.7"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.0-alpha.7_1547828107776_0.5859946732462233","host":"s3://npm-registry-packages"}},"0.8.0-alpha.9":{"name":"@apollosproject/data-connector-rock","version":"0.8.0-alpha.9","_id":"@apollosproject/data-connector-rock@0.8.0-alpha.9","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9ba5c2a228b3cd9aa66b6f305c402f334c453e7b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.0-alpha.9.tgz","fileCount":57,"integrity":"sha512-LWAXq3kmhbobJz+mq3kKIkPhS9ezrqvJG5T3yzcDKlzhOnGBx2FArkI3tAL7OnYg8+8GKj2DwQPjzGDiwqmmDg==","signatures":[{"sig":"MEUCIBNLbJQymZ/ZNjLXLEb0XofTjqzAVbTU4MiG7knGsDdNAiEAiDcYQMZqBzUZyDCdypnCmcI2fpCobLawkFlUxrtVAf0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":449560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcd/E5CRA9TVsSAnZWagAAJUsP/0613Q//lPAJX1x3Ku2H\nry6iA/rjqOEh1SJa7KQM+VPhovD05tb2lpss/+0qKp1ttyfQRiB4KhY7A5PG\n4gEoGaYJB0bP/UjES8VMDa0P18fk0N5llbLcB+8KN1JGxULZ2cbxylozXjf3\n8HS9OeR3h1388mupqgXiVK+biRojW2JuxUXWA1wy3Hg1IZFcSLFunwSQwMdj\nhjJlq5wgcyra+XDA4O+/ihKdyroRwYpyE241IMsFZ9o+S03r/Hdp/1HgOLAt\n8m9W05bmsnFe3uROWbuaSJswZZ2DRztU6WC8YKklYvkCuNrJzSoLRB7C6hDO\nQO3fbAEVQJbxAkj2D7uZREHLIa94PgWm94Kkm5kIUdPFWcr+heWTZNkl7DRK\n72Sh+egcAD/HHSah9O4avQu3ZkKTtckQlMo9HBqCnRlL/pAEF/SYMI9Z5uNA\n/trQqbt5Yx8IlmQIYKLzcf4UBROjSYuFMg/Kh8eicOh6YVgPR2rhUhs1Famo\n19veRRMi+PmPrlkjs06t2bGnk+Yi1L7lMaqYIXVUm7yHg9EPQvFgC/rpe6yw\nqdpySUMtcy9e4xiWDLkRRZMcP8T5hhDBXNi3FXmp1ejUPDx/BMVR1SlQ7tDX\ncJ5h3NE7gpqygWD5JY3XWvNNUW2cegNkDrOag5CR4OQOlzsdo4tu1Tydc+G7\nwiZ8\r\n=NAxB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"a2236fbd6465e55720e9dd59edefaaaaba44ebec","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"description":"Provides a connector to Rock for the following parts of the app","directories":{},"dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.0-alpha.9","@apollosproject/server-core":"^0.8.0-alpha.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@apollosproject/babel-preset-apollos":"^0.8.0-alpha.9","@apollosproject/apollo-server-env-mock":"^0.8.0-alpha.9"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.0-alpha.9_1551364408990_0.36674946997812086","host":"s3://npm-registry-packages"}},"0.8.0":{"name":"@apollosproject/data-connector-rock","version":"0.8.0","_id":"@apollosproject/data-connector-rock@0.8.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"20b55ad1775e5e60a29766cf64537c430e61d675","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.0.tgz","fileCount":52,"integrity":"sha512-icFNyKNCYrGLlbT7nIT9vjdRy4n1luFrfIKjNTq1PV1AmvfQ/4VN8OcxliSsPZRCSO5z1Cc4fwvSPs7m4832Tg==","signatures":[{"sig":"MEUCIGmmwRVha2TX9Sjq6gMfkL3KzE9kbO8etv9dvbqZykCbAiEA6qCBuzF+jX6aswmkw+jFlHdQqSTrBa+5/fKT0fdYNGI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":467696,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgE4SCRA9TVsSAnZWagAAsK8P/jfcaY4ZII8gXTdRyoI5\n6h40hqGvZVmmFZ+HI7bgQH4FQcnA6QWv8WCEsvlD84Noyq60Yc0wIqAQibjM\nagtNydbPYDupYPAVAZ8PYZ05YgeadRF0b8maS7qLCFDg9w0eaXgDTE/WbRHq\n0an7U0rtLCoiaxUzv7vgr+DDYtI3i4m+Kz8wSjkEbAgw+oLd0lunoI7c4ah5\nhzdi4qk5fhTF4wEcwDNNVFpWtNWfCrwRs6qoo4GF4zCg/wxu8CFXfjJRiwJb\nA2vqRnwz+Htw/fvQjuLMJpHi7F4a1aoMtshu7pdEpiOphGaHWX+oXLb+U2wE\n3/qoRnIoQlIH/A9O0W/YWdYPUEYeenHDUrBXZV1k//dWNONlN+11eiWkn0V/\nD1ixoAfv7lXjXbOn+zdV4CzHdJavJFP4bVH6JKKptC5tlQSprdBqs+p2c69Q\nzIQoFkpG1L75lu8bDi9Yi7HULyp8yvOWfSMazTsRuqRL9H4y2X6mXLkZTJq7\nh3bIDu0iF3v1zwSv/pJNwU1VTIQXhvm9+NlYy6vqnaDODZGHU70KDwGqeN9n\nho9PNDko/jYx+jDrVhUvwX4LNyzDL3cQSzJL23H9uVvDgjnGXEwFZKY5+Gkl\nLiY0Wgr4sVxydrBGlmkurr/GmlOfUAHgOGzQWovua3UqWp7jUhIh3OimNCP2\nfmAd\r\n=dgYJ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"9df4a45566b67d0e5f0628f04d4085e736cabe93","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"description":"Provides a connector to Rock for the following parts of the app","directories":{},"dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.0","@apollosproject/server-core":"^0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@apollosproject/babel-preset-apollos":"^0.8.0","@apollosproject/apollo-server-env-mock":"^0.8.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.0_1551912465827_0.6115496596993735","host":"s3://npm-registry-packages"}},"0.8.1":{"name":"@apollosproject/data-connector-rock","version":"0.8.1","_id":"@apollosproject/data-connector-rock@0.8.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"413f866d03492a60d0792b14e07c80f469ebacd6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.1.tgz","fileCount":52,"integrity":"sha512-1l5g5Hc8y3omxRQX9pINAwXLtpblKh5r5iWMSd1y15EXvlBuFl8U7ZNzgGJjafH+l6RRMqCxrrY5h2RNPm2Amw==","signatures":[{"sig":"MEQCICk3bMLRhzGPh7qvm0L/d0JVdoBp2DLGZmhZbtWNsqL5AiBk4DL6vmr/YEGTBntThp5yJzw491tvQR1j7MG1P+9Dxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":495598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmW/5CRA9TVsSAnZWagAA5C0P/1IXG5CiiZAOcV6x0oQZ\nZQs6HUsRTJG2Z/LlvKkgM23gfe4rUVpPh+a+pU3RLe3f0anLHkVhOaQjTR+P\nWnEogCcT1P1Fa8+I43Z+FYBR2O1CQP147TO+cNmtfvL81V38k7jGWZ/WKK7d\n/ub7b0/aVDU5V62T8He81j7UTY1AuV7fVWE+2hBE3C2iymMPTKNJ0MVUK6R3\nqdUBPsJKppGEq4FcI66YhqjLwlxmqZ7u+ls86Kb6fAFmdQu50eJYqbjWXiW9\n5RbbaxRBWSLnxLPak3ckjLpJJ9sqpKwHDH5lINviI6vbs9L3y1Rd0wISH/p/\nN2nro6533Up9i2cVQ+tkzQr0xtVa3QF4OgKUkzSWfLyCshHOZZ6kvpLwceR/\n/5iW55XVOqEmgldBG5tZR3xNVHwBt2wH2AnZPZoIXlIoX+n4lFXe+5zT7VDp\nvIV+mG1JfzqxkXNhEzY5yN4jVtNNKKkXerZBTfsXq93h1Tduj6g1Qmq03T3W\nSf4DxyLO4870fZ7v6wAx+8YiNC28CJnP/VeON1Q0pWtRHYnRKHA1e5A3qfJD\nCkElEWLiaDZTjs+nBrRfowKhbWYDi5OoY2g3kyRylhw9vGB7nQGWJ4FA9Xr7\nMUzkd/VHDZONmM4qGkQDPD+94IrrVndxnUgKaQxJYI6zszmRWYF+7PbW6QZE\nCBiA\r\n=xh6x\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"4752e5ad106d4abd42550ba949ca7137ae82d1cc","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.13.1/node@v8.13.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.13.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.1","@apollosproject/server-core":"^0.8.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.1","@apollosproject/apollo-server-env-mock":"^0.8.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.1_1553559544559_0.15734093147419337","host":"s3://npm-registry-packages"}},"0.8.2":{"name":"@apollosproject/data-connector-rock","version":"0.8.2","_id":"@apollosproject/data-connector-rock@0.8.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"141eaafeefe28f46c8e60c332593e7041ccd603b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.2.tgz","fileCount":52,"integrity":"sha512-zmLD6Mum3mxO/YYlXp+VhwGjuSjrevjxyXumHBsRU2q3/Uk/bqq+7NTpcn/dHKcr+IK1Cc/pjMFRs23suKmqWw==","signatures":[{"sig":"MEYCIQC0Kqgnm3c07W2l1WFSoOxyBIZMnDYtpcueE4zwqTRHqgIhANL9GyFqjGpwVFyVQAhiyf3GEb9alP/ZQ6d48GgCg+HG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":495743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJct40iCRA9TVsSAnZWagAANXAP/2wn+qTVAsnxJhzO4mlP\n/6pjTmR85iCIuHfa2nY/qX31DbLuQ85OEHk0wX7+4no49JPzfUGNqJ3U8ZjS\no9RJOs/473BWLRlSRdrqJqWpk5gMEyi9YpSdUSZULEF2feM1zNOO6k413Upb\nQZRRd1791avgaeZt1mkjD0mJJzUg5Z8oIQNMzbtMz+fY35kxRpE/BE5JXqPM\nygkSgdABptuuwGoAHGq1eBr0ytUrmiQb6rjWCWijGFtROjdBrcMhWpL2/z/W\nvZABhk8azrqKOl9AILnWSkSdyHHLhLQA+CZFzxKp4N8egI3bb0bW1kGG0iSb\nNVJRjDRhrjl3xoB1Zsr0W01MF2LsiEP0/X0dn6ytcSyoT65G+lzrCi5/z2wH\nHGBLE8wseTeuCzIuigTjOFydGTAqtpyOVtyerA8kqJ1P3TcePokZpHESR3pU\nFaD2wWjK4COGsevCEiaVAIurZF7KLTGJEPIfBMg4U4IKJmI1Es5frmvIJBdc\nHciZEFzO0Y28BolDkM1P6OYRAon1itjLh5c4yBv6tL2WZeqKEyHwupKWv+ub\nNMEJZvRJFk1fpdAmz7R4x2xln4KPuG4I0MWw469umoEM7MwFp7VR63Q5+nYa\nb8dwZNr5PiQu/g0JUc/KVsp/gwDxTkZ9tOjPy6/xir42eYD4mSD8ylwSHiab\nl2/4\r\n=KTEa\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"fcd85198655621350fa13477e305455f05498b74","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"conrad_vanl","email":"hi@convan.me"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.2","@apollosproject/server-core":"^0.8.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.2","@apollosproject/apollo-server-env-mock":"^0.8.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.2_1555533089780_0.9586250457960248","host":"s3://npm-registry-packages"}},"0.8.3":{"name":"@apollosproject/data-connector-rock","version":"0.8.3","_id":"@apollosproject/data-connector-rock@0.8.3","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9e9cb6b01e0a14bfeca0050bfd6990f56648376a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.3.tgz","fileCount":52,"integrity":"sha512-nRExFEQQh1n6gFs+L502GYYF5XJU1CwJoksztp0XBWcMX2aCx/3CckUgUVbF/SV83kuDbzgywg9BiayVvbUsnw==","signatures":[{"sig":"MEQCIBfP/UPR2aTuTbEujhPpQ98h/YyB812B3JItSgdVMKJRAiBVx2t1P7f/J4kZN0KVggyO1n68JrggWJbY5f0xaTK4og==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":495743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwiP4CRA9TVsSAnZWagAA+h0P/0wBBwROkXsyD3RaHSso\nTjfuYrZpXO2jTwfPRDU0xINiaBAjpNMtmhaIFiDLQ4I9d1M62DNDAO351oHG\nAE5mwnTvZK1aHhhXn0Xb6VCMFm2fkrAL+LT42KSzdfr1MOVMqcm3JYm0yZi5\nb5fgTsC1jyA1Mrx5MjC2P+YMEWoK6YaL4EJDj+Qx5Q+yPdyor/hPodE9v4ht\nWFUwrAhpttW3uXAWJn6SB+XRoRe22hlb8zgPieUVqM90ZmLGRFUgteolTkYe\nLzWn8t9QfQ2R/uAry3kL2BN478eUNtWX1FH+RJRvQRKThYhDzuT7Kt7TW1pV\nCEpuhQ36Uu3Oe1wheJ42x3pxuy07V7ZRx/A9yJKD64PPVfYcOor+pcwQCMz+\n1qE7PtggCllmPWsL0VR3vL9hVYEKGTksWElL4JEfVNWdFdDRZHv66mIMdwO4\n1vvSMoogFTeHboCx6C57scz0+VjgiwGNAaRhDEJYdHHHBowRP7L5gW6xDrfF\nT3h5HaB3Vk++7PNOMOYHBihVzVQlDsYABiOeqfy60QKAzZQcAu/0cGKEN4Ur\nNbfnk+G1+PcUifAIXi15myvGeUq5dWrB31zIdOewO/im9ovGfXO1VMfkY1aD\n4sRD//igUF8XxPp/0u+x/YS07Cld4u7XfAsMLVVAU3M8Iy5yAHSiyn76ZneH\nljq5\r\n=EApS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"b39bb40bf5244192a997f70ce79114321679b632","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.3","@apollosproject/server-core":"^0.8.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.3","@apollosproject/apollo-server-env-mock":"^0.8.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.3_1556227063644_0.2938806384559922","host":"s3://npm-registry-packages"}},"0.8.4":{"name":"@apollosproject/data-connector-rock","version":"0.8.4","_id":"@apollosproject/data-connector-rock@0.8.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"fb0ca793df475f1d4f6ab9cf5cf513882ea57c41","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.4.tgz","fileCount":52,"integrity":"sha512-JQ4Hga/GV8xjp8K2L0rr3/pz4lkvVJFJtxGx+mn1jJ9u2YPbQ/mN+bwBJUFTfmtc1EdnG2CS6tm/4VOUStmynA==","signatures":[{"sig":"MEYCIQCedDXRUVrKqFjEZRAARMDURyDqjzMabeFCy+Kw5e+6uwIhAMHD9Gw9Aeexz55prsbRrhPPwI18qJYZoKJfv7OkCK+A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":499727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcy1kwCRA9TVsSAnZWagAAmyEP/RpFYBgwqNNx9cKd97Oq\n5ixzDqrf3WhMFSsBpIvrfmSCiVZbg8TFedwtdmPY9UkOxd0E2LJ+pY+2mMQ4\nUyN0c9yj6Gy7WyUfTTZgCMaFfxteZNEdJTUVvsUSqWfaqIZOKBr9SR+gk1tG\nDBIYTQjg2Zf9NIjX6jd+kwJ9/zZHg1kb3Tn7GNfAAL1WEvEDUyJKkEIIXwDo\njXDpg+AVHnNb8Kj4u0+andS+Hlzvr6nRpof+OUf32pvbpdi+OvAyN95hn7jK\n0AQws8uq/8Ti/54uj2+VYJQAW/g/ZxlKcOGnBLu7dSrqbJK/Cc1Db/zvZ7QZ\nfKioj6IOvuVbZ6pmANmzi/xo9sYbbNwcaRyqDE4L92rPto0qhvvaVZrHN+bI\nd1B7dYyfzXLyy5P2mYdkXxDuSuF4TtlObI3/h5TDPJJNwnVLcNxi1OhXh15J\nUhgfdC/IkgX69SUBNXZFRciZ4LG2dOj9/fagJWjLOotDKFIrhh2w+Mcu6Eko\nJNj6pQUYRy4sXatMzfUD3TsOVFoDDjJXpoqBLUaeF5vd3uZFlV0l1ruVCIkb\niEh8412oH2FSCuBH1z9EPbRd0v9uW3TBUmXCeETdodXBFCjLNFEUZWF1p20T\nxsgOFU8IQ6/tm9rK8nPMSpPsRCyzjkXYFEHOWXcuCgeIV1ZewWQN0+dCsnAw\n+yF6\r\n=QZTa\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"5fe0ab98727f89c7c252ab587eb255c43c851d57","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.13.1/node@v8.13.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.13.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.4","@apollosproject/server-core":"^0.8.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.4","@apollosproject/apollo-server-env-mock":"^0.8.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.4_1556830512167_0.216473255685659","host":"s3://npm-registry-packages"}},"0.8.5":{"name":"@apollosproject/data-connector-rock","version":"0.8.5","_id":"@apollosproject/data-connector-rock@0.8.5","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"bec7c3db335b0eafe30e44568f8fd0a0b5866cc0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.5.tgz","fileCount":52,"integrity":"sha512-t7zBs27oUBGbMHRtcSf7Q2OTlPJ5E3mkIDvLDUlY/Rp/laAg7K2kPyieGfxq9DC5+cHZ9I6ryfO9dfFd6XgjBg==","signatures":[{"sig":"MEYCIQCHQSfvRnSZRjazCfEpKZOCgSZP/vcy640RzwlheAkzVwIhAIvM3I8DBckpjQ+tkwofw+MC4gUXjRQHD4xBl3em17d4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":500168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0wwbCRA9TVsSAnZWagAAadoP/RXcod2CmHI5prDzaLbo\nBaMAV6Mgh8IbuO9O6AuLsWm9kZevXQO5YhmjxEIlbBgjGSB5CBki4I+Fcx0V\nWAmah7s8L4pJUfvuw0GOS1JYSnOrtJe941m8jwsi6DjbfyIEdnMXd0jeEFn5\n3PIqswDMZhN6V8H66mUdFexBxMkHwLOCIKxsXcntAm33C2fF9GtvoZgaCr0+\newgoEscw74v6rVydzAVvZiWhrotMUBBc29MDx7XDm712hJ97tdGoxA+9xftj\nRAwT1vPxPi9/kbnS258uRpSyG6ciQ0Wb0ORg7inqmKsm+lIXn0amYHBP1e/g\nAa/JSvKzQc6Vgrea9wrXNrNxfJngbmALbgBdAwKqWp4gTJuGT4jRYXT3Spcy\ny5aS1nJv0gmkRGkcNS15VhMub4HEHcEHF8hmzec+dZW43m1NsTF54tN0UgV7\nWT6geMPfY4o8as13CmXr+olgL3cRNqIjttWHDImAN0Pg90uWhGZO/IgivA7E\nzo7d0/ngeMg8dhqwWbyi9PzE1wK14Vh5BY+HoPdAD1gzf84RgXcYAfIv8w2s\nY7vq/JPZ7khKNFpxTn0H4PBSXlAjQ4pQ74JHrEdTksc6NBugo6EE2lPjnPxM\n7QBQz0XChOHXzADSsY3gLQbxUZbH37ldWZLsA+UKgUh0BVp8QxatJXYlz2yf\nKRME\r\n=aYAT\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"f1b26eb69e73cccc071d96cbcfee021e84917b52","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.13.1/node@v8.13.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.13.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.5","@apollosproject/server-core":"^0.8.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.5","@apollosproject/apollo-server-env-mock":"^0.8.5"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.5_1557335066469_0.4478882304718941","host":"s3://npm-registry-packages"}},"0.8.6-alpha.8":{"name":"@apollosproject/data-connector-rock","version":"0.8.6-alpha.8","_id":"@apollosproject/data-connector-rock@0.8.6-alpha.8","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"99602629bc385116c2327ba4d5044277fe11b4a3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.6-alpha.8.tgz","fileCount":56,"integrity":"sha512-A3A1J+fAVpvuJRf2TcjV5myWxBGf8Yjx1dpg+FvnzHh/IZMkBpNX+wdbOisV6Dq+015AZxPuld3tISnGxKEl2w==","signatures":[{"sig":"MEYCIQDkKg9RiyExRdiVijF+pTBEHgu8JOsKsTi4dFnYUhioVgIhAOFwWPRyOmsJUtIqtLoMuShacYn80CSGJAZ49TG7ZYYE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":516915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2tV6CRA9TVsSAnZWagAA8scP/3HbK8Eb9ttCoIiIyo3o\nROnveqZMBazpK99j+V+V/X/46Y8sBP6MJmKwt2TwCcn33zadJj4slg5u9bg8\nlsOzTTpAoR77XWgdrbkBwKwBJozl+Ai+nZLNH36f7acrq1MhKuDyQNru6mE5\ntkXJmffXw9qDkIJxhAndpfaZvezLQuc8cANSofBq5njfGnn5eC2KsWTcJg/b\nkdPkAHRciug7+4zoF7eqrwA8eAWtmeg0Qs0GCdKAerNVi7wQPzK9JqIXjEfU\noBSJm/SNz+snCcvC5PG25cxoitI/tiiA59NHZ9lS/x3WUHgiT5TYK7Mlu1Pe\nYvio0xt3g0cHSoqDWIpcA5q1E4vID1cdx/YdDTZ7zZDuuANn1dJz5+26bvh8\n0rHYvgOMooAJ/JCJpquN8QfnnoQ7wM2g3/tlQf2OmpuCkM+peYdRzzwjWrM4\nZYknMcr1a15rsIk/SzLBz4ZJNDq8drmut1zJYRq0bKw4GEgsmFLl3h0p3Ie7\nFPU5AOQv8XyHaGCka/Q2ddduwNShq9eFpvhawh6deOhHAew+zYDkY1ZML6KN\nwwbR9lwFVOyFLaaZyUgWpVgOYmVE+LYw7OM1eWVBjTUF041WFcbxxXmGzJH+\nPG/Wiy1Mo5+dPkrg7/VDVhfXMeCYCMtvIOyo3KZG4ghaWpSKcWMZ8IvczLmg\nhsaJ\r\n=2d2u\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { schemaMerge } from '@apollosproject/server-core';\n\nconst resolver = schemaMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"32312d193d482a14a517d85548e30670993a5750","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.13.4/node@v8.13.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.13.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.5","@apollosproject/server-core":"^0.8.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.5","@apollosproject/apollo-server-env-mock":"^0.8.6-alpha.8+32312d19"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.6-alpha.8_1557845370256_0.3999669935680812","host":"s3://npm-registry-packages"}},"0.8.6":{"name":"@apollosproject/data-connector-rock","version":"0.8.6","_id":"@apollosproject/data-connector-rock@0.8.6","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"eacebd09862ee133117a4a4ebc2f448269c199f6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.6.tgz","fileCount":56,"integrity":"sha512-3FVW1pJ2LzBaNE2PSRFXeEeVzuUFUQ5iuBm2VemkVXM07DtM+BdtrZlaUSjnkqztzEACB6TG/rFhNGOSSWWksQ==","signatures":[{"sig":"MEUCIQC3Fln2PjZS+G96F+5kCGLZrN+ETlYeaaRf8iLjhUmK3wIgfrXhKnyClWPnT3ZGM1dY6BNU6Azo7FRtN/SykWTTFFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":516881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2uDbCRA9TVsSAnZWagAAfeYP/2AYZ7/KtORQmcQOQ5p1\no/S9aTYsAbtbSMahm1AnO6/noxtO1pa5WxE1ggEJ5Dc9+Dg9B/Dl5PRmoRuh\n3bj03+midf2lmDFsvLc8ZMXO8okDjdrLFNmX0Dqmxv1lpzIwkbBqtqRCkKDN\n8jx9lcPpB2pv3Xz5QGnZH14n64Ytjm+ruxm8AhkvSfWgi8hsaCx3M97OwCK/\nupfDvNKt/2xJFu5NVwe4Zwjd37QVUcpXxSQ2ZCTytwAKx938no7LmORKlBYt\ngTNK9+3evLn2JsgMerP/OGlUodebFvqiQmI644cGfb4zdyxJpauDm2G7zTs6\nglexRzAK8I9It82u4sa5ilAg3XoEwA7tZXArUe0L16ntpKJMRezjOA7ZySzU\nBmcdj0DJUo0q6101frtAQuuWbPoAQzzQCXJ04KPNX3WLChTk35rGhN10SyF5\nh6peeNjoqcOi22D29jDpfL7haqOJixMLsCaTbG5xJOirT2MLWriatwOa1B2X\nFjPtUuvBhqSF5BrZOl+iaM/XCHj1H2fqPxcwmjoXO5fsaYpTEqqMyDu3uJ79\n3iZdxG/L4B0bs+vpEPLwJW/KpDxpD87SWAtf2KEtH2YnunmBLyOjhwINgKeX\nRdDAEd9iUqtFoEeZ0txyKZfDXHYFCkLeb25F5L9lVt+GYpkahz9W6/7OiHVd\nFoxA\r\n=qCVb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"009802439cf84b81f924d1b14da224034fdb12a4","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.13.4/node@v8.13.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.13.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.5","@apollosproject/server-core":"^0.8.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.5","@apollosproject/apollo-server-env-mock":"^0.8.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.6_1557848282787_0.1840053664036989","host":"s3://npm-registry-packages"}},"0.8.6-alpha.9":{"name":"@apollosproject/data-connector-rock","version":"0.8.6-alpha.9","_id":"@apollosproject/data-connector-rock@0.8.6-alpha.9","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"263313e35296246268ed3a1036ce99dedf283f4b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.6-alpha.9.tgz","fileCount":56,"integrity":"sha512-hYDQVL2gNaQu9oLrJY8QH8e1tj7HpMFBAvHfYaC0QWg3zVnpyAGfS7HhMrXpfffpUZxeFeclJ8bptIvKhZbXVA==","signatures":[{"sig":"MEQCIE+Gd59Piu+KbNGc+7jdF7IXdQuvFBGG5u7lMuACoUxBAiBLbKiKLhnmm0uUEU3ZhUmkolkE3+GxvM0A1q3y5MuUew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":516913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2xx8CRA9TVsSAnZWagAAkYMP/RR/EEqt2Lg7WyJb0RrB\nIm0AmwTXbf3V8DnUtRMoSYWxa/01qLcUQeNz/VRCdEGl9ccjCLQEq7OXnnRU\nWz60utrKGvBhSOmeCrxLA+Jsqco9Qbq1ER3wJxlClXz0RdMvBO67owbWw/ej\nTjjpRvVkeiVASnWVVbKXsaZx2NDtxt1GY2HlVbQRuph1BSAxR844HuldJGo4\nHjOpPdlnPXyT1aSM3o8BdnZHUjrY1V/OtMAyryFzFXToeJ5pUyII09jihqxT\n6Wx3r4aw2uTlf5aNwLmILeq5E9Cc4NtWpOzMhGCrGnUafT2TmgR9prCMrpDS\nXaoJO2p4fh5bqpHUbgCd0Gcmr5iH+Q9r6dyD3w2A5F63zyznl9YDH0sx3FRY\nAbvv7l2TbjFbfTAAIMTDXAFkryuyEiXrePIE4ccZqbEooc16cZwV2QdxM0/J\nHZvpfBLJVrMG80yiHh+0UttsGFTGKbZJMSqWozzQO808gZUkr3S7vuggwHi6\nfhXbP2QaHk4Aipohbhlw8A3BR/gWrULg4mJRrJ648ZD+8L9aP0BVe+YHnutT\nhJfXkJV/H+PFzeO6YTgf4eJ2OkG3152EMDA67H4K5b4PSSV2BNJw8vpxSjlE\nMCQKasI4dJjRWH9QWQurjzA93AOHD2C6gGlyJ8NJ45tzIBkk2SddQExzX7Tj\ne+/M\r\n=yHVk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { schemaMerge } from '@apollosproject/server-core';\n\nconst resolver = schemaMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"523ea1c319ef5eb06038ee373a63fb4f0acb0d4b","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.13.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.5","@apollosproject/server-core":"^0.8.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.5","@apollosproject/apollo-server-env-mock":"^0.8.6-alpha.9+523ea1c"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.6-alpha.9_1557863547549_0.07053467974539407","host":"s3://npm-registry-packages"}},"0.8.7-alpha.2":{"name":"@apollosproject/data-connector-rock","version":"0.8.7-alpha.2","_id":"@apollosproject/data-connector-rock@0.8.7-alpha.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"4487d189003124ef8721e88aa5bcdd50207c547c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.7-alpha.2.tgz","fileCount":56,"integrity":"sha512-Vg2j0x/l5rLvJ5AqQxvdm5iVuAQmv9zcHiotHwNlAzYJrR2ivMKCXB5wR7EP7Rxa29hRw0Oa67vQMbmRPSisSw==","signatures":[{"sig":"MEUCIFZwJWH87DjPKVljQiaFndi1noE9AGtShV4lw1tWTf/WAiEA9yq9Ws5LkSZhTERizbNM1M7/HQ3KelOBdWqiBrhW618=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":516961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3FpQCRA9TVsSAnZWagAAmg4P/RvdAUlaFzFITF6UKu8O\nFMLYURemG4xpdzQo7LGw/a9AQVHL1O+anYfZ4EnaWI83L7Rrrlyv8gWaG+g6\nHJxANz/RpItNNVe7hR0ZSAjJFQ/pWHKmXwxDCF+ZnykAA+Bt/1/J2PvEgAOT\nKITPUgN9Lws/o7oL9ohsBO3z8q8AWF6kWYLXjLxHlA35miu703aZkpa8ASx/\nIeZQBzI77WbigphWqOV9T9MiOz7hhgHZxM7kw/JIdeTSfKk2vQJg6tkGyxm0\ncqjW18ex1Dk1OzZEUCCMkc8mpqNswPUPiAob0vAVS3w2IHYrDJL7zY8IfQ1C\nmSNt4qwxuftpLmoqbYGqs8Y+Mvx1Bw7VPE3o/wY9/tc17U/g3Q76VsfZpzK5\nOycqYzLkkLHejaREEdenPkHNsKfBYVowcD2mGOi5anS1qG4is0VC4AFm6HNM\nyuOD7dmNZLvf1VndSNj1lQL93izZ6RuUY/6l1G0hWHkCQlOdNCSSzbHUJD0h\nm4nPnucDS6yquNOcTPI6f8nWQwhZGVWjJuJJXP+Q5XZCYgj0pOeYISUfo+fv\n27wP3HOvL3zcf649pnhKjUeKUUmk+6yz4pVvhyAuJTIAJtl1/YV9o1Q5obvh\noznEMVyfHzJE1TZjfieN+xRgT3qeTAsQNb8iOl3AHo8/2gVzDLtifR5NuBjz\ntwu0\r\n=r74V\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { schemaMerge } from '@apollosproject/server-core';\n\nconst resolver = schemaMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"b40db5c8f62ae69b1c5ff38d4eb71f53e7a788c0","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.0/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.7-alpha.2+b40db5c","@apollosproject/server-core":"^0.8.7-alpha.2+b40db5c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.7-alpha.2+b40db5c","@apollosproject/apollo-server-env-mock":"^0.8.7-alpha.2+b40db5c"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.7-alpha.2_1557944911735_0.2059048872285274","host":"s3://npm-registry-packages"}},"0.8.7-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"0.8.7-alpha.4","_id":"@apollosproject/data-connector-rock@0.8.7-alpha.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"61e4da8fa33e717989f64a4a415160c6495d5c8b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.7-alpha.4.tgz","fileCount":56,"integrity":"sha512-CFK6pY4Ol8Vd8eXY9FT08gu0MsRIX+8u5mC7kDsvCxusS0ZP5yAF32GmcT41tb8e6xZXNdjnbsuY9P4nZJ+O7Q==","signatures":[{"sig":"MEUCIAxXU1jH4q6tm0NMOigBZw5vj8Rv7aoOaERyS87ZbKK7AiEAzGb+yDFISB428GHKsogRvKsQNJ5a5hZlTj29MVNYAEk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":517050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3JY8CRA9TVsSAnZWagAAQH4P/iPILRNUjEgqkDCgCcj0\nPaaXh5PLr7ZZUz1xdnnw49FpU+F31rDy+01326na04kkEZuuf2wLKWXCGJzc\nT6VVTxoksUw8Bk3xKh9FSWmchIqx17rJe6aBxE9nR4lGDVoz1b/SlfmkJWGc\noX/WD7Sn2+xsoJ3+NyKr02ew5Bsx6fAChjTmIQEmaVzZldN0e9VIYucYwU4W\n1aIo+4WhcZ10oz0pp/V3vOnBmRmAq3XHMcXk11OczK7Q04xBhR2KBYPPyo6k\ndaJGpfZ6xMlWIx+xhXx/007jqCj1vlJaiIL7VuR53tU2hOwpDRDSM1MldJK6\nsjKSzr4G+AkuClDd3n8N8uMgzLPREsjUTJWAcwmZfLbpW1fUxzVJO3ZQqknw\nitXBydlKTameTYg++cFxQ3hj7iy64qmm8y2piWjjqLQiCWEGk39Q/8kP9HyK\n+rW5PiSU4Chqq5EOSSds16RzY2AAQTqHQ5QiZs4IhzKsj+v91eo2KfmNvNFm\nJfJY0pdA2geMkP9fovpPPi1auJaKAr9LMJM8YLaojwYVpyEEVyy8oQSc093p\nFKZvro1pgauPxk8DDGB8nfNNHs1oq4H1/uHEV/R9851i3w/rVUWR/9XkWvKL\nX7kurXAA106CrgX1mnbVszL2TWFiIt4c0Tf9yiaSvD5RAnEcwzA3DI3FCcs0\n1tjb\r\n=dcr2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { schemaMerge } from '@apollosproject/server-core';\n\nconst resolver = schemaMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"0954a6177fd60cd84b8fa10d69893cee15cf7ed9","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.0/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.6","@apollosproject/server-core":"^0.8.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.6","@apollosproject/apollo-server-env-mock":"^0.8.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.7-alpha.4_1557960251781_0.7136832328907716","host":"s3://npm-registry-packages"}},"0.8.7-alpha.10":{"name":"@apollosproject/data-connector-rock","version":"0.8.7-alpha.10","_id":"@apollosproject/data-connector-rock@0.8.7-alpha.10","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"785acc967c9471684491c5ea3d7ae93086fd7906","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.7-alpha.10.tgz","fileCount":56,"integrity":"sha512-mFF0tpBg0r8IxVThkhKukM4vaKnMXVqMXy5kpSJ5eFvVSTubRnIssP8x8xE4BYkfOV9qocvx/EAOkROtn0htrw==","signatures":[{"sig":"MEYCIQDRqQy0oGktaPpgeWjlsw9K9FE9bRhyCQP3AmMzEONR8AIhALMFVE0GOXEFponAAFhuVslFK8v7TB7Z4zRs/J/j1Yjx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":520509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4wkyCRA9TVsSAnZWagAAAbkQAIv6/0fDz4vWo1og+Xgp\nVNa0rwxQUfOv03DuYgUXcshbKgVvhSYDlOKXx/M8v92E12KsLYZp1NfPNchi\nYG568HDQwOmM+tvXxeTcIofWduWXtQjSXbJOEGX9Z1sZgnZl5vErEt7+PtXG\nUyx/EJKS2K70Dlqlb+VIvKR9ITD/gpDmrI+udPVT8ZLSN6pn3b9/N4lfv+Ex\n4Mtn2t1y1GXQ2agD5s19wqj1Yg/hUMLwUzOH5ZdHk5QslQTnet7TCtD6ftZn\nOwu8agTMF1S1yWRiFT4vVW72hFz7PxGn50dG6RkaWbBq+HErsA9rQ3zTpTvP\nKclFrNWD9QBPgmvoDbKXCJmN/DAdfHgcl01dk17ty9/THJXNY+hlUQ6WybQ7\nAhsP7c27Zm4nzYZKWFh0iRQ46DbiExwwUUpfUsmhgC70rck/iWSUT603MTmb\nllB5kYO6js45ZfVs0R935JUm8LMN1hxQeFOBhVXM7IokyWjVjeSmC+XuQgNP\nUYamxz4ww+Aij1verOrCou/Sqo8aXFaOyUrlXPbmzz6BkqiPDKZ1zqSdX4HN\n/gi09LAI5oKEUK6KG/H30h1c1aBTioQGSfJ1NusE/cL9JG64D0z5454Mrp7K\nka+Ji40gwzaUAGv2gL7nplMb3kjOc9TcoQf9Jm151qp/C3POVH2C/gyUbCUc\nud4L\r\n=/bFV\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { schemaMerge } from '@apollosproject/server-core';\n\nconst resolver = schemaMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"a92e4e373030b99f4943876fce9d91804cd911c1","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.0/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.6","@apollosproject/server-core":"^0.8.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","@apollosproject/babel-preset-apollos":"^0.8.6","@apollosproject/apollo-server-env-mock":"^0.8.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.7-alpha.10_1558382898208_0.8456785186084952","host":"s3://npm-registry-packages"}},"0.8.7-alpha.15":{"name":"@apollosproject/data-connector-rock","version":"0.8.7-alpha.15","_id":"@apollosproject/data-connector-rock@0.8.7-alpha.15","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"a5fbb54ee28f06c047d6f029c2cd3dfbfbf2bcda","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.7-alpha.15.tgz","fileCount":56,"integrity":"sha512-eMeVCy+DBRK/BrlYYD8rns4olfC1buhFJSCX2TcmP3y+xBV/82Ri8wbpI2/Mg0iSEg/eps0yt/75PiOHKc/ZMg==","signatures":[{"sig":"MEUCIDeVAxecEsA+O4DUllu8JfzpVBnUlLpvH0Q6pgOTgqrbAiEA7FNijLdD/XZgRC9pQaGgzcH5kudTEPn/W3i2hNelLbk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":520664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5viJCRA9TVsSAnZWagAAqjIP/ibEKJNR0N9F1YSoEiz8\nfckM2ks9VHznMmsbdB+6YX46TD8WiON+5RqxJdX4dflrUKdtdtA9Cx+Ir4je\ngJpLiSusAzx9FqkQjWWz7XaLgkAxOiH3HHQ1thYhuIoD3yljTt8+kJ3oGCUY\nrSmN99LtnHj8lH9iQ0pkOek+zoli927vXG+sq3SDBIabX3uYclfazHMy+Ncf\n/EWOdMz0O2rKxUbkBMzth07n8reC2re41dPMJPxc1i90NkmQnYt/oswNLTtc\nhxpF/3DOg1jdBj9MX4+srSaGlrkvOBbOoNoBYcnGq+i77okAJUvUqyAOP94d\nnsPZiXMuu8fvGWzgdKGOE2OczP0gUpzXWtG4Z3vknleYzu3GJPt0oZJYTnTg\nDZvHrup85MguYE5UJYFFhF/I6UNBe7gvQOrR2Dh5KEEiaaFk/SUSNztxpkuO\nv2TaJyrtzlpPDto1AE/94yXfb/qZh9qqaPzHO0bUL1EOYEUvcMUu7bZItPmh\nA2aP0xPzYW7E8Jgy7YrjAyJkEkVWwsQ3BkABVigskz8M5c22Vt+vpN58OKoe\nv05t6K1ajbarpOubMsmt7FOAD2hxSfwuRb5xGTTyyK6m4jB6MGDB3xHykCpO\nIld3rk2VNkLFp0qBhk2ugbTJuw8jJgYa7n6H4dw5L6NNOcnrX+3m9SqeEglL\nyu/j\r\n=hyDK\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { schemaMerge } from '@apollosproject/server-core';\n\nconst resolver = schemaMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"c1ef92432f087638185d1b298a83bd4e706130e4","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.0/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.7-alpha.15+c1ef924","@apollosproject/server-core":"^0.8.7-alpha.15+c1ef924"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^0.8.6","@apollosproject/apollo-server-env-mock":"^0.8.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.7-alpha.15_1558640776860_0.9684832157278467","host":"s3://npm-registry-packages"}},"0.8.7-alpha.19":{"name":"@apollosproject/data-connector-rock","version":"0.8.7-alpha.19","_id":"@apollosproject/data-connector-rock@0.8.7-alpha.19","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"70508b19480199851ac4fd4213f509c86530a5c5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.7-alpha.19.tgz","fileCount":56,"integrity":"sha512-GJNz6PrjyhGAzaIB5ub1cFFmeVOvRCwcUr4+wD/ePT/TTtMaIiiUzMtt/AlQpsYeACPz1fikLNxREsWyXqERgw==","signatures":[{"sig":"MEUCIQDDHnTbhpIluq1F7+uhgjPR/2s9Nx8imN5IxCdr7adgPQIgFrglxl/P6QNNILLOJWVsHHPXhZGBEc+bJsvRiFKFOsk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":520630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7ZjwCRA9TVsSAnZWagAADt8QAJAbQlq948e/X+NZ0Xg4\n6ZNFD4BU7bH9cOPv39WnAURiA7rbkhUo2EaiUfbOu8pAzO3/A6CNMWRsJbHx\nmLoPTZy9gjNJhbikMCMky1fwKOoJgTEaPQVW+P6pIx5nYhBMSo0ip7ZkRfe+\nXLEPkUknywpAmA1ISsuX9524aO/4T7V9Ex7fgHSuqvbk5aJJKIwjToKaO7UQ\nSAtYJCxMQcWyImty1XbN1fDqUK2zCKND6DkcUX0shsV1FdcpR2cCl9O+xQzw\ntFdUPpIH6/eZwyDMdaxMKmDteMqbD3jzje+ClEHGU+iU4vwERqsmFS+rO7du\n5lsvFdKJEK5VlxcOmCHn3ZrXkxEGdXDjpsTcHFevqnRbVRuq/Q3eZI/enAf4\nLJsoq8MJ0PBK9nKLe6ivo4mZfzqvvnQ+HqfUzArHH7kgMQ4+N02BMLgNUJZ7\n5J18yH0IScSoxjdVooDnQkBpaNDIFpNhLeD1fQkq6EwINPIC5Peccm10Kb+N\n/fXhsVU6QI/ilL/sW4YwNt7PgzdF1TmoIqQo2HaOeUg34S/3oc2nQkycN8R/\nM0Chdlyi8VutssaTeQW3ebf8BkXD0gD04TJ7RZvNXMSrI/3S3Mb3qrF4sFvj\nx3SrYwmOSWtaSxsz9djoTJwt4wOKzJYKtbtfqVjEeLKuWR0yKrpc/9erMocX\nZONe\r\n=GMig\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { schemaMerge } from '@apollosproject/server-core';\n\nconst resolver = schemaMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"e3af49aa6adf883fae47818d94ca4bf608765bc2","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.6","@apollosproject/server-core":"^0.8.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^0.8.6","@apollosproject/apollo-server-env-mock":"^0.8.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.7-alpha.19_1559075055223_0.4056406239134831","host":"s3://npm-registry-packages"}},"0.8.7-alpha.31":{"name":"@apollosproject/data-connector-rock","version":"0.8.7-alpha.31","_id":"@apollosproject/data-connector-rock@0.8.7-alpha.31","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"7ff6efb8bcd914233183d78ed8f1e9c0cfc7614b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.7-alpha.31.tgz","fileCount":56,"integrity":"sha512-PTXfDtNh+OycvVT7WF+8XbaEEkMlA/Jsg6PXshIofCPRiGeebFXgw6tDvinvrs5yq/axIpXrBdiI/vudSAlm7Q==","signatures":[{"sig":"MEUCICJ66jMx9DbI4bqFVmKi++O8WKmHos96e0mOfPuxUgLLAiEA9j5ayBq70Vx3e362cYfa2roj3VXAU6gUtKJj7wWiIss=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":520651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9oPuCRA9TVsSAnZWagAAoqIQAIp50gEDgiwNBgVf51oA\n9vUuFOU2PBFLXwsqyokPaaPLW57pWyxthxYS9c0mJe5cBd5c5MqXzVhEX0df\n8MzSx+uli4tQHXBEEO94YvvEUBn4CjryOQ2vHAQr0OStggRjmSDidxQLxWMf\nijEDnTydzOVAwF9L8TBxpZg3N4QTQgR9gMJpQj2rIl/aTRvKDldopKSoKAVd\njSPqZWxJyeeXlGIlX4xvPAf8zlezlJ0mZlJImOwJisOm/M3K7Q4tiRpsNftY\nXwg0TBMRxdbmOfvpo5daiCXRbFwTioGuxJ9nqFxuPzyt1UXjY+/C8vK4753d\nCw8dWTGZU7GHP2kjEXUR5oewdJqG69thmyLcLk85EFMFm/l1FTbNXzZlHX8N\nY4A5nxWFlkM52dy7FEoDgAh7yYJA4ZZ0zlaqyVSrOHiSo3hIKk1YF4OW1Cqp\npjQf7xuKt8cbf9nyqanaagmVpP3HwFFYyOf8ykoBP/dQEYX+9Xr75Nbt8EoI\nkF4DU/wptCGVEqezngaQPAW+LAsRbUBXQ/NbpzNd4z0Y+A8mVmqn3o4cYPq8\nhqzzop+Or9vyfbRPa385t7PBl2rh4hV4u5lGpqL5VyMpuWt1VSukqzEgm7O1\nVooskc6TZtNc7W71s+I+V8RQr0hmx3prfEdr+qfi0UwbAobuFBwXklgHNmkw\nCqQY\r\n=SiA+\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"b8bd92fe00a69639369de182c6472b65f36bb25a","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.6","@apollosproject/server-core":"^0.8.7-alpha.31+b8bd92f"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^0.8.6","@apollosproject/apollo-server-env-mock":"^0.8.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.7-alpha.31_1559659501545_0.3787712215622856","host":"s3://npm-registry-packages"}},"0.8.7":{"name":"@apollosproject/data-connector-rock","version":"0.8.7","_id":"@apollosproject/data-connector-rock@0.8.7","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"b667276411eccef2188125020cbd93dac8fa94c7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.7.tgz","fileCount":56,"integrity":"sha512-0BBwe93AvH0e/8s8GySkYd0nnMheCG9VDGVgI3CUsSekH2uALSpII2GrAPd7vY7EQPH3qLsBldnWHf0iNCIlzA==","signatures":[{"sig":"MEQCIAra6TRIsghWnOgh0/9ZNsctyUaRksgvAVhLdeH8qn+cAiB63yXtrPZwgtxhAmomFYb7yPXfWw9RZlVjkZQQ6LYpJg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":520617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9qjeCRA9TVsSAnZWagAAwoAP/0zG092gHbxHVzkCPZzO\nY9nonnjqn+3HTzYjpzLXYg+7cY/nHJS0HEDnb0J0t5HqDc7K4k5aUpxJk0HV\nURER3G5dUPBrTGPN9ZW1eIrcJ21gM2Nw0uSXyyLdw3juhZ+949Z9EMsYIA7y\nf4OwOWlSZ5CH+zNl873dlA28s2Ab4Zfypqtq0VOJr0dhmkllf38xRXrGoXcD\ncKdUJkz1ubJHlfugd2L8fquvBc7XfGYxhX6Egx5E5xdZPPERdc9CmWtpIFPz\n1vYydfBQZv7hdBw1keKBlrumGGzOLnZhd6FkJ7dktGw2KfqW9SuDnF1Tpy+j\nAhHvdy4l5iLWSxnXGIQuL1Xp0lV2a5jONXw78zETGsWwSaOm2AQI42H0eVAU\nuig0q8ZuNiyhKnSrEIQ7ygC0NMt9mcqwSaWqcxxxm349jGwXVIZRoHH8diuP\nVoINDRQYFpFaJKaBlgouFUgxUMhawooNAS3yr6cXEHAgmGFwqj91Hd1p7hKG\nii3ZuEzOT8qBwIH+Lx1IvDScdUy/Bl4OOXwI1oanXRlbWwpdEwIwG1fSSeQ8\n8di2N4MoDMjVd1HwIQkV2xoncWH4f3Fa8a0SdrODSw3j8Lrld8Tn0LC0jZ3b\nrHXajUMvgU2hqGmbEDSPP7vA54as1Yix9fFsJ3tqLylA29nG9A1aoyZyKfuQ\nTGBG\r\n=Dijv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"d4aa23147e36e06a13e9667835128abbbf2042e8","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.13.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.13.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.7","@apollosproject/server-core":"^0.8.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^0.8.7","@apollosproject/apollo-server-env-mock":"^0.8.7"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.7_1559668957869_0.3599958509480574","host":"s3://npm-registry-packages"}},"0.8.7-alpha.32":{"name":"@apollosproject/data-connector-rock","version":"0.8.7-alpha.32","_id":"@apollosproject/data-connector-rock@0.8.7-alpha.32","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"e83d23f93e206fc15200542bde71dbf7a36a31c2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.7-alpha.32.tgz","fileCount":56,"integrity":"sha512-hKaO4u+gbWkruQI0baRJy8Mk0idhULzyrD2dmMoSSCEdbL+UW53SpJUtXb7Sru3UtttoSNjvYroFYc/MRuKYIQ==","signatures":[{"sig":"MEUCIQCAMpSjvq7cxuvvDzDWT/FLm14O1Fb+63vMst8rq2KlJwIgdJPpojjUBv0eS3tsWHWNK/u3j34VmXyafM4ppPdr8+Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":520702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9rZNCRA9TVsSAnZWagAAVZIP/2hr7An+DxDpnQ0k1D5v\nO3rTII5wqebVvwLvTjjNaxInjhGbTjOWcM+wn87YijD4ODNPuOysLQSuj2bN\nYkwDXvhwbWH76+D/AsdsPG9Ro79eKTlJiusc93zEQKs9DrD4mU4aZDpvESKa\npcC3CD2rUe21Y6r/YjDwj0i5isGCS5YMeM6pgjvQu3X3DGeAaSCZcwRLvzXR\nX5WWdRcvf3vJGS2bpob01IavWh3emYGUbjuHhhwc3bqp3o5nRbffFjN1Wqnd\nLCpjTOTVnLeNfMkreH5h/kQBMd0yTkG1+OwphmFCTwE1LoXoUY+wgpq7ofMX\nA6vWMXWlooXh3Sbul7Eg/0nygVPnZzqxsH0X3Z2n97gDSZxbipSPTI6btrnV\nmFqaVk5bupig/svnZ2ajy/8gYYCazTSe0IDy8VAJO58jbPpUwAcXfENXnPPU\nVga42HDPkwYgwpDiz9KImyIuv72+BlQSRryHypCjZiXcAIwGCQCJOEytI0aw\nIQCnN6XkZzFFRn0fwtOGeyAeZ0oyEjOE7j+RzhL9aE/v/hHLH9FmdHmhI+tq\nI0+6Eub4DSs3SONGwPQNliFuCxqGbr/bYfEU//Ab6OIQ3ghBMluULmZ4zG8f\n6hvyEga/kfpZFBq034uohSXDTX8IDGcPs28M59EE7YVcC2k4L3clFkAXBysp\nnUtQ\r\n=7B1E\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"3d65480e5d448a2fea5e41761c590f02bfbd6bb5","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.7-alpha.32+3d65480","@apollosproject/server-core":"^0.8.7-alpha.32+3d65480"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^0.8.7-alpha.32+3d65480","@apollosproject/apollo-server-env-mock":"^0.8.7-alpha.32+3d65480"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.7-alpha.32_1559672396560_0.3767944603858371","host":"s3://npm-registry-packages"}},"1.0.0-beta.0":{"name":"@apollosproject/data-connector-rock","version":"1.0.0-beta.0","_id":"@apollosproject/data-connector-rock@1.0.0-beta.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"4307a612743e8ab2641a5efc64672d4ba3fb9b24","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.0-beta.0.tgz","fileCount":56,"integrity":"sha512-N6AQFow1IO9CGkLQAEirqozV0F6686LdwvUTTmzVMckWxSFf7DMcQBicCybuuXm3e5n5g5XOLXgEqdGQ7OLm0g==","signatures":[{"sig":"MEUCIQCGpjQjvC/Aj9txwmgWUn3/2NPE6IKiVYyb/BljzInDTgIgcQeFyuff0eh3lX1FEa8ESHmysBCAj2qwQuaKGHEO9L8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":520652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+qkhCRA9TVsSAnZWagAAnv0P/i3TeVmqY5pKGszLvjkj\n7G5ReZetCqx88A6HPJ1FXqVM2QO4T9oJSdWbt/WXxQanr6b7yHStk8bPV6w1\nKrI63i+TpH6ZjtKIloi2uZNS0tdMGV5y+FNaQg0G7y+/IruErOTpCCi6O5tG\nuqzsoCVQcGRWMLRkpXlbmaPBSysgVE5SsyuNn21nVGtnH/Ef8GcBSZ4FtcQj\nz7+ry2JP6T4kodnSD1Faoy8EhwiiirHJRxqwz8ShAf1ITYqHT3SDUkrtfJyE\ne6jzuG40fbfNXlCb1v5d1ImmH9/byxtG8o9RgHg5tqJgu3OH5Nq0TeLnNSK9\nRrsDTbGQCogGmjbwIliir7gJJ7BgEFIiwXROxskCV4bVuQGtKfLxiMC8HgME\n2iQp+nqmafcbQqgvhOBAdjMky95dhvI1DJawc5rrbgjXIYMOIqbchiDjgYjy\nAtxmTe9ktBU6CFcBvYbmsFWfVaxfaw2/HFEW+TvfFXKT6xsq93Y/JNZ7wnsf\nWfYfbqSKsv7xmTYIO+PK+BqRxnEsRNyZMBJjVw0xNpAdDTUrIqw7x2dacK2L\nqmQW0E12aEd/9gwcSdMn19oAbiQBEKngmsnb7878zfxlieumuvWt7GqSnteg\nfvR+rv3sXrn3xmnhYZFnzVA7ne8AqzIOPfYSGELP6fPkgp5x58OnA4YuIbBc\nPxq1\r\n=K3lx\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"e6fc007ace19751f8696e2554df3ad2df06d89fe","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.13.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.13.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.0-beta.0","@apollosproject/server-core":"^1.0.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.0.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.0-beta.0_1559931169138_0.06568692133232279","host":"s3://npm-registry-packages"}},"0.8.7-alpha.35":{"name":"@apollosproject/data-connector-rock","version":"0.8.7-alpha.35","_id":"@apollosproject/data-connector-rock@0.8.7-alpha.35","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"7b32ec9be32e395f5db4fa0cd3d877f7271f7721","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-0.8.7-alpha.35.tgz","fileCount":56,"integrity":"sha512-sJ5Bdf12XHykzi1Dr8zI4n6/0yJI8JEs1oksH0L1fL2TWH7KWQKNaSGeN6mwhVHzLD9hFhY1qYdcc3YsJ1dIXA==","signatures":[{"sig":"MEUCIQCgbfMqkiCG1arfD9vu7R0bxoYxe10HnbWVOmW+4TpRPgIgbwaIR1m+Qhp25l6oWUfjz7POickTc95vsI26wpRJIQI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":520702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+sOaCRA9TVsSAnZWagAAPCYP/iiMoytDPic/dNThq1qH\nmm/TSfzQSAgleEVkV1lyKKYn+sBsnBpcxoOPVzszJP1m0aN+TIsTWrZHog12\nkRFNFJ8N+daUFDuKzcnEUE1lpSPGOl8xxlH8XD7uhmwvL49Uy4SU0ss6V4Jq\nL8eC0DTqmkjaw4Dbym5NAKs7oEVLBlfd2d/y6beeNZQz9+BbJ9kNiSi/F3xD\nHLtiXoJdgIn/BLH35yom+Yr6BZmDnVcrhEOTZwiIxllkqljpz9UymMjPPOyD\nkA+N8ZedoYVlTzT98xR1ywu363Fx0q9kQxd/ZKonziynZ3Poys01RXyoTggu\npJYGGA4v59Bu6DpD9SJ6KSRJnQG7fZ0HiART+gw28FNYx9v/NymWpU1fID1p\nGKwbjb4spsm9Ej/WU/yLu7fvEVWcvX+nqByvPA424z0bZLdFCs1qBvrljvYB\n5LF+B4WVMSpOKN7HzQ/f4nSbfKJLZ8K81uZKWn2xP2dfoS8CZL3GvKBS18o9\nuQPieEd2y7SZu4eYFP/VKnceGsoy8Os7WYGj1IvgVC20Ffr8jo+zYiNAapsu\nPALruEjJXqq6l6BSsmXMRDQtrHzOYDNrw0UdSIilYMv9571J7H4w5XootV0Y\nNYbf3o6/M2W7kgbNVeswA38HrDGGMgq3yoQEYDQGULh0TztAuG7NvyonVjEN\nE845\r\n=qYy6\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"4f1080c98fe8604c898c83979e1561c6a05d9830","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^0.8.7-alpha.35+4f1080c","@apollosproject/server-core":"^0.8.7-alpha.35+4f1080c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^0.8.7-alpha.35+4f1080c","@apollosproject/apollo-server-env-mock":"^0.8.7-alpha.35+4f1080c"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_0.8.7-alpha.35_1559937945970_0.7275851846268075","host":"s3://npm-registry-packages"}},"1.0.0-alpha.13":{"name":"@apollosproject/data-connector-rock","version":"1.0.0-alpha.13","_id":"@apollosproject/data-connector-rock@1.0.0-alpha.13","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"b7e02b7415bc57f5145d581df8678b276da9454f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.0-alpha.13.tgz","fileCount":56,"integrity":"sha512-RGN89BaBBlTI2AhMfNjgNBC1ZCOShjJfdpT1kfHPjtMh34Xu9doOMTLBzrJ0auZl75I2TVH1m1OL+nReSqNPxQ==","signatures":[{"sig":"MEYCIQC9QflwkkLwHSCylZyYRh9sYCvZPJjTYE7DhdhSWfAlEwIhAOzQutJHVtgMAuWY7tXkegbOP7mGuZLCfV6QE7ttxVpi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":537333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE2LVCRA9TVsSAnZWagAAGwMP/A9waxrEyezhz9iBy7dk\nbjz7/fY9ECj3lHLp9UwIivr6Rgy1oLhoyrlB3mCd+vKxiEmLkV+3vIbH8K4Q\nP5CS1/wtXhfB1x3QBG+oT7DNOXHaXCO4ecCnPcnQvyJjT8kwAqFEYbAljJSv\n/xYt/GcaCaCmdBG1YrQKqL2v5VbjL5c/KL7Jn62k8pSQCwmkFOxs516sKb4s\nA7Xd3t02iB+jJugxjtgnnRl8IJ2eg7v2R7PmZP3/a81tA2wdptqWmAlCyFgo\nGrC5G6uWqY5xzkkY9lWuJIxOB2PU5WUetxPUWcAx33ktYowQ1b3rOHsdczVG\nXwOs6K7IxlyTaXId0nDnME7Pthn5iMK0e+bThD+QZILgtYEIIcS/zvd7e7gB\nJl+T5He6Wm4I2YBvktZalNb6mRYmV8HScT+Y7eT+WFWhnT70l6TDEnHaY6//\nowuxWm6E6Bx4jhAwbVAC0b7OBn/llSRcaNXIUnsuJ4F0kg5ZFzg2tnc7Y5tP\nFJGwh5Yik0jTSnpOjgfw0EuKiuuR2HBL+A7JQhXoo5fPKt70iOwv/GI4p2e6\nuJwcHrdCHoP+MSbEgGgKdr4CJfDf73Gwz0p6UEWwwnTDlnGWWbRXd+ix4AdX\n/tmSjP6Gj/sjpNRfenNFrAktAosof/XtvsY0NrBATmigv/hM29VUqgPvz8+u\nbkJr\r\n=PEi6\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"194979b7519816dab36ee0e2ec552a8240007b9a","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.0-beta.0","@apollosproject/server-core":"^1.0.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.0.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.0-alpha.13_1561551572591_0.5768639895004031","host":"s3://npm-registry-packages"}},"1.0.0-alpha.14":{"name":"@apollosproject/data-connector-rock","version":"1.0.0-alpha.14","_id":"@apollosproject/data-connector-rock@1.0.0-alpha.14","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"4df43b5046154a2cd055c8adba23ccee6d66c062","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.0-alpha.14.tgz","fileCount":57,"integrity":"sha512-i+cBWeGvC5Bj5vk8DARXrAZvSHcIJWljvveRLfy68D8dKwNphAlTca+v4QYYcp4JQzKaWooy8WDpDEGR6cxQVA==","signatures":[{"sig":"MEUCIBs+2eFjBd1p6V+383hbB2m49EXZO5/FHaEHZz6RrV9rAiEA9FDMySZzpuAoVSPpXc++8MZDpdWkVbi5+iPwaMJvgfQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":540353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE28YCRA9TVsSAnZWagAAPvkP/3NvAJA/829xS34o6Rc8\nRCrBUGuu9JVhbbxoy4loqre2FM1uTOiaBSV0Ci5AMA+LW52O0DtPizHirWni\nwm554TB+x5MyDXMVPRZ0AbVvgBTtE8zsd3AnlnVdLsscYnighGCv9hJmX/3I\ntDodLIC2PTxZVus1UsXKKzGhBlRqzWPeWHOps4XoW7WAXFfI7tIssRy112MR\nsaugRlZKbikxSdSW2r3evzKt5z0H5cI5hHBo+oYUofqiGdQSGm2+2PDf/prJ\nbZoKSo04/+cxUizAKWYxmuROBP7hDOIjY3taxUcNIUGQit8WPUYP18Kr0f+7\nax6Qe7PWTsu7HLz8QArvVrIfvltDpxsX67VHabqog8c0qYb42pgBi/U5t+yh\nUJG0K0T6ix+v1ICLpuGh9jCi2/TGPNFwbeqwjekPq22Bozme4iHtavtsbWVO\nPd5Ag/vpfGKlAU4GH52iii4iYkNNfQSesm/MIcmjCbZzX+1Mm2mjarblHryd\np4hYtl3q/BOMQ0RImHxLVyFNZRJuuynOmPZU1Ypz8I8svyALwpC8PoM6IEDy\naRqlVNE9OoWsaOGNV3hw76/2PGVCX+FJCNGwIqnFfkqB4cACDjfLGK5zPhk5\nqTy5GGX2ygKKiFqw9tAF8IESaFNVp+4Hx+Uoqy3C0gf0o+o9joL5Nv/QqbpA\nj7dI\r\n=wHvL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"b4f18cf900b14f625d425c547171d04ed475cea6","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.0-alpha.14+b4f18cf","@apollosproject/server-core":"^1.0.0-alpha.14+b4f18cf"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.0.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.0-alpha.14_1561554711571_0.8790133915969829","host":"s3://npm-registry-packages"}},"1.0.0-alpha.15":{"name":"@apollosproject/data-connector-rock","version":"1.0.0-alpha.15","_id":"@apollosproject/data-connector-rock@1.0.0-alpha.15","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"fae44c3895776334553d6d6b7bb169a6aa9157f4","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.0-alpha.15.tgz","fileCount":57,"integrity":"sha512-z6q214dh/qe4VDGqbfUrLi6cO62Sjwnbn3vHCcdiDkfpVOXeMMzyNT2WMav8FIHaT/O/VNCWL93ZXgq6XrFVyQ==","signatures":[{"sig":"MEUCIQDrHDBaXp/++dI987c1EioKdVwQ1AFnY7NVXHRFpx15twIgfejg6qILSp71ymho0BoIsiH0IPvQSVLXAMHdXB4YFe4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":540512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE4PGCRA9TVsSAnZWagAA/NgP/3pveLB8J0qH47eovTVR\nVKDf3SpbNDRFwvpvpH/W+szaffSkR39hqhT+Wc6LVTchgeUA2zwzLHAM3BR2\n1efCd6A9PAbH0PxoEzndDP9cDn5mkaOl7GQQWF0q4YzijGKA5DVMdV6y2L2g\n3ryKN2R36ML124O/27rLCtPPkiC29lXFZLgUKcbqYmw6HTeJxMrBDMAQ7lVW\nf6GHRTOa/d/lXJ6veM04LtU+1N7FtWJ6nM6xIx93EC+RbBmYriKoWK7EGHKc\nUxCoj6Uvh1oLWHyXFsVVZ9wRiZFdJMFOzPd6Ex/hTj9oQQlF1zZHB73XpBa3\nenYZ94GzR/R/FU5oDgFXwZfGa5KzQd926nHURskGUTnr624Q1cZkeVkG3uih\nzzoS30Py1ib9cDF/Frgg8gZFHIX6Ni7SckM7YmKWpiNuzAe8QKulU9Gs0/W8\nhyqThufgl4RYnAKHJIEqsJXjvgoTH4IluXMZqV8Az8RHAORWiz/2Mh7OpoAP\n6/HosM2JWSMP3niB/Bn3LcjHc+4SZy0BVFhAUb/pheMPBrAwLdP/vemZHx9C\nujAvd2TFTwNGvhidHDzDoq70h51im2QW8RceMh5Hy6PZbOR9OdVninPXRlI3\nuUYg7KQ9HLTH7yWqt7eCjNiW9F9pueah2lJA68UDBHaf1g4xoLjTywQ3Obru\npnO7\r\n=uHb9\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"b1debf764b9ea249e1227101cd47eb79997399cb","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.0-beta.0","@apollosproject/server-core":"^1.0.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.0.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.0-alpha.15_1561560005905_0.19679219097661016","host":"s3://npm-registry-packages"}},"1.0.0-alpha.18":{"name":"@apollosproject/data-connector-rock","version":"1.0.0-alpha.18","_id":"@apollosproject/data-connector-rock@1.0.0-alpha.18","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"41b64d63d7e6771ff355f49d991d025349a95ca3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.0-alpha.18.tgz","fileCount":60,"integrity":"sha512-PPiUNFUCuDy+ULD4aP0D9lI5KZszbmS130AS+zmMtyk2U4+QlBAxpH3CH8YNIfuPtnqrONupd6Z+2Ydw1tHMDg==","signatures":[{"sig":"MEQCIGPh0cO1f89aYHj4MEBszW4sTTYldHy0fm6IDQhiKSoyAiBeym4XpLwGaia7L6Eq1GYCfjTqmww61iVbsPt1JZ5Obw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":560776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFMDpCRA9TVsSAnZWagAACzEQAIfvkJWKApWgEwUMu5tt\nZeHOC1j7B2jNPOn6xruGTlbXU0VF+t1Ypq/4vrShRB+3NE7KuHYoKNwxVYAR\namkKF3HdJk1FPKbYIfTiTxlthrfqhlCAMyWkz8UszQ83cX0lWMpwsJGtKYZm\nt6ctblln46PuIxQtgZn50FZnlaemfOD+C5NEDuJJUjH4JveVk8/VQF23/mjY\nO7ueHBF96P2R9G9aaLTEWmeguEdHF2WWCx6OG5QoxgjkRQ9kAaCmFC2XYmNR\nWTBFwzsMPNf2cGrd51j4fh76eYczYkoRpkZ6omsz5LsDe44FVM9wW9bWwYwd\nfnixuC3OBkv/27fvxJdO56B5dNNOcESTGo0AfmzuTCv+5x3ALRw+D/SvH6r9\npB7ZHHTxgbUljWhIpuewZifLULinikE5ZRegAiiZ4Id2I20DCW7bPrG2+1Nm\nkpCK0mo+4ArmeVL9QNkP/ryB1/mDIbQSLbdfL7ON4351PkBz4mO1Sfu4IUyB\ngcvVMb3+c+7eht2q2lcOvAy11C9jvPEvO7UFu4XN2BBY7dnBk4enYUqkJ3sd\n6FRdzNnSIDlUJmUD+QYKW0lB7u0nIIic9EQ8KsKpqqLA6wq2TWKUFGS+eBZ5\nn0eFh78VpT5kfP2701gp5iKgDgeQa1E24BkiX03KZXfs0vYXrwCG89fRXoZM\n8EIN\r\n=JXrS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"4ae0646ee4799af16728ba44ae579b4dc933b75b","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.0-alpha.18+4ae0646","@apollosproject/server-core":"^1.0.0-alpha.18+4ae0646"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.0.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.0-alpha.18_1561641192819_0.3575530021383111","host":"s3://npm-registry-packages"}},"1.0.0-alpha.19":{"name":"@apollosproject/data-connector-rock","version":"1.0.0-alpha.19","_id":"@apollosproject/data-connector-rock@1.0.0-alpha.19","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"6f8c761c2ae563fb1a582c679e04822d0dd29cf1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.0-alpha.19.tgz","fileCount":60,"integrity":"sha512-1oOgYWiIsvyAnJCskhyBvuz4telyNWhgDzBGhHVP9qmWv97MfBngxE9U3mvMbv/eUEHRzD4Onc9RZxaheYi3UA==","signatures":[{"sig":"MEUCIF1lactFJ5nnLhgIyzejMXbjkeZA6hzyvGDWjjiq9FoLAiEAo9xls7+jWn/iDNCIdhb9nNhLPzlwVN1oeNXHUloFgsY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":561101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFR/6CRA9TVsSAnZWagAA2k4P/1g45U00Zfqa/ocz1+0V\nDTgFAOrNYDvLrZgU/fX4nN/kwcZecaDGioi3Kx0LByaO0ABneZYhZwfv/JlV\nPkJrT/h9EPTsvc+mcJyIwB0kgXESwYi0uzWWr98TFQjnUDB3WCDng9n4vsFG\nHVzRezQj9mS8snGxUOvLA/kc7YJfDZXFNz56V985u16HXTw4xWoCwcgaGOKV\nBsp+s4hYul1pKldaHvB7xTBF8mJ2QhsQfxFNZXiW1Mez3Ui9V3z8M3iB1oRA\nI91wvwjmaLVGD/04V3bSiWg3RQ3xf7WayEiLJkfeWiYunl4EsO84z4t/RRHH\nhD3SjlvPg0L8xm9soWL7hiAGkG9eGtD9WlBiDClFOxInXhGi9v/D4KDNVKAT\neVDZ/2PfP/OX+tZikoe8AfUubMT63WNAfMOPemXY8bUUwlV8D86cAAtUxi6J\nCQkj0g4+x6D5hf2PPvS6fxsyD4oQKLUUNtyd8FyTtYdKkK6BaHJuzAISNGri\n2G25Pv/U0AMVPPVA93/plriPNx9vZM7PCf8aFI5oFy0cZrG9lELdDAdgxx+9\nITgWOL3lPwofNS5AAKuFBmv7Ny2LOkBcSv3F2bpthqjd5dvHFZkQUNtJn92o\nylDnawXNnda9u3bm6qtsaHXhtQpEiDHZ20r8SUqwKA8k6XAuRuLsL8FgduaJ\nIDYx\r\n=DTer\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"036a82637dbeca0b0384b233fd9e1d8cf01a4f79","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.0-beta.0","@apollosproject/server-core":"^1.0.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.0.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.0-alpha.19_1561665529384_0.0123623350760389","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@apollosproject/data-connector-rock","version":"1.0.0","_id":"@apollosproject/data-connector-rock@1.0.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"bf382cc9f32bac3e9a350a14d1d94f28a75b9285","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.0.tgz","fileCount":60,"integrity":"sha512-N+Q442BXI/BL2gqATeBiVuER+6XJjGX8qx2OZsZ4k+Tn8etcVNuKelfG4xMIzO4gcIuHiN4oUaEimZZVKPBqMw==","signatures":[{"sig":"MEUCIQDIScxJ3wx5OfNmeNi1MkY2QWhbRJCyX+nX9jmmC4ThVwIgIJY8MhxNjP956Va7QqAcNt5NxCNNzP/PSAE/CIPeV9Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":561070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFW/aCRA9TVsSAnZWagAAnXoP/1KjYWw+Au7+U/rRrP2h\n6zwERchyXqysEoKr3DJ2lIMy4h3p8PtH9Xl9L3XB+Y7/xjRXDw04APK1+Tr6\nEsvTXYQu4JF8I0FgcsR31jq1e9q5WUBu9UUuYoxhds1VvPY0V9QSxDw1sH4d\nNH5+uoQFUvhZMDmxRgRJgF9qyVXax6D4n7oBWHUs0vsUMLt9JhCNvGiZtWIU\nKM5hdptGGhEVGufHkUyIWkLVoOr8EJDwG+/YDQ+nHI2gNcMHeD4dH/sFLO/i\nvxmhfBa9P8rGN5QJjwEb3HijQVtMHdO4hntJHkOObv4ii077P7flSPXcry1b\neAcGEDctcjJOhQXUwhJQQqy5i921o08JhdTD4G87tcCX4js9iMcyp5GvB/uW\n4K3DtmqPXOp+nMbySSglVrSYju8HP5IqUB+syD9i5LDh6ZtTg48JfNHIR7Ru\nlmbfR6n5SpPt8Ozugk8hZUD962ZGGrJVH4QuVuK3VXGc9WjJOjAtkgP8zk81\nLg7DQt7xYnhEu1Jj9agtVH7vE2DmsMIo3iZvkXpHpuq9+jUWqw1Z+J1pJXoD\nugPVg6z4ejhERAY2sOPELkuHlWHJsbO7AoMM3rZQXcbDaUu7XcOFXsHawYrt\ns2ITL66sE8YF2FK0VPhXqE1Rvqq6v8tXqyvFFzimqlFncdo1wxvIq4PTSuZp\nCfW7\r\n=G7ts\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"a0c71fe1d1218725f19654d2d877f7dc988a6985","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.13.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.13.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.0","@apollosproject/server-core":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.0.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.0_1561685977814_0.1653145713571753","host":"s3://npm-registry-packages"}},"1.0.1-alpha.0":{"name":"@apollosproject/data-connector-rock","version":"1.0.1-alpha.0","_id":"@apollosproject/data-connector-rock@1.0.1-alpha.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9f1e98bfc4e949042aa62102e7e0f092ebc4f9d1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.1-alpha.0.tgz","fileCount":60,"integrity":"sha512-JJeB70KnY+4JDiFMbP8+l0LikvCV9YkSEBeMugUqd2NJS01C/hYqHx/Xtsf45lb13mk8ppD84XOpCp6bOvmHsw==","signatures":[{"sig":"MEUCIHdUui6WXcxkzD7qmAQn1HHqFFlJDcKgZi1Zk1VHZIcCAiEAmKpPbK1X+A7qWe2sB3BURA/Oxhtl2EWIUROwj8uFJ8A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":577506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFimMCRA9TVsSAnZWagAAI6EP/AkiWc7VkZD4NgjO86B5\nfdsFcSEjTkMOvc6mOZParLAyUklDYZE7DtS3RE/mfkeVaLqR8BD8iwRmlh8Z\nsGdDuJ8C/zfFu9goF6dmCcvwZ6tFwnDn0qrOmf1FlEh7VVO7BghIECWQbguP\nt3cxiDMHKvnu/NzS9ZDimRrx32UYKvkCj2ZR0mdN2BYYhHlirscmNPhDY9JL\nIkAoteMv7D2hWezrF1Cuwgs1DpKpupEVwC6LJ/slsxdBY8q/w7MRyKDFd6SL\n05+J5exjvY1eCZOQPzMigPHmGIvHOiw2GWMGHycSYJ6I1UcKhUEExdxtt/+o\nscKp07f5R5ek/4sSvfe/p8MN67xOQt3NNrMu/AZ0l10V99/NarFdhgn+AWBF\nOZ2RjzneJ3BKISU4/zlF0Vy7Wpwuz0UZX5M5R06mhPRkFuWYWTHyNS7H5jTN\nkK4+0xcqo16Dk5A4eoBjFZZlRHNQOgWf0FFroqXxm8vvSOXupgUu5/6R9oE+\nr/ZBDwUcv8BOzLDUVlNclmBRM1683wsAZ06A1VdliY3YwrSVz0ckO88LCdWC\nft+nyeMw8BmYRDz1KUPS1/RFCe/YEFdlpbTp3wow7usXvVkU6L1aiPgIdA4X\nIdZtYs1eRQEZxW/odcGAX+MBZhsvXd0+7axemU2ze4crm+40lCLYsvPbz4M0\nzzw7\r\n=nHzE\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"62b9f9e2881980436cdba410d29eae0bbd9a3365","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.0","@apollosproject/server-core":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.0.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.1-alpha.0_1561733515363_0.7049400474513119","host":"s3://npm-registry-packages"}},"1.0.1-alpha.1":{"name":"@apollosproject/data-connector-rock","version":"1.0.1-alpha.1","_id":"@apollosproject/data-connector-rock@1.0.1-alpha.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"4c1eb8dc25eeefa6d51e2f801d24f01db360fa1b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.1-alpha.1.tgz","fileCount":60,"integrity":"sha512-jwhqM+Mc81vfNTRGJrQHzeuKFxSTgM4ZjB9jCpNyKV8m0Jmhz2qMa8q7xi2ZiFqAiUnVmEqw9LaTyV4ZLNGm+A==","signatures":[{"sig":"MEUCIGZiCBG4BodVAXW6IQf982+HEfCBN/GRnsMLoeksi0jBAiEAkkVICXMT26RgtFbgiMtqoXCxsPHiLQhv06Vbm9N0D8w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":585786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGPpSCRA9TVsSAnZWagAAum0QAIHsWOyhriRnHJ8hfDoO\nOWBxq4yr7F1Wn2X0bwUNFt9fqFexpqgZKqZntTvKERrzKmz1cqgxKedhJ/ff\nQawHT4vGa/dh8wBu8mFFx6h5/2OJBFq9o4LZ0LWxQwKKwjiWAye8kyKxjwzF\nkqO8pUXZ7qgPQozEo66YgioXsvTiMp+YZS/u3gakehjxwMHXV8fdhcVq+VA7\nR179zz8I7weIsc2f6VI395QrCpCkvIkPjpyVovFsnRTp3S2MfmWVrc/n8oJS\nyl/hBV4/ZKry5cjpQ1yLGKcHp7692DzlEe7/dCOcxqGnWQtYe30tC4FPoD9t\nmvKqHAKFprDUIwZvz036zcxTFkYj1U0vgNu1ZWAtq3o3Cp5KRCqDb13QiUJd\n8RI0+TN+XmurLvSWpL+3UDNScHzCXjHloJhoiBtOApVF39xZQy2hEH6+/3SA\nTJ5AG1JlGmMuq5ht0NLnh8G2SlhtQoI0Q5zQQzwtjxDgjcE+tjKUdoE68xQ+\ncVsnSEz7NsXF/uIZiua45HXO0N0MqTYEobjJPtePhe4gwd/nlBlUwnjj6TL/\nnsnwnHK2fq3KZdpM+aWRlOzI/3CPmwxI/l1ZMr57xCqTZQsp7xvuvopTq/O/\nl5Z/t6RxqdMCuB9mPMtCr0LlyoDEDOP2TyjRwohwUJMW64LMMdvs/fi7eurd\nkXbJ\r\n=qSOY\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"afbdb850ebea0906f28837571e8413bd07744f12","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.1-alpha.1+afbdb85","@apollosproject/server-core":"^1.0.1-alpha.1+afbdb85"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.0.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.1-alpha.1_1561918034152_0.5903128390788692","host":"s3://npm-registry-packages"}},"1.0.1-alpha.2":{"name":"@apollosproject/data-connector-rock","version":"1.0.1-alpha.2","_id":"@apollosproject/data-connector-rock@1.0.1-alpha.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"b9326c5784f83c85697f7cb2c11c20cb3db752e5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.1-alpha.2.tgz","fileCount":60,"integrity":"sha512-dqNmiWymDxJ6ceuKDXNSxuh9iePOJmp/qeklLFmeUstTYRGwTtZu/gAN0xRSR+xu1sQXayKrje0ytbFMlaHDsA==","signatures":[{"sig":"MEUCIEys1U/vdl6OPyMB1f8m0nZWyegPAk1tz3qTc1QORopKAiEApqLPja7evYUB95ewdWELCEHrA8o3iyr/Xr4zknCrKjE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":585804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGQJwCRA9TVsSAnZWagAAHKMP/1nSp+5k7ibmS+uTiBuB\n1BayLkLEKQZ1kJ0/BsmXRVgB5BYpbGcT5ZmWUWHqooVRG31Rg5dtBy66Va2p\nENkz1S0i6nciyvrgb7YtdLQoWmeDxVcdXobcSgoGPWJj96v6cJzheQs6yV2G\nNCMZK5jQnAhWtThWhErxVBVykOBXT1NyfICBKpMfFeYB1/DQzgQMGQyBnnyy\n2euZ/wpHIs4P7UlwQvEEELC4Wpb+XDO8PoiqG/DWpZVVaFDImEKiFCkp5pxT\nqsbsYZ2DaU6AgmFJt6dw4Osu1JjWQy4oG4i1WsiNUpHnf6pLntgXc9IXtL1L\nBq1dwQhSYNRPgcDf6lgVntoKJwiuOhgsgXkmiK49sUINBoXqccIVGP6DB11K\n/W+dO4sypYZSPQ6nTtDseTI4K3jx4bLUUOwVc6S2iLpf/lGUsX/c/9dUMPzE\nTw6igFuJTlhTZ7bRFdLY9fA0DCnPcwvgYrA3oONMczYdjoYvV63bEkfb4uq/\n+E1Ka3gTN0ncjitv8NCJkWoxkGF8PM0rFeDQUYzPIZ7cgncTSHFIoUUabCug\n4tYJvq1x3Mt/qZAdLzrQEtJ2Am72/JEeb2EXdIFXXhFmS+DFLlH8DmmwYt4h\nwtm+UUrx08DKGOeDrkvJeeI2Ps/s+dpgZsnK1QZ2PduQSpxU6E/CAh/39RjK\n3YWT\r\n=v8Ki\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"75dd28ba8443d80b09d64e01dcff2f62526da900","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.1-alpha.2+75dd28b","@apollosproject/server-core":"^1.0.1-alpha.2+75dd28b"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.1-alpha.2+75dd28b","@apollosproject/apollo-server-env-mock":"^1.0.1-alpha.2+75dd28b"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.1-alpha.2_1561920111299_0.8369396822300157","host":"s3://npm-registry-packages"}},"1.0.1-alpha.5":{"name":"@apollosproject/data-connector-rock","version":"1.0.1-alpha.5","_id":"@apollosproject/data-connector-rock@1.0.1-alpha.5","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"47c02e08040372c4f42b6ec61992cfdf36f0681c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.1-alpha.5.tgz","fileCount":60,"integrity":"sha512-BTBrGr10jV+RtzramgwQwlHlLIbiHGR1j54uT/tskvKomhwzeLdmCwcV2EI9Gb7/VRGyn+JSfpTwEdprtKxBoQ==","signatures":[{"sig":"MEQCIDe3X7BWkIRjuTZ81ksCr0+i8AhZrINIAXhgSO13PevEAiAGcrso+y6nxnK6NoXOXuXRX1P0MCfpOZ5yzLVXBJOpJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHKuGCRA9TVsSAnZWagAAsfMP/2oyJ4oyWaSmilT9qHMw\nkNVxg3sVl/ZO+GHiWmBZ+Jy1Z/WNYMOVfXnhqHMsFG4u4JBHFttQ3rYHm7Dl\ns/mHMAqGXahBgAJBpbTGOvWxK9+DzyajhZ2VK/KT53mLWi1dfjuRqfOR1gzv\nDTV0OmK8SY0iOZ+NCOZMWKjXUZhEoxvGPbV1UBwnrZFEwCk8WDRgvGpcUheQ\njgY+6L3hggoyJlveznmgcgXUgiJMeafdwKIcwKKq0L3u6+CZDzWGxNHKEbYB\nKePCty3xE6SJYXWT3P/ihM7/qwfIrmgVbgg4FA5FV+UUN/9/If5KhshSqghk\nFC2/txbYdI2SYq410Olui91BVOh/AR2qv1w01AVjRzCppDkYabmtWPso2nTU\ndj2T+g9ZWxHZMVagH+Rird/mKiZsdiA/S9DkSdkxEvpR+zijzcoe+Ax/ounQ\ngAyI32Mop6Qk3za6PEyaUlPqvkr4g9NmUTMsx+SnTFfZt6i9MCyoSGNDE+OE\ns8+R7IzJ4Fz5/UVxz+WhCRodz4Rc/zo5xLI2RWZVYum928gBiMv+X2fXiqVc\nV3ZcAYMCsBzDElQ/BY362HjJaT8s2y9KdwMo1oKL3xB/nj4X4w47LXQ3TcGi\noW4EmbxAmIyPQ68EiAw26p/DlmJKpDjWAyaaU0ueTs8tQy4z1lIq0d2k9FQI\nDJS8\r\n=xUC2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"f295ff95fd74374891807f892ecd9f81d5ea8a86","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.0","@apollosproject/server-core":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0","@apollosproject/apollo-server-env-mock":"^1.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.1-alpha.5_1562160005946_0.5829384140843352","host":"s3://npm-registry-packages"}},"1.0.1-alpha.8":{"name":"@apollosproject/data-connector-rock","version":"1.0.1-alpha.8","_id":"@apollosproject/data-connector-rock@1.0.1-alpha.8","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"f0a6fcdee3dca875245086534e4ce67d17f85119","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.1-alpha.8.tgz","fileCount":60,"integrity":"sha512-8ZHutNSzJ/zlnT95eq2omCoEnEXsJ2KP/nVYy1Q7eEKLBw3JsHNzlkcjqErRMTumF2Oxt1NtaYrACmGEL9H5+Q==","signatures":[{"sig":"MEQCICmoBrUO0YxELSQL+6BFfa6XfyIn+Iew2H3G+vRQtVp3AiBU7pkPkLYr/SBTZQfDJVbQJoKGNTLDNAEmcEJMDBbG3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":603080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJirvCRA9TVsSAnZWagAA2McQAJFEhK5CEl41yWdlgRD0\nUJtOOyE2E/NpjJ16+tmuLrpu3m4JxZZ1LC5erNiNIju/t5SEi8hb7K1LOO6P\nj8HXekMwOMEr3UkAgZ8h3wRIsCCGHZY+gZEqVA3SG2vj4KseDcRCmJKJ+yHh\nUF/YRdilT5khSvUg6qGF4d02gI/0x3HRd2dHOFhgU+DNvNEvF4GmrkUW4Phy\n55QGliR+qT8Mr2xAzL79j7xFBPezQ3N12FaphxrU0XJOTBVpR0zejFQXk98x\nBq7aBUTGp6+HGMQv74e0l0zEiT2c9YiKuS4xASL8S6ZGlhi+Is5ivYkeOcp8\nUKLywhYGi89vjU4eX8qwsmVdw49tuJxGGwtn6imJgst+dc9jMj76j8ulqdUf\nj7N/26PiE6OyclpCxxAoQtzN3a0iLyfqW8RLytWvG+7FXOEhK5s4mujQhmr1\nrRbo9nnOytv8lvZX/JAJq53wdXnlEXuMto6hc8vIfZcDlwWhu7m/A/fAE7tL\nZSCvygeN/u5ktwXoNCIpEf48ontJPHMzqY80O84BLnPIYyr3xPAOyFJdUPbY\nrKS1HV6St2gb0POxsEu13kMGIxvZUqWBhWR1ex+FehQNi+2nMqCKSqjIZ8ID\n9CJT1w4gV5OXaHGJQ5R50Ox+7ubhF3k5Qrf1xZFTvlklrckBIOg+YYJWeq+c\nYq4y\r\n=mjXl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"5e15830fd1c798e6242498d1579ddedc255e50af","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.1-alpha.8+5e15830","@apollosproject/server-core":"^1.0.1-alpha.8+5e15830"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0","@apollosproject/apollo-server-env-mock":"^1.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.1-alpha.8_1562782447315_0.7101288616019528","host":"s3://npm-registry-packages"}},"1.0.1-alpha.19":{"name":"@apollosproject/data-connector-rock","version":"1.0.1-alpha.19","_id":"@apollosproject/data-connector-rock@1.0.1-alpha.19","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"db2283191b6754f96c6050449b2cf04d25dee9b2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.1-alpha.19.tgz","fileCount":60,"integrity":"sha512-6QrxB1TJ1h6KLTdjFDPntZzZ6ZA7qi5ef+0042QVjE46bYcyyjCV/i9HSabKUOr+RH8rGkHVMWLt4fD5nio7AQ==","signatures":[{"sig":"MEQCICRPJdKMeVCjkL3ujNEqUgc0j2xK3nGIZ/XWV7WguV3FAiB0b9ljU+2Xy6yAb74EIG7kfItcHYyyf+rfUdDpO8+UQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":611028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLe5SCRA9TVsSAnZWagAAjB0P/2ZdnOYRiyCuhgcohNTk\nJDdDOMz4yH3MnRTkIYI9rb3xnYmkkmyQ1tEnMiFSbui6/ognhBVJbVddBGWD\nw1i9NtMUWQQY62ZjO0sGUrrx8gMhyhDoUBfDZUNgrwNSwaEwgeFSve4XllPo\nCXWXq4jWmHDaeBtmU14HY0xvGQFYcvfTV9ecYmb6K7W2wK8U1/7HpTVcKzz/\nlRMaSWS+MWpazNNlapJuBYqwsvapwe2ZQgxi9UExeQi0iSdjH5WELnNBr7jT\n3XjYKORpQ2Ue6NuXYEiUmyCEfltucmRiREZrra8xVNNFxNI1TjkzJl28jMXH\nG0BlR+gbHvQ+A7v+7r3N6WJGwr1Z4sk9PRQnwuqwZ1XwGD7U4eW3vd1SpCBT\nSWmK13QiglcPXVVOVi4yT5K2BcfpHkV8cF/HImFAl4IFCADjosW6VIIdFTn2\nP4XjL7cdxksBuE2YoZp3aj8KQ4X45YHqmuvMw6/q2onBD1T0YXwFtaVH5cQb\nBxu3cEaM1ik5PF/sXe/G7VM2QSSrWo26IK3KQnRBZ9QnX6cLPrP0ACo3fmY8\nGaAxA4JttvQv9mbLz6hhuovAONxhSjWf4JwIQQjvnMfdUaExYJc5trc0oSNU\ndW0VgqLehs02vD3nyPRZclM78Hy/lW+AxRYVwFiqvZwppgqRUUw3kh+do94x\nD86L\r\n=OBle\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"9a47953e3b976c4ed04c6bbe25cde2f9f659c9ac","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.0","@apollosproject/server-core":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.0","@apollosproject/apollo-server-env-mock":"^1.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.1-alpha.19_1563291217989_0.6918914374469238","host":"s3://npm-registry-packages"}},"1.0.1-1.1.0-beta.0.0":{"name":"@apollosproject/data-connector-rock","version":"1.0.1-1.1.0-beta.0.0","_id":"@apollosproject/data-connector-rock@1.0.1-1.1.0-beta.0.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"22c29343b85ca50e6252af794dbab46a16d8b3ee","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.0.1-1.1.0-beta.0.0.tgz","fileCount":60,"integrity":"sha512-7aXQHlXWPtLjG3Q1QvFeDNvsQ7wIiSf3W2zlKCv07qYIbZUN5bMk4EozH6LAkhmEZ886IO5ltVHWnjBirL9OQQ==","signatures":[{"sig":"MEYCIQCwQTCvTZ18rP1PmGxJ+mPbFePZJR7n7ag5zOv7mxskHQIhANMw5F6mp85EDb7bvazodyIVDSga3OVK7IhkHjKXlrJK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":611086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLhK1CRA9TVsSAnZWagAAvEsP/iidJ+gJet37IibdM5Rw\nCSaULwaGqpOaYCl2VPcdy/Wmc+Wm5NV8A2YNoQ6fcvs34YRfIRFBDjoDy/YX\n+1qzspupoSF7ZkyurcrgeIuu3mdc7O+bG987zIrIkyAaOI3N7Hf1Ik2qKLGh\ncuQxh+Bz4YDQSYNI2cOVcpMxe4ZAOGzCGJ9xe8vResqlubRNmlvndSzEbuwC\n1JzsANU0KDVtpe5fRVUz2RK0x+j3PVVfZ6VXO0UPP9fay9miMDXuVgmxIep3\nLNZskfz2dGyGPR+JTX4ZRdhvC8siYbLYcl6cFwMI6RuLRfw04ObHVau1JjfM\n/uL0Sr54UEI8Qq4/x0UOYhaow47QL7SnjrdexuZFRmX/Wma8VXM71EtDAO3P\niCp4pePZ6Kt63I/tHmH1TnbhOiVni/MDGB+s3CuxAJl/l1i4ewLWjEhgz+xx\n574xR6VJzH35ftLEWePWLq8D5QGIO4j80ALj6Wstzh0YWGmVVP3ERf8IKKhM\ntYB0S1As66eJ4Aebyr39HSroJsj6y/zhIj11vyowXNqKqLjTGF7cAZ4m7Fno\nBMrOpEICo9iEr+jPCSCHqd9p2CCF2D0VG2ak1ehHCiaCXZl94EKfF6eQWzDT\nf+mjGLlRitMjdEAorXza2E2N7nqSL1PdvNvg4L1vbBI2IG1mw4V4oRwTjFl0\nRzr3\r\n=kqGH\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"8e3f11fe42299602f3b25f5791b0d83314177d35","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.0.1-1.1.0-beta.0.0","@apollosproject/server-core":"^1.0.1-1.1.0-beta.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.0.1-1.1.0-beta.0.0","@apollosproject/apollo-server-env-mock":"^1.0.1-1.1.0-beta.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.0.1-1.1.0-beta.0.0_1563300533323_0.6289433307911476","host":"s3://npm-registry-packages"}},"1.1.0-beta.0":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-beta.0","_id":"@apollosproject/data-connector-rock@1.1.0-beta.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"e9051041357ca8fed55be61a00abe00fbe16759d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-beta.0.tgz","fileCount":60,"integrity":"sha512-tcc2NAkvdnqo95lXf0KuPEh5vaIz/ZDphUsguu6tnhdHfc6+pSzU3qOge8mSzMsfni+2nNb1pYuBko3ceuFe7g==","signatures":[{"sig":"MEYCIQCBhTlxLSF9aP+tDxRsRCu3LRYr96ofQ1nqNP49FoTLDgIhAKIrIyDyjB1AhNSJcwMeQ0xM4rpP6OBujhrw3GAd08ZD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":611046,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLhN8CRA9TVsSAnZWagAAIkoP/A4wiqxv4DkP54hgLYPu\n4S5QdhJvjDBBsezVh/ZIGuMdK0Rr+ZilzMYF6ZsrmYXq7R4ropIvy2HkJCPb\n7EtVuMkHgguCAcLz/J71xB24jMJVBQSwy3J2w95s9J5e6Mj7vBJayZAIy/R5\nDhZrhTUnF9ljocV/DtV95QV295b0qG9MJsIM7E/jTfHs88aTZKzwHYYVAqH9\n6ZpE4gCNqiSlw+dLXqWT6Yy1ztECP8KqJjdj5+takDe/WoGz5KHkKHRNdFyd\nNlfZVGlVHCwVMqIbU+mO5CJIMHkLEYkDANmtwPTDYI0STZLzIF7UkZs0UVwE\nLsWkh5AEjUndhCW5s//AXveH2dD1JM6GCAjnqFsQw2EvrDTcDrMr00vE2GTb\nNJZEbGzzfk9jENpgj3FNIpj3l7OvpWS3M3bB6jB0HjjuMasEYYBAarnrLjAt\nRLpWAR7JNx6mxg9n17/3LI9MAe/w8VM6GkkBt/UPdba+HJjUjjry14MElI9t\nw0yRIPNHlp4DdpNIVc3EcLCOBc8z3uaG4CtyPRGJ0DFLaANmZIbPgJqs5bMz\nrjRfT1sUJIYsoWxAC/hY3R7G6uk1mp/IPHsxFR39CFQJC6NGnrTUlnusp11f\nIujGZlKzA4CalzjIF3NIqGLItgLtQbJj4babNy1pMzU9uwi3IO8K9XVup8SL\nAUtO\r\n=mLCT\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"bbeb5c282dadb4ac458078064e57f3f7ddd7a0ff","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.0","@apollosproject/server-core":"^1.1.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-beta.0_1563300731369_0.050268334400256354","host":"s3://npm-registry-packages"}},"1.1.0-alpha.1":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.1","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"b506a041712e92d1f02152f32b3866b30849a73b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.1.tgz","fileCount":60,"integrity":"sha512-U+MSqd2ZPS54J1/fpu38RVDW0us8Tz5oI5MxuLhXiBoYQ/WLF/KCY4d8jndD00wOuYKWUtJuaFLkbxCmj36SNQ==","signatures":[{"sig":"MEUCIQDWErKnOPpE3qv3cGO3Qa8qfvD0ShHMK4Vjmo29JLnOLQIgVkGg6jOTZ41XCPItGf6Sk0mrdFcH5YS95GxHkCXKXbc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":611080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdL2DRCRA9TVsSAnZWagAADJQP/3SYIC8KOCMtisy70GWR\nPBErX43bZx5zXedFtlSBzsjPVJ4dDDbq+qnCQhuR9AvvY/dFNIb7fmNrimbt\ng6DtK9uVDnqn+j3+jREYUPgedPNqK0oQJh8lmvUYkyDM4wSnLTPC/80h+31D\nLjubUyHWTdTNWOD1TE4Wmq8LB8Y8IotQYpztknnFRhLGniFm0hsT7BZpdTUW\noh2cHp2xUGW1BV55C7nldHTqAv7MfDm8uBZ3KgNEqkIvdkIuHfjMrkFtmhps\nuYyblSudBUML2atyiS5q22OlaWR6sh2bps7hTThgZGayr177rb49FJXQs6ld\nkvpmXYf7yooEMw7AQR6ZhoVYaQdkwE1CZFvYN0YFouIBp4pUdIKETXkDM54A\nM959ld7SAYfZlIbyZJnaa2MggKC4Fs6YQLjiwLlrK5QcULH6Tc28t20gKYey\neBAE26UrBCTZVCYIT+fZEbzTwZVEJa2hbSIp4cTgR42rWPIZYKOKA2ES0vM8\nekcFyEIJqURN8BzfIlXbvAfHz1bEsFr4leidQ9vT4BAg+x4OSh6nZNbuAJwT\n/bZ7cyZwNMjPER9SuvahoSlfj5q9Vd0AmtCtG56+APSCpvgf3IveIQTKueOi\nYZqg1c2DMAYJ0/Ff1khPD8iqimFsbrMKzRFol8OJOomv4foUKMPzpexu7Lzd\nUGe7\r\n=6wbQ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"ffc2b45237bfff57f3b72c828d6470080bf0b926","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.0","@apollosproject/server-core":"^1.1.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.1_1563386064419_0.14415333529738583","host":"s3://npm-registry-packages"}},"1.1.0-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.4","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"d75a539029b6f896b1f039bd4a8b5172193ff4f3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.4.tgz","fileCount":60,"integrity":"sha512-UmsGYgJo5Wk8vApfQ0JVz/1EHvYeSMcRoZHF4Kho0/z06Kbv6s5p5f3/pmBn/ig8GMjnZN+jnTp4gvvud6iOFg==","signatures":[{"sig":"MEYCIQDhf0ZQMiOUmhOEXwuG7fqypdlbZ2xSqCbvN1T1MwiwTAIhANfNSiJAjebep+J7bHlafrG89kMpp+4Rddd+bpssYNGO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":617457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMI6oCRA9TVsSAnZWagAAfyYP/2jO+w/ARlgQ2IpVpZUy\nvqDoA8Ortx1IcqqV8MaS2CaMK7lvzNb3fDAKWidmjGu04RKMEHldn5Hn2WZb\n/Skmx9RzyodVLU1XWhiO9xzpFcpCdoYBD3bd+PPRUVggS3B1icQ969q7cAEk\nM3smAFfXcaEXVLi+9NN0yteUHk4zKSX+Bh7PBIQXUkQ8AlaNRGnzkwu1Jnhu\nXFTTmqiiYPJnB4jkQ1PayrBcWFLwlYP6Yg/o8bshGJBbju453OF938WfaZcB\nRci6qonMGFKnOx4xGUXHE8uKHzvShvyLCljVt6DV+AiDKRGPz7757zMGxpEC\n5/sdD/nZd1PotTT6OmTWYRnGWBjge2+SMm/FCu+q1EBSFijz6SpRxtV2GWFv\na2/88I1z9BFg7gBtnV2Q00mPvuVGYmxGVlgJhZwvtlDzqOInVJERFA6e+m2z\nq4Kl2hXrQI8or76/WzNoquP+Sy7uIz4tGt1U8+ba1RosTFS/4uyqtxXdFeSi\ns4o350CntK8ZC3Qch/8HKs0+d47sekvDlUOrnegUZ8hFlaTwbFxEorMBBp10\n0d5OkNwmTJOGKSA5L1jCoIn/GwsWyQRoa9uNyJ08X3UnDwsKkbEUaKIsAGmy\n9Fi9RCJ+F8fFBGx6dEfpKYve4yUo/A5uDfimtYqSPTau2dXWMv0zmhpQZMpv\nx4SI\r\n=fuTA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"92d83e92d02f9311ecd2a326f9ac9e038ea4f02f","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.0","@apollosproject/server-core":"^1.1.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.4_1563463335753_0.04057128420507272","host":"s3://npm-registry-packages"}},"1.1.0-alpha.8":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.8","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.8","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"d89fdb1591f5733cda487e7df8acd9d055cfeb20","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.8.tgz","fileCount":60,"integrity":"sha512-oSv7OYqAmaGwPId3tuT3PtpUIgRHR5KI5l59rKVufgqTTA8F2DQZr7S3CPDNh1mrwRcDttu49k/J/hImBV6vMQ==","signatures":[{"sig":"MEUCIF/zs0nirGIw25FOVyKEBlXiRqnUHbkL4k9Lh3YXp7ESAiEA0/40UUVgR45Bv2C+q+ovNtN8nQvVqgawXJBE9yvTvQU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":625096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNb3LCRA9TVsSAnZWagAAc/wQAKB8Do4DmG3T4qQlwz6B\nozsegCD0S03oHjZJt9nDuoIuik7ODo6BsRzMN9nvp2BXuO9QlAqhGus6K6NM\nlRLftKyalS9aaHM3CXQuN5QD3r8YLMnPIWPE6brPhZ5XmAFuqa4UIHpE02+I\nMTkbutse05i/BEFTxeRKURaGLSWGnEqpVzMoneBBJ/orUW8fR17BfNSdppz3\n1QQN80fYpTk+3LIBj2Ydi0G8zrt5C4t9ys8Ehb6Kxmb4IWgyYByUgO51dQ38\n3XhKCkyDOypDAIovfWOHMO2hcP51TAl6NuqhiVMfFx56L3W100T84u0L7oWJ\n0R+5TG/Aa5lrpGuD5OikujOi43i/05lWyBNUGwJRqYkMeQNB803Mdkjv3LCN\nwHEnCw8zyv1YK4dNmt+3YqWxSOno1M/eySJWF1LBadEFBwcJosdWLQv/3rNL\nx3m/NGCYUjpqFXeJAST85uvD+WrLi+zW4nTLkKaM1Z79rOloNcNi29Y+0mWs\naj8bkWV+jRgZ8i+w4Rhb5w7EtPLzWd7YBTw6Uj4Bw/R81HUSVPK82OjpwfdP\nTmIOAqPdQ5QjKg8ffF6fQNnqkCvyrNGHkpApvJzKHWzS3ep3oFbeJc4ySLA/\nXCz8MfH1h+2x/n67FxwbIDFZC462EG6434MaaQG+KJBESYFCaHwB6QgsBds0\neiIL\r\n=6LQ0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"dc2fbd2a6b3ac408b7a66d3ccd867fd8f27c2af4","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-alpha.8+dc2fbd2","@apollosproject/server-core":"^1.1.0-alpha.8+dc2fbd2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.8_1563803082704_0.44476487816410604","host":"s3://npm-registry-packages"}},"1.1.0-alpha.16":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.16","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.16","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"048d852a009055b22acc198cfd9667a57367a89a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.16.tgz","fileCount":60,"integrity":"sha512-++3TJJ0teCCdRaZldk+vowdtLU8QIekLLGbzd7XkpWlqJJkpAWtx2PXkcJuTx4IkdbEoqjxB77Hfg+fkdQPW1A==","signatures":[{"sig":"MEQCIHuakGVptSZsNgxgWKnzqScBErRT+buRO4n9MsvXHe7YAiAXxRigepPnmRPCDxEZiMCMlfLUUeJGyC/JMEB0KtiUlQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":625663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOarsCRA9TVsSAnZWagAAM3AQAJi1ouHekqBE+atlQKes\nHeHCPLoLJDpNxrniGQJhMFCDwVHFXXSZD5bzFuakwDbZyIhKs0x5gXSe4/VC\nnq8c1NIWYjvdf29BiygUHcNv/3EMpUDLtCPLT6yN3B6HUT2fBp4OQ18Kmn6t\n+24ZYznGqPqt1LdUaAeZUeqGnXSGowdgz13KFqLPk7zMuj8xIcU6AcT00Oua\nh4B7TSOgQ/VcyAEmGwf2q4j54F5SZ1/Y9DEZ+1XKgBwnw7sLcDqlrduI+N8V\nX1TYaMWXlNsgSSuo/YT1r93gbbt3i2TplAYgm4cvFBDNq5dSjGuEmKPuIuqt\n8OhSZyAoUwDrURGHXIcaczsN7Pu0AKc0vRD1wZ+7pZLdNvoU0XgUyDkyxj3I\nv4crm4GG8+0iVwB2pa63KNzfUWm4Bjq0SPEFCd6LH5urBCCOd0AJOeIoShME\nkfXb/Us/OVZzpVz8idHGnTJm1YKzuNN1Hd169VM26IFQJ44pr3WSt5VCFTs8\nz2buo547KEtNjjVhg+1Gas3HaBbF/cuTUe8dYjzoZWwcgNJ560qch3bx47EK\nkwh5Q1qtE9YGjNPtSry5HNi4tyB8ZFUC/lMdbHGgan8w9oIQ/u5pmJGX/VQI\nIYHAWkTEH2AtXFODz/junkNn53GyZ6o1T3JZIxNV8uVua1ZIldkRfDmgUVCX\n/Xgh\r\n=uw0U\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"e41ab54bfb5c67d551829ea9c9b92328d4cdab4c","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.0","@apollosproject/server-core":"^1.1.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.16_1564060395377_0.17500538378248076","host":"s3://npm-registry-packages"}},"1.1.0-alpha.18":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.18","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.18","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"154f06b74c0caba3c505c8964dd840b6086bdfb9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.18.tgz","fileCount":60,"integrity":"sha512-QjUcx+DpH4rYGoiudPmWxuOUOlXvsvU4u5YgYgitiRFFZVqZ3dg938XGYkMBwWbJUR/llV857FEZG2216sH3oA==","signatures":[{"sig":"MEUCIEsRqQ+3a6oA4pFpnjjilSrdPbHprNPcRd0WEtMLZeT/AiEApA72+OIuZunW3eX4oxY4xlaDC/jE67+KNv8EeAK++M0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":625776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOeI5CRA9TVsSAnZWagAA5FcP/2vX8L9CEIH2vrx1GqXb\n0+G3mOE+t/7TOCTIFBhQYoLecV7vZ7I16mJRqZPR2izZTiVG73qJRU5aCs7O\nG6nOXznbZz22BzglmdRIGU6Cg7qHchsA7sAvoEsqeRtLctvBkzPaSrTWgn3T\nFa41hxFok3C/ZQTCY5NiyZPOq12UQLJZwvzzcvJI6+jnnY7oOeCk5X2ccRG0\n0hhgdGH3wXxg23Hy0RWUq3qQVrqO/w1ZHNBO40B7i5a0IOkCfGtnPUstUChK\neeMg3nio+EzrcT2UjowySejWQ+dMww5UycxgixaDUC9TID+fVCy/RjiJX3Xu\nccyl2X+IuRM7eTO0HSvMwFyqazKkLxwVcdwP2JtKoz+DMw8PVgKSDkzr3Gfq\ntU5eYDJngU9Z1BgZyB44Db0i1Asj4IHK0kj93xFPJK/+PV06wlfwrtazL8bw\nTufxBlLENaEdJFR9Bbiju33bNcZAbnuRxBNiBAG3bRErgYRs0iHr9wJgbqRu\namORS/rQIpW94ZaEdMmZb6rjv2DscPYv1wAIkByr2lRLzWRT+Cr+soJ5Zkgk\nqtPDN7jiws7yTqDpiXDU2/+TOOVoUYgttZyDmx7Vu6/cGUbZT6PvmoYF0C7j\nYNqsOrxCvU3UVDHedOZUPyY5vU2E/ILKR642oYIcdNu1z+pLZ3QTi5YgjhDt\nOyLH\r\n=b6tX\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"54d91ff61da09d52d0520405c13fe2b6cbe7a592","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.0","@apollosproject/server-core":"^1.1.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.18_1564074552608_0.7455545133611461","host":"s3://npm-registry-packages"}},"1.1.0-beta.1":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-beta.1","_id":"@apollosproject/data-connector-rock@1.1.0-beta.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"8bf12bd3a4bec656fa0937c7ae460ad2b3598dbf","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-beta.1.tgz","fileCount":60,"integrity":"sha512-uvElr/DJWven9uJfiX3LvYD+gNwnKZt3t7/xDGTaDE8I8nN0ny9Kbv+zsKkYQdXl8tVs8i8t3PGSGxxLO7M2Kg==","signatures":[{"sig":"MEMCIDOGf4ZUAZXtdgQY0E2U1pefg6S3lZs/RpJUicjyloO4Ah8lIFPbIlwV9XDCOxlTZX/oYB1LDVU/eLP3XiU1tgRe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":625766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPumuCRA9TVsSAnZWagAAIFMP/iW/dzbLlB3V3R4w4PBX\nrBxxf9ZGxyqagUvLy6zU9dM/5HRpd7pKo+Bl3f6qqZOXvsVrx14203fWJuKL\ng7iK/BmgO+EXJjZe5UTZl2CqWcLepNrhGd7VVucBnvO6vofaaUyQ/6YojQ1Q\nEFQzNKLHZwb/I2D2dLM7Rmk5WWt2paT3DAGvj7SG+iO/P5HeLYG95r9CtT/s\nytPX9qpoqTTRMFD6fYMCanCstjUdNtr+c85KiONyrpCF8uAcm3IgBgVecqrn\n22bXJ5vuD8MHd+slur79++UpbyBG6KyeLGnTmtrL1BZ/P1JZpQb88/dwJRr5\njJSrJe6Z0rp8IXAarQy+0Yebzb1177ICxq274Rp2Eh0Q3d4pvsEaBWcJMif9\ntxZ5pKPLAIyWiQdifcX3K42rFzhnygIt36l0K5qYKBFJ8+TpU5vE1tAKUFAc\nWldZ2aSEE4sBDl5ELxwHvc4DZ4mE5aaDTYRhN0+nFQhPHLtWUrsoEiOAD26m\nx8vIxZZ8xVZ50jDUtJA63PVPuyn7Om7ohzx7gDeckiEzGVrrtH+2QyABeUcU\ntNyMADATbj0zAbTEmrsOyr8FKVVz7/LrAmErGv5cLgpZizOuiyqvG3LYhhQD\nWI0MZ9m/KngsFgHPNDcg/irqbJxA8VU1A4zZFXTxyOwbwjm2XPUg7r9o98hO\n4TAo\r\n=7o0L\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"362e1ebf12a797044eb1d620689ad3a0eae6b99d","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.1","@apollosproject/server-core":"^1.1.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-beta.1_1564404135991_0.6449834280540494","host":"s3://npm-registry-packages"}},"1.1.0-alpha.24":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.24","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.24","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"2cab39ce43e5aa55620b7b64dbb326a5346de575","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.24.tgz","fileCount":60,"integrity":"sha512-+IS4tzjvSgqykgZrxtVcG/XbrgsLdY5T9cofWX/ZspBEBlxbVd2r2PU/WNrtj+N8FeW2m8imMFJjXkpubVa/2g==","signatures":[{"sig":"MEYCIQDeumd8+t+eq+Hdtlepm4piEYbB1bq2sucO8C5Ff8BJ4gIhAKwPC4IWiR7qeIgawYbDTRluy79oxbPA/V6KsA2VQqE4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":625816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPwBlCRA9TVsSAnZWagAAbywP/28LiCkTJblHihiK2HvJ\nbi/7upVabaTXbkAQLgat7IL5o4sPYV2hMhVTOdE4iHrmR3m9tok+FN///OV9\n7jG0dHAO874Q3/tMiSiltx0JznGW2mqnQoKJzhAiB/BkEr3E7qB3wsRytBbr\nV8uZbi0Nw5bC8COiW9cSyxKm2GgX4pd1xwlCh7E/tJqAbRl1kCZX3fOXo/Mj\n3HTm7h1csHuFBMw6FpDDqOUUanmg18b+9SBZVy4PuMMq75sQX5TrDEKL56q2\nQ/Ab0CEktOKyKsbTewPOWmr0/IqB2DYJvbkRgmJoGPpUgr30qva31/CsahDH\nC5Z0HGJohSxXwi8f/ppwf/1/mMTymivPx0KKRB7ZDJKjgjS1CzghhH0A7coH\nnqfI4PQLdtmTzQVxKzh+ZBcJaP2VlVExBzjNBiS/HfBfAs9pfptDSkcqrVmJ\nbxpv9BIzL7JvGKo74xumBYplVNnaCE4SFVopaMD/LqLHVFsJXgIOTm2lc2Lx\nmq+UC7PtfFp6ZUocykNIG9g7X2N5tMu0Zs5/tFowyXp2oOvtbCxHLU67NHCI\nyleDQLYBwllA++MZzqHi1OHtxpYemwJ7LKn8VVP1RdT6ejLzcF3BLxgBkJEy\n+teAI43VO3rBIXgLy/tG2p//EDn1DVALhZWg0LHkwlX2koL2Qpu0OuYpxB/i\nM3Wu\r\n=yAfy\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"047683b50d52588d85d3314ae7705e69e769d499","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-alpha.24+047683b","@apollosproject/server-core":"^1.1.0-alpha.24+047683b"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-alpha.24+047683b","@apollosproject/apollo-server-env-mock":"^1.1.0-alpha.24+047683b"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.24_1564409956525_0.17084731599776593","host":"s3://npm-registry-packages"}},"1.1.0-beta.2":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-beta.2","_id":"@apollosproject/data-connector-rock@1.1.0-beta.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"b783e1faa29c18afdb485dbf96314ce0cc76c128","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-beta.2.tgz","fileCount":60,"integrity":"sha512-lZwik3S1b4K2JgbTNPo1nVf2CeF/5WDw9A3ESjRsiSY+FkZAFHdRhkIHQq9640TyIiF7FNzr1ZED30/MXUeR8g==","signatures":[{"sig":"MEUCIQCsvNOHBz0QUUmu3vbQ20TVsqw3jBloAlmFINqOMEHIqAIgCC39D6mMZnzZ23RB3hEB5A1TOG8Q27eESnQyNFEBk9Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":625766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPzvSCRA9TVsSAnZWagAApMYP/iuzQhe7zVqfRIqbwdDU\nNm3UwnDbB773EMocl2k63BI8usyzvbB38wjJeHIK3b+mV3pAblBXTjt2zy9B\nHDa3sEZUSjuuUzff8DAgPO3gHKYS58i/OrBHPyPHS0ibBknjWkCSwDVnA1HH\nB/8GQE3M6hlLQLqk45KQvaz3bJsokHeWeU3rM/42fmQVTjz0n5zSM1ksYIru\nJhHsnY6wXL6DfBzvOrt7fLVJf7fx67ebCfR+byUt2IC1i+CGB5ZHyRNOlKjh\nxAc5Vtv4eNRTms7W4aJlauWsk+sUBZg5Vz6IU84/1oUGKjBUlZOc49Qj52D5\nyzeTWhEktsQM401a8ngie6tiDsWxzKm5MM7qqJysbOllUaoVQYutLjsjXAg0\np46AGBLlP/Ov9kRccInRGL6OrpNoh1hJuDG058aW3tEDQtuXqZTgq93b7eBK\nfv/yFA6Y/r5bgDY6z0uWhZ6GhRrB+IJi493ZweGBb9n783XeU36IBfb6K6/g\nd0KTVdHe1MhcmVbH0MjUs/sGBGu/Z+HlyZw1WVcQdgGqlLjrZKjDBQAVTOTT\nxrpCGXYunp6JadHbH+Caq7eHZOtTD6pE962nifHUXSz9NyNzRuBgui6qkZNq\nTqWfvsIAgoBDcws7iaZkJnlREarS18F4rRW8AaNcHOiGPqpob2GRJAPTw+7F\nD9/l\r\n=sG01\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"bc1b49564897e364fdd2e5f0903ac31d9cdcdcd2","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.2","@apollosproject/server-core":"^1.1.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-beta.2_1564425169848_0.8876229333641832","host":"s3://npm-registry-packages"}},"1.1.0-alpha.29":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.29","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.29","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"7c7a142aa01423273fecbcc5215e42a02cee370e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.29.tgz","fileCount":60,"integrity":"sha512-EmyGMohzbg8g6BmBjMfPGK78Vb9uD4VMaOVP8XiQ8ZUKfT+fJNfG8pUhOWa690YdnuVR07BDscEWhdFNQ7z//Q==","signatures":[{"sig":"MEYCIQDnpfDCrNHoUMKwJv3Do3CVAD5ZH5AUrtBwQO1u1YQ3dAIhAPTvmmzpV11cfiPB/v877u9AgPx6bVP7vIZ3UUFLsLl3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":625816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdP0wPCRA9TVsSAnZWagAAihEP/01A6zNxj+voaA9FnL5L\npSYSNXPEJh9rerOtlFGwvIpNp9f+sfVnSemvOwr8U5OUw83h58NmhNinbUFn\ngKHpaQj6N0QVFWJ7G1YzRefmb+zVpUEizC/wyhOTA08yG7akE/NaSGKemQgl\nLuchYyUKJYOZdZQaoJ3uDGlFBZ4WCJNwFCpWdqE4L/hSNPx/zpi7wd5sEaMO\nJ0aX2hLmLGSiagUzv2iK5iY9btAsDi/QsxeQph7ZZTdGhFo/tF2NTIiIrrp2\nYjWwc3TNs0SgxDJvArcYjsCMMqP9P80xcEdh1J8d7GCYae/QRg0ZrQSKNSHA\nFgC2Hn0fETzDBDGUhxNNIIt2Xo3KErWDeTDNlCZW9XzaeQ3Icq618hh3Mc8d\nQdivZDQRAF9SLYBCWTBpA+rJP+U1esQQmlu/xo1XTIWVqOnerV4g5S96Z5wK\nRV6PDNowjrWSAJyu96LHq+H5AcvV6xZ5hZpAzNFnsYoozbuHtMWtFOfN9e8c\n91tk/0WKNZvyJm8kpz7YkjcYgZSSX+mPkMLzo4T9tCsjkWStT7GlOI6B+SqW\nbMJq4p0dEAqL3giNspcDqk+gEpTB6gsGNiU55fdaCGFAB/AIl98lJwmRXonA\nTNjT6byrF3NNoloP7y5WZAzKjV/hziOpHciDZ05mfk8B814tm/j2hvzpGpI/\nlz7n\r\n=uoKp\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"11b7089a5ca331af03e86bd7b1278922700524c7","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-alpha.29+11b7089","@apollosproject/server-core":"^1.1.0-alpha.29+11b7089"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-alpha.29+11b7089","@apollosproject/apollo-server-env-mock":"^1.1.0-alpha.29+11b7089"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.29_1564429326435_0.3259711526572584","host":"s3://npm-registry-packages"}},"1.1.0-alpha.2":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.2","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"6a824cc8caa193cfdb3abdb7b7252f8d9942e886","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.2.tgz","fileCount":60,"integrity":"sha512-9mXGKn+W3eJhrOYWffSCu85mDtQUfu6k18+bxDYNbIQAg3iYokDRKo4tqM4dBR7IHkfem9vSy60KLf8SQMHGBQ==","signatures":[{"sig":"MEYCIQDeTogaX/Olm2RV7AQs3iylFsEOCW8/tXVUstUEE4XnOQIhAPjRrAVxI/Rvj72L3389OjuVwm9pG9Krzwt9iiIXAUi1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQdS9CRA9TVsSAnZWagAASt8P/R+r+FhGLZZFjnCzHti5\nesynFzaZyKiyDQUyGBxKQA7CpYK1OYhNkhdnMJF5Q2Lz12ul1rjmkFAxRVfy\nDC78YiC768z2UQR4Wm49EcinDtKef9fIjwir3cwH15rccStW1BrcERxoODu8\nJzh6E26DRpJ1W28y2dqtcCaQzrdd0okOwH8oq+GTwvk2+yNBxdMMu5bsbaEJ\nuMU1MhZQHAViGgYZ1b3t6D6eAkI9X14w8wFCwMgcjQjTxyUNTQZQhqmaQqvI\nQ0LGfy9Po7Ah5QH5Dkp5ds6DC/x0R2NtbGNdPsRJJxbcgq888F3nR0+BFXdZ\ne1DHooUsGutlYVz+BLHh95JKhyAmjWqenXrWJ+NeIuF80iKrEcjyyOWqTGUv\nJ1+bzPhs8kgd+/Z/P/yZ2wVj3aDBEJOL7+7aWM8BbKhfXrTGTp7/SCKWAlTr\nkA/gIzach69b7Atmdy3bZmOmm84pZTwM2M4jsfl+sB2EDdaFJv1Lvj26o2a9\nlW/6r1oUNt8ruw1TXJwTbgUwaEcsxXrWQFbjLTQP44rVKc5eJSHOX2UeU9cw\nPCZavIIpmzMJZlX4KlBAeByKV2VZ0Qecec0b+5UxlgEma7/PMrTG31gmYLGL\nwGER7pC/g3eAYO80uVaLEifVgqmxGhkKqLSGsRbhaSGy3IDqrh4/cxIGwDS1\nGD1A\r\n=ZfSE\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"f0de6c9a150c06efce5818e28e0adad451edc198","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.2","@apollosproject/server-core":"^1.1.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.2_1564595389014_0.2752111885708284","host":"s3://npm-registry-packages"}},"1.1.0-alpha.6":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.6","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.6","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"43f31d34cf61e39608d279348fad32f653abdcbf","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.6.tgz","fileCount":60,"integrity":"sha512-3x1LROHuD4xTAGoH2RkHLs3x/1pUvcoAk6lQVZhXkWZnrHPQq6FbhS0o1phP7+nPX7HJxPj2pXqck0l9VwyO0g==","signatures":[{"sig":"MEYCIQCmfi2Ja9kGAk8i+yxaIUVaPMzi7dS12fVjxZbiYsUh6wIhAOXkAb/vPXGI62Tf0heA07og72NVNFpnHE3ka4GynyjQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":632181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQ01CCRA9TVsSAnZWagAA0BEQAIU7blMpMVCijwUVH0cv\n1TJ9WhMkOUQ6B5/W535jqpI9MH1AnfHqdwbCRWaNd6Exn6q/WtXvt0C+Xjnx\nnbpRZeiIeL6hNr92QhL9FzKZR5iQufCbrAnv3m+3SnvUyaeLiAr/3D8DEamy\n4vCTPRQfAU2V0/JLLCEW/n/0BkhQ5q9wlqq74XhbLpB4NzywR1DX4aLsvg5O\ni/UeHmIsribrE2FClduMQPNTkutHMt/qkD8KgtZNUCDje8wGqnU1z+Rs3390\nszYk9eRVcq+4gb/Ht6T5ov3pk8OwgcGAIpsECHmJxH979sbz5ymBTGCy5/0x\nVzUewQjjIWTBZakZsKsv3bZ0k4YMUOUa0QzHU39ulhdNzKvHcvQP9xz3S+ZZ\nQ7hFWE+BMSgTI+lfO52SmK0K3Ko+wNWd/ZPyEKHTX+GFCxkvmBg+qENQHpWl\nvXoTm8zXZ1GqYkkY8Dv9dHqmWW4g5VBvm3PFlCmQfEa536H9DzljUZU794Mt\nvvnG5nMykYt4OpiiayrqMzLyrLulLsj30KDSF96uDXNvbcKMnTiFe6P+apRf\nBgTH9ARQtKeV6iFqWGUauqj7cJQMBV6bM/Gr8ga4Hme9FrUXZwfzEPahnUkq\nYjGUfCtqfqYshGFMhknBlZY6328H+FkVWn5tGE3dBttTJEiyaNUwfSUERunV\nM2j5\r\n=9NqA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"2b8d414a2f5fa13b27188dca9a7a4f8316922460","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.2","@apollosproject/server-core":"^1.1.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.6_1564691777766_0.6835077081965637","host":"s3://npm-registry-packages"}},"1.1.0-alpha.7":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.7","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.7","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"976ff45a9f4d8751b5ac75c8503255dd30934a4f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.7.tgz","fileCount":60,"integrity":"sha512-slJwZ5x0J2SfFqIB+w9QLwRlwt/SrXEL1xx+S6+LX6vHYkNiuP2koPeBEQJwWqvofgkygCH7vzLCUg8IEiuRmg==","signatures":[{"sig":"MEUCIDdC2r1cuvNtZ2QuOL3PIpsfeLP4BcT9nmOUcjXujXVqAiEA5GamXJgbtbRvgOQpgqMRQE9h+fERdZWmcddPA8Jux6Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":632978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRDxJCRA9TVsSAnZWagAAmvUP/0Cg9YsZ8nbH2+LTEC5X\n5OGGFf0wAZ48tSGTWaNUyIsV3JHkT1Gad5Ctt6iiD6kngnpdtBXjaRWH0rAi\niqr4v/iIAMWDrxX7NpI6A9Cree6fX6S5EaKRnPTAbA83tDykqxsPybUMLj9E\nzDU1mOL3SfN9lxoHc5V0XEgzBpy0eC31O7PhA58oZE0fxycWRmuQwwTs7u01\nECmk3/YNcJkoq20JHhANRnaDQ2FJvnh3+ijPK/i+XYfLoolYLhN6X34w7Hld\n7cgCCEVY5ufwuG7dlIBX5hUNcwdAJP5lSL4OABH3+3zzmgzZxfd/HZEWyUt1\nRIXryQBlemzzzl+/Wun5QSILUEd2sfqSQ1Rbsg7/1dSkilv5jC9ttEhxw4hx\np8mSOQeWATPUvRMl6xcUEvLa+PbaX4OboUuoAPIr3VIeX2qxzElzGFxEeP5m\ngS4F62x4htD21rbyCD1bDU2z9CT8ijKq2wambIpnpu10yWAHLmFTNJh53LVw\nI2weTFDo6eomkJZlpfU1L/DQXzo9E/Qu0zE87pX3n9B9F5N8IeT5VBKW8KWD\nzBk2H2nZig+4Sx7tTrA7cxImyrcQGnfXQ/6c1dMGFCHUe5tZhBSoVEe0IhYA\nfPeFVQl4VXNnp5MUvXolTsh9ZxRhRx2y1LtXoRrf0KNq1fJ55rKp2qvNzbjs\nTSLl\r\n=zQsd\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"0f9d37ca7d2e46479dba576110cc5f1a08fb94b5","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.2","@apollosproject/server-core":"^1.1.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.7_1564752968263_0.5661103829281631","host":"s3://npm-registry-packages"}},"1.1.0-beta.3":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-beta.3","_id":"@apollosproject/data-connector-rock@1.1.0-beta.3","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"fa4b13f7f7094ee23c49cb838b83ca77c1e5d226","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-beta.3.tgz","fileCount":60,"integrity":"sha512-mFG/9QIos2RJ/m1Y24jC71esbbvHSl0OFdEymu110CENixbssfCpfpi3E9gjbvzXHO/AhskYMBJuhpG0TqlHgA==","signatures":[{"sig":"MEUCIQCPSwG7EahMR59H1cpfx9w5M6yEra3CTTownyS7Kz9phgIgekngVc8Pga2U9Z8AraKtZHEfrawH9TxYCqIHEspXgv4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":632969,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSC3GCRA9TVsSAnZWagAAN98P/36r7ArMHbi0qiL5okl0\nHgfgbpzQNh4TGsHJfoKc4LyivrHUP677pYSStg8ZDHZnm9lUtLfRg+3TY19C\n0lWMLTSaJLaC0Iq29NXRGd4h/f9fXq22iE+++2urAlbyTJCsqyLMtYmvrAUm\nCX21w9wyUQRSg8SvZiPsLmZsbQuJljwF4JiH7ZEJxO8sAS5AOlSzbchjM4O4\nKZ2Cj2EgmWS2U61hCulY2NXfdGJL4vILtY+2IBlOH1k0kF77zqxrCuWlR/jq\nJyOzM3YtzWc3EPSDmYabVgNKINDxrePnZklP8wtk03erEHOoLZuZXsTq8t7d\nPe0BRPLsPqItzQrfsRcqDnREtawS1nNSYc52pq2NuY0bMKGloOKb6MFKpz6P\nNlT6JokDgELYiM1NUgYMQE0srpKfm8EIxpvwChgT1Bd2tZVOD+t/PfMoQ45b\nbjUbY/JVnhgi9soyKLlQsD6Gx+Jv1R6MNyG2L2QwFOQibKiNRmcMSiaE3Z0t\nLiKTYmee6/fOKOt9cYernliZ9aiPyKQvHlG2CV/6efzIoFOIjtMX5QojtFHb\nUFoB4rrZiFO+eTjVur+MC5/6+sRW9CS92QnEAZKes+UPg9EG4d4gudgDWi7j\nXvFcGN77xbWDQQXzvWi9fueiHi4uPto1kgIlpu6PpECt7DrMuWBaTobqB/XV\nmNUq\r\n=7K69\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"4b576373b56239af190042045b81ec1ec96dd245","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.3","@apollosproject/server-core":"^1.1.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-beta.3_1565011397491_0.24653478120730665","host":"s3://npm-registry-packages"}},"1.1.0-alpha.0":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.0","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"77a692366c177a3a4eb65cf2f3e756e53adbf1f5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.0.tgz","fileCount":60,"integrity":"sha512-VOW9IqFTzO7vt0COxSctnbOdR67XWaTEEIRiYIUqA/ehPG7yXxVaY4zJ3NLpjSQC2nepTDGdm/+dtTDmuu49oQ==","signatures":[{"sig":"MEUCIQCYHgKFBEi2KsYGmD21Q3Kx+GHIlVtLBaT6w5s3+sDqBAIgXpk3DbU3OxeJ/ntgPs8tEjA6Ld0aJN6bEmrlGDX1qkI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":632976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSdkICRA9TVsSAnZWagAAB+AP/A9GWO6nPBMhmr88Pri4\nZmpbvqo38haCq1RTo7OaajiNdPbANs7egv+QVfcl3stBXkahJviHTgX2N+uc\ni4efTYhmw1KNoK9OD50yGmiGV+wAxjMHC7wfKzuMniNItxHS1J2xhWxdrSn5\nru5Q2g1uh88CltmOi0wQXKkpF1a37NFRWLIn5W7u5tL6SQB6wu5q6gE7WqHv\npuxcCVsSHLbOj4aBkN/bVJFM2+B/jLBkgDffbyKvHQNdecuk5ZVDTZKQe05T\nDfiVka+GU/xYUhDWqg1YMtrYi44oXsyZxhM+bkrJWvuMvay7njzNfawVzbNV\nTF+T6soCWb95Oc5JCAKDDN335ZBYq5nf6NRVVDGAsSTzex4pGGm6OxvPfbsh\nOFA9jbJO7II9KWJbECzVRtMMdYT71CvSNXRy9aOT4cLNRIKLwVxcLa412ItE\nvN1rAJufsAqGlH4yaShOlGLfRcfmduQqEpvZShB/q/4Wz0t9uzmcZf8ucCx8\n4+D8qqFTOAVW1lp12ESYYZHXBr0Y3k8YSaAQU8fLyJO8VbZ6y80EaQnHJF3v\nV3lsbcoIzQ250NXiZC7OEC9TRAR9TKivUbLZXf/3FnqQ/J4OMJz1GmXek8Yx\naTJzl4gz2CZyzH7CV2jgtghv+o8ZjpqPartzv26PseisjBZ8YVxuz0iklG/z\nUDMk\r\n=y6Ac\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"edee17be648b144b5bbe1f95ccd7cbb0b2ebbb1d","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.3","@apollosproject/server-core":"^1.1.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.0_1565120775697_0.18034340789085657","host":"s3://npm-registry-packages"}},"1.1.0-alpha.9":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.9","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.9","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"05a8775af13654cc35972a65536721fce38ba289","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.9.tgz","fileCount":60,"integrity":"sha512-sRwOb5sfm0bUYPKZFwEFpWdSppM0yNKvJDuqP1Qp7ZB6340gA3z0V9t0o2EIgxkYOWxNiRxD2E/CDQJMMx0Ajg==","signatures":[{"sig":"MEUCIF3gFYVCcRcXOnDOXhN0GJe9AshwqTKmKtFoCAzGosxoAiEAv4ap8EBbBI0U2FPgqsA64UdB2sMyxvDQqpo5jmYza5Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":642687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUZDRCRA9TVsSAnZWagAAux4P/3jKh9wm5PdOGaSoUyyD\nzk+kwDuMUkrVIR/KMzDBE+L8DN5qIDdiqa4v3H8qobKblx6K7kSS6eSCkSxe\n0OWM+PZzmW6SEQQvRJztaM2Q9Yflo0F61xt35XktzHKF7tJ3q+x+C5cKzPSH\nHvqvuN63KzbNB2ytFkuv1d6taHgMARWyzuxPkwZom7ieWmy/z3W5ekeyvG9X\ngNDzL464U8ZCvEaZYV6/rws59nr/ylMPZqRCJHn20AZnD944YTkQySlu80r2\n/fP70FLSHeKuXz4nd5hS7vu82ITpCXP52ByZ298KGsLDLfOBF1v+K8Us7qJS\nHtoVb/F3IM85seJorSzpxQuKDHZm8kmGspNbZBEObiCRIn6oflVP003ReIYk\nIfs6MMuQCKlxMYBzUvC+66AoG5XHqrCAkk5N+genU7aeVQ2No3pOLjsWcJw2\nWCy5Qdf70FDiTdR/diUDM+v2Uwyu0jzwkxP59X1H7me04qGiakSqotVxGurf\n5IEnL6B5ks8IqbbkiSdxHGwsrnt48guabbeGYGAVPvKrjhsAqlvdVJUW144p\nCz8R2SLKfcy0eSvH7GY/5r+8DHPmPyPDUb8sVK0FSolAEYVxtKz3EZPvsk6z\nw38DeC9BFvUC3xq2WQlWAVG4JeSCJxYA9+03Q4QT3q0cgFaSi6iZthVusGjx\n66lM\r\n=DTEg\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"ea6aa304415bc7ea49f9cf3ce2669b79e4b33f88","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.3","@apollosproject/server-core":"^1.1.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.9_1565626577011_0.19001630590341878","host":"s3://npm-registry-packages"}},"1.1.0-alpha.10":{"name":"@apollosproject/data-connector-rock","version":"1.1.0-alpha.10","_id":"@apollosproject/data-connector-rock@1.1.0-alpha.10","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"bd56a480e37ad9802af93a64a5a4c2a7b412feea","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0-alpha.10.tgz","fileCount":60,"integrity":"sha512-Um7KgEtwJS9b+TzmIL/t/gh/Cw7sA+2h6r2jCJMsd03n8nQZNyqi8rnuDiZYHks1pnTYUgmjmZW0+LxHZ3EuMw==","signatures":[{"sig":"MEYCIQCd6QMm5TUUGFvAcxqypM3i1nvUHIa5mtHmyBwiMCY/1AIhAK2RBHZiK1d1q8yplDV2KWvr8B2hLjrwG4FNJighXQin","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":640668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUc33CRA9TVsSAnZWagAAeMUP/AjH97oCy7s7JO7JvckC\nZfhRD4hvOgQcGc0OX8VcGERFIZm60LR9jVg3qtZNdOxqDux5gQzV+4AabuOc\nHB/g8snSMxpxgyvRlGV/NwYncJdH3rQI6P+a1/jkd+hMB8N0wX2/wz8jUNG/\nOzaIB+6Frh5FmdaicE7Bo68P5VWEImH9rrg0M97bfsGwmRerxYaVu+4DScl/\npi0CYxaYIBTKea/ebbQZLUMm7984cd0RYQI55Il+jphQ8fbTnZ4HaDVbyXFg\nFwyoF91nbRzk/p/bTiFi3zaoMLzpPtzWzEJHBR+Spfk3NPVPtIv2dd2iMQmS\ndMmcSHT6xZdlChCq0QPXr6tgTRTvHh/fHUP9L4fnGeON/fNg8iT2NkWdx92I\np6v5eBMSSD3CTorIcIp5flZOGdGF8tLfm5QCkyHlBYjE1uOgqosVgt2CsRrZ\nRMRSq47oW/sCMoot82Bfvy2WJqzF8IrRlAWCsTRMgtnJKxx4U4eW4kU8CqGM\nzYqvLLa4z9CtqRPXSSaRCSeA5yflsQH2R2JwW1aCeumO6J2vtJOxXzjkmcO/\n+GURcVNrM2QQ73lcQR6yoW/ItzismCQl54OvBr/D1MJLmaiRhQm1mY4m/BMw\nKuFb35yLGAcgXYRRa2nwjx8faQrCnQgBJgbWyD2gBPDdvfMNQMxAG+UGrkzL\njMFD\r\n=esM7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"0a2092e66a98676ff8f3682df62c2803233ae818","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0-beta.3","@apollosproject/server-core":"^1.1.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.1.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0-alpha.10_1565642231171_0.18739008749976693","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@apollosproject/data-connector-rock","version":"1.1.0","_id":"@apollosproject/data-connector-rock@1.1.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"e7fcedb3eda989967056d55714d845c3c13ddef6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.0.tgz","fileCount":60,"integrity":"sha512-E0EFkXKB4DvBL2tDvyol7UyB3GnK+LiHvYO5PJuI1xxwCQWEWtdRZEcd0DBPxrSMdBSuDRrrrgaTieU04oB/nQ==","signatures":[{"sig":"MEUCIQD5Wt+C7hV4djwcanI7/33TH7iu93hFtadPhIAtX4CTIQIgCY7pL7fuLdy5BGe3APxoEuKL0Imx5jlx0eQWWHmHUVI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":640623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVAjFCRA9TVsSAnZWagAAZyAP/iSlnuLvcMUHQZ1x0/H0\nX7zN1XV+Ef1SJCcZqvsh0F9CJv5xAPk3nSI6zqH/xeiTRgtcNvZaxGgSAYLL\ncb7TcjJrpXvd8R9FGHwNk6T9BjYaZNFnvoR74LWiS3pWRU1p7y9xJrgkWyoG\npfKV2MvdLuvjouFLcvBPgvaxy+NKOCCy96/9cRMY2AH0rp0xmtwfcMWjedtI\ne3HqUA0ESMiu483miliuHjPBof8Fpuf/mjuqVUvmoYuprMphT/K1339J0raN\nFg90sADZokI5P9K8OX73a0jrknwcAJE4V0Z/WcNO3i62PrAlv9egA+5MI/7U\nPnn5rlb5Jv0O78dZLpWM53AL5qBaMgUtVFSmQKlI896YZl5B3boBRoSkEeRw\nDUeidZSHOCM+fh59b9uwsCm6cbXpdeDdUH05prnieSAz/RXXA+oGcgAqTamW\n+jUrsDtaq58CURxleVbdRU4I5d4r0pSgrCYMXPKh2+b0rqQf0iYDpIs4yAC2\neawWkzWFxM43t6jX8NztUXC7oQv/oMZLOSbwnHt4bqyA7o7n480LgJuwmys7\nEOfVopjLFmhqtVrSZkL1NXW+6p3go1OLqb1wAYfrVRGC6ZwaePh8O4fLNzIT\nwNaVWIaCunuKbE2z10azULT1eBD++77BI9Qbnqx6UhZp2ArW/7TQ/atjmear\nJhfA\r\n=rGEK\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"289b5ad67588c0b0d16fb89ba6fc3059310f4d70","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0","@apollosproject/server-core":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0","@apollosproject/apollo-server-env-mock":"^1.1.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.0_1565788356391_0.341835127015921","host":"s3://npm-registry-packages"}},"1.1.1-alpha.1":{"name":"@apollosproject/data-connector-rock","version":"1.1.1-alpha.1","_id":"@apollosproject/data-connector-rock@1.1.1-alpha.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9cbcd055706e030f3b43aff65f132f3e5af0b51f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.1-alpha.1.tgz","fileCount":60,"integrity":"sha512-Ca1J0DS4OOHX1BVIXqsLrM3W4hYbj2TTC/Ftb4I3cbT5rb5DNEbqQNjirYp1z+XNLGAwGCxCRGsIvAHsStcVsg==","signatures":[{"sig":"MEQCIBShvhecJUdx1PHqP5VxDe8Ooe0tSZh88dW7fCXWIthTAiAmBGKiMdd8fKOfp8dvK/Uoer4RZpx11L3MKl7wrpU8Nw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":642446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdY+1bCRA9TVsSAnZWagAAcucP/i7be+OvP/4+ZLIjGGOe\nkkjvhVCchSDUepH9M+4JGsbjg8y4JnezfU0MhQAgut3tkIwJ4ucsSk862V0C\nbxDPlbyl7obQ2tcE9se6/ozEwlpr3niH1DsbYYxlqLVilMjlhSOQ9Wa/wK7m\nnpwd25uLAtS2FYydI62M136jC1ygnjS9snPPV5pDbgt379ixP2sJytMGjqpu\nVq7SVUl1pDgQnAkyvRxFWQ1gyavMMQVZtU9hmnuxSgcMgH/T2OEnPtpPq7ax\ndc46ZbljMBqAQvm5DLxbAdLwiIfcLwqpRwc9p3UyDcK/E2aFy3IGhV20xMyM\n+paPJvyDSbd8OJVK92ROqrm9FLOXjaUdhelrejBEqdczPKqoQXiPN3Wh4fgN\nJNs651mr1d0u1CdwWfm4WY6vXFhvNGGb53cBWknNFmAp83ECyHQuPBS4hmei\nDzUjOmIHZ+QmpTs4iyhG4vVqZiEExV0Kc7eTtR0AA4K0iYF8s0F7n32l2TN8\ngCFTiT+/+SO2Uc9x4YRHLekayqX3ze6M4eQYriwM4zsy1muDOLTlWkRuR47p\nwzbD2cAqMI91XLKrvyOIWbByyUaGdGljVSrm+75WXIAzfHYTp8TdhfS7i4Ux\nhJHmXPpkDwiDql7AQ75ndWNESjOY8BHQCsleKqL1NtmmCYYqDUkC940w3NOf\no1+x\r\n=AW8v\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"50e5e7fad0e9c9b4e1b9558cd748e08b1927df0d","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0","@apollosproject/server-core":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0","@apollosproject/apollo-server-env-mock":"^1.1.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.1-alpha.1_1566829914343_0.04314658368092705","host":"s3://npm-registry-packages"}},"1.1.1-alpha.2":{"name":"@apollosproject/data-connector-rock","version":"1.1.1-alpha.2","_id":"@apollosproject/data-connector-rock@1.1.1-alpha.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"e1c046bfbed1cc2bf7e82ba2051ebd362279c10e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.1-alpha.2.tgz","fileCount":60,"integrity":"sha512-zd16CUkVRp0bd6Uf1gRXPcaoJPpG3a3qjX27KD0d2HJqoWGASt87WHtJZGIZoi8Kps8d+Gw3ioaSW63JbK37TQ==","signatures":[{"sig":"MEUCIB8j/veCXZvn+m6Dtfu3P51AbdONxwyO/ScYYHn6ZNPaAiEA3tJzYqUjEQEoQUV/uCM3PLScvto0CvZG9Z8M4u0embI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":654784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZTOQCRA9TVsSAnZWagAA1VUP/19qJXI0hHnobc1vkde4\nM49F7o7lGi8+K2PBHCxjD6zvLCqGOeb+5JQGkmL8QtUy6FGdI3v0t6MtOY/v\njnIg8G1gGXGLj0meoyG3C/uszSs2Q5WzjiVxjyeItDw82OUNM3TVeuikqnL6\n539yAiIA0yzHxAGoQMH8MZbTCVxb4hTFHTU8I5XNsTGIJdIA/QK4Sd5KXS8n\nZbPvW5wuxCnc80jam4cOGGZi0DDsk2/OOTa1CoB11+G65SFTFJhP3PTBaEQd\nV7a7/dO7vw/0oclKbc5r6mTe/LLvuY3dV4x/gbHkdeDp2O3pZIS/LWsFszVm\nATTmeQS5lEC/8khn/bUXPck4egOelC/PZT3O8WC8TfXlPJWu+RJ/FJW9nzrE\n8J9ET0UtTun+3XV6lKM/QYxtNUpGYNr2GwBcq/q//hObH9UNdHrleAyVQer3\nNyf3hGPrODKq2Se6FUCUsM74n1C1sRntoyqEGV8p2LtSwoKtdMfmNQ5io48t\n0Wu1JyiG95QS4GYkUckp0j8T9rqQH8Fd/uNj0kht4kg6Gv9ANqeVYG4hWa7G\nbML6luaPyVZzBdRV8bTkiu20BowCByrrDJbYuCJ+BuRxCsa+ODbfRhbVzb9p\nXZa8sERmnLLm5VMr5GXUebFyRn5k7jR96JHDpNjj3E8TtJbSCYzmu0p7EJcq\n1mkm\r\n=7Xeb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"00e0fe0595acb62a18abcaa8d9b606e237cb2107","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0","@apollosproject/server-core":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0","@apollosproject/apollo-server-env-mock":"^1.1.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.1-alpha.2_1566913424263_0.7711030495954716","host":"s3://npm-registry-packages"}},"1.1.1-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"1.1.1-alpha.4","_id":"@apollosproject/data-connector-rock@1.1.1-alpha.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"7e9231c9e4d67d979a045ca656f1a4814a527f37","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.1-alpha.4.tgz","fileCount":65,"integrity":"sha512-lrYF3nm2OZU/eaurjWJaJCtHcSlKaOn4HXzdd18uANX42z3k/I9ZI5RCFc4Fo5UyFHQURM3lNX6bkAlHIN+KHg==","signatures":[{"sig":"MEQCIACU0tPlLR3O47Irw/286Y2RA9DJFdmga5gvMJHt5tiEAiAtGdTPsRbkNE8BQjmG8CumgcOJ8V201ClCLsPNWJ6sFA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":680282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZrW5CRA9TVsSAnZWagAA76kP/1fFxjhpqVWtUYVNhuXb\nMSV0aKHCE5LjMzHRuUG7a2Oudlh1EQxA2tvnUAOohVX6ltpb2qKvdnwbiz/5\nXgfQy0wzCugHd4NyI77S7jPjDgaGNrf8KqI+FcAZBSFHcbZguw0LNOU3BIhL\n64kPzNEzEOqq/V3zn864pYr0iYP/6rN7f7ciKliPvLdjgAKzIvVznSIlPxSo\naopI5z7HxUJg0lDcQmpA8sdK4fYMZwyFhuauGcUWS6shEngb6qVZdoh4CkxB\nTxk41X8+OCnxHurhyO1dzJNXmKaNCEp0es3/Kxq28Ibsugea8/YoKdFOWssj\n+6A0FQFQGtLqZVHnY+p3WitF74bS+e3lAAm6EmNsk0GrxlPz+doZZwYflqwo\n7qtZG22cHb7RC//RpXQ5wnAPA16Q4Y0hFpOmlsLN0FULj10ZFhLVgWqRznVN\niuyD1NYOSSKec/dMJ8QIW8iF88XkEPAvIkJk2yYfgsyTb8rlTU7lhU6240ML\nP8ipTKBa6jd+1h3zsf1D53AcOrwCLa6NKm9OcFfiJVHbe8VodVQVqZFD5Xa4\nXoDiJ9hxpQxLqbPuYLhMKC0ofyQ7F/KbACmkxSHBKun/HBhFQM/WrM4FuDtv\nwmLlGROV7EL3hR+4uvhtawZaTACNfGTF7lN+fprRUiJycHakgSeZBKM2Fuxc\nwZqm\r\n=mlwK\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"a4323d7a151b20ccaf21a5e78b5f5a1271fefa86","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.1-alpha.4+a4323d7","@apollosproject/server-core":"^1.1.1-alpha.4+a4323d7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0","@apollosproject/apollo-server-env-mock":"^1.1.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.1-alpha.4_1567012281228_0.5898844582393521","host":"s3://npm-registry-packages"}},"1.1.1-alpha.18":{"name":"@apollosproject/data-connector-rock","version":"1.1.1-alpha.18","_id":"@apollosproject/data-connector-rock@1.1.1-alpha.18","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"a308ee3b7abd034336a30c7c2fb513182b8043e5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.1-alpha.18.tgz","fileCount":65,"integrity":"sha512-j2P8tqAvMd47JhO1z/PZYV93Ky1k5voIquX7/iKDSNQivA2k6KKuVn7Q6KZuBMCkezlktcGEwBGa8oiTmQXJJA==","signatures":[{"sig":"MEYCIQDtC+U3NH0FVoIsqXszEpjZ/8gfKJuW/gmhauCQ69ARrQIhANBaucdrbDjA7g8wzzW8kkZXpdIYbKPbvB6HBUXPqoji","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":680285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdd85jCRA9TVsSAnZWagAAv94P/2IKMyHBu96CMZmBuoy2\n1G94Av5N35TFQKNpPkaGY3gVR33jCLu7XwCzPYUhrzpydipq/MG5ZmfGWG2N\n5ltIVVcxykDjX4nqWngegfuv9eHkMLFEN+amyfud3LdrEhcer9HQGoM7J/vm\nEEqA2zff8ugjs/1QhArs8r8sF6iUiaPXAPM5k+YbEn8nXiDCIdbVdt3gWY77\nd5gVu/OZ4z7IvMM4VRN8pLWLYRF2bEqTMJpCj75JkPbzY//oFQRQc2AGW9Al\naXmeuiT3EPFcYQBx7myNMsj34x8h2wzh9R9I/SEzfAn4Qu3f6mp13N/yBrTH\n3M1NsEsf+gLNgkZ4Z34Q0GOPHsAO2lTB64M1SrQ9q4+yeA8nsLgUsBdQHB6y\n8THcrpmBbOMP3cusK92CBHuNYA8gHuHdyRF38e4IiKjGO+3kp3fKj5vRUy1h\nhywzqf7RJwOknkBDAFyS3F/CsRj5EoIAEXzIWdYzx5v3S3FZoK6qO+/gdxLq\nUsIW9GJ92x32a3CpjXu+hRkL8pp7jXipd7WMC71SBRHchXp/ct2EYN61ilry\nMwcoiS62cAICVSJzvToNc6lBvso+bEVP8H9g0xL2YHbpZCWgTKIIS0OHBQpX\n8rtW/9DWYrkTzEc1UP3OGrKyQwM1+48vKLxlMQ/4QH7FYMbRjVQxkUZkiHEE\nMwgo\r\n=Y2ZG\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"eccd30b57e68423fe6f4cd19788ba77442bdc5a9","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.1-alpha.18+eccd30b","@apollosproject/server-core":"^1.1.1-alpha.18+eccd30b"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0","@apollosproject/apollo-server-env-mock":"^1.1.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.1-alpha.18_1568132706387_0.5289915908745797","host":"s3://npm-registry-packages"}},"1.1.1-alpha.20":{"name":"@apollosproject/data-connector-rock","version":"1.1.1-alpha.20","_id":"@apollosproject/data-connector-rock@1.1.1-alpha.20","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"602728da59fc7b8b9dd8a8adcc0218114dbd7abb","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.1-alpha.20.tgz","fileCount":65,"integrity":"sha512-Gj4MWM95K4xcjP/MifJQDcQmflHiLaA7hBaYGJ1DR8sKzcf1kx3rBR0FzX3vYYFB0cljgQ8G8mI4WMK5ZrdYyg==","signatures":[{"sig":"MEQCIEjfVfpaG3Tcdd9IVUYX/ocT5n8ZYO8mPcdKVLiSSHN/AiBZR5ksrEU+qfKKLUIw5eOProUE28Ya73HIdUq1MKR8fw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":687193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdd/C9CRA9TVsSAnZWagAAQkIP/RUofeM0BFnneakhZOAh\nY8smKqFA6mHmMC7R8vpAwASPOApj2OIELNAXiXt3pegDBuxffgtzypTEg++T\nF0fzJxbE8CeY68y6lwXx74i5OC6OUvPca4mz8lHJzFkM3fRk9G6U1NywrTuM\nyh5zgCplR+6mTAWCmX+K3H8gFzYrvcrXl0iNZZCsNxM3Vew5BMlrNhP73XA4\nput+IgqqtbiDWyVhInOB93EMhpJl4HhFPN14W35GZYLhSnjt0n1YZGu9soED\nsM26ltYvftkXKMMuEwLleQjOdtn4oMjF9YF0lWw+uZAyN6ceYveVUmya9mSx\neUm8CI9iIJXlnNOzS+TQSBtq5rnS50rIx42QR0X/Ug/wzvnvJMYP5JJVCAff\n6+ahXhrCJ4Vv/NYZpUHZ0n5L5igIXjZtdtFfle3LG/CcHTmGAvoizitljLTv\nKJ6kNl3Us6SyHR9DCl9sPPUAiSA5f3QtaZxGZ42CPf6kKqEX5DR0Ct77AyQx\nbAeMjrZUWNBrokG6vx54ZG7RlgKuskpt5GHl7kFcqqPWkdLnKkYP+x4w/qie\nq1uP8ZHGzUzJ4WBH21/d2WEVPgCZ43XNHKfJxv59YSU+gH9zyhf253RoYETz\naIkstoTXJOeKUnEq7gdJBEy2g0yblVKUHYTKg39BtvqLjf+FwVkev9f/PrKw\nkKQb\r\n=u9Gx\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"da61db160c35e5e6bf10d3e2870f21dbbf364eec","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0","@apollosproject/server-core":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0","@apollosproject/apollo-server-env-mock":"^1.1.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.1-alpha.20_1568141500983_0.4457105961834926","host":"s3://npm-registry-packages"}},"1.1.1-alpha.29":{"name":"@apollosproject/data-connector-rock","version":"1.1.1-alpha.29","_id":"@apollosproject/data-connector-rock@1.1.1-alpha.29","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"09a43b86af4cbd9168c1974d31bdbbd93c707a59","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.1-alpha.29.tgz","fileCount":65,"integrity":"sha512-Pm02jI0taeGz+BKP7yUOZaFWKEysRKceU4iYxnimNv49NXAfOSVisEHhVUxDfn4dYIgwnvKehiID+my4n19ljA==","signatures":[{"sig":"MEUCIGgDVlWRjlpJafznq/DsLrVtqPZvkAKScHW+Fr+1CN77AiEAkWJHRxJDZDYZUTPYE3xkm8dnMiZq5nplzNLVEplxkvA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":703866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgmjICRA9TVsSAnZWagAASa4P/juMrOHcPTAePDwGwYNy\nDFYuDPGSgz0kMEZsn+CdV3cY8z/2P6r4Ef6RxJmBd5JOmcyvLsbNswn4QOYY\nN3nsoQTZukiiyrXK/jz/55vwum2pgJphxdwt8OqflO38ByuxNRFGkGQhC3Pz\n/BZSBMw0JTwHyzEiraoECaTFQI7cAX3hjs1fzLb/nTv2VqDpWIS5nih4i5Ih\niKgBAIYsopbXix4aq4EYdpq1C4ObUdGfJFq2i1HrUjb54NoFNGZmiRA65lNh\n5c6Sz5ohMKrlATxk9xUXJx1q+LULsUAx10KXFnZmUCQrbYUNI+M/CYPJmgzH\nP5N9moYrr7nTKdfoVUgdZuHwxrmO37JuxTXsTArUGxxfwsXeyvbkDdQN/zJC\njVrD2bea82Xms8pQv2Wb4KGlK5c1WacRdOTsEk0DIN4YN7mFpJjTN3an6m0E\ngtW3e9/2Sx/sOZ06uVaAErjOe5USWmYaN/sqKQs96sDK5ZmtBeXIejfmsWce\nu5Q6Nh6I9duI7IkxJdd1obMqXZnNeFrnAaGm9MBFFQmUykK0gI1PQmbUT6XB\nGLbT70j5CtV+HdoWARS1dLcFmecd6xT4Zb9kVh0AtGKvUF9qtPj7nGtIGXA7\nuS6tKokIva8O4wpyJoNt0N56FyIVuTUkLw+hR+663umnxYf7IG8jBg6elJgh\n6hXj\r\n=yJsJ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"80f11156a01646553ebd94b45bd8f7b56ac79cc0","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.1-alpha.29+80f1115","@apollosproject/server-core":"^1.1.1-alpha.29+80f1115"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0","@apollosproject/apollo-server-env-mock":"^1.1.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.1-alpha.29_1568827591630_0.7819411558844882","host":"s3://npm-registry-packages"}},"1.1.1-alpha.33":{"name":"@apollosproject/data-connector-rock","version":"1.1.1-alpha.33","_id":"@apollosproject/data-connector-rock@1.1.1-alpha.33","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"4b19669e30f39a33018ea7936492fa9720baa77f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.1-alpha.33.tgz","fileCount":65,"integrity":"sha512-DDxgXG2TAiBv+iVSQ+TuFMfGfkYs92De1NYTEy6PN8MwUBiDHCl93DJOxjCoDUgc4rHYtCf7PcTSm7O5RDHOzw==","signatures":[{"sig":"MEQCIFqfCvfVx1ZM/vFBc9k0yi7jcbPMxAWCH7vXlozloRkTAiBq+VrMwb2e/odnivyoEGaFRn5otB+r6Fw2miV9NKjZrQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":704024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiRYwCRA9TVsSAnZWagAAZlkP/3GMdFCljQPfMVfbAy+5\nZmPIrgea4Aq9H2jqgoiU3PvkFm8WnBS0Rw9m9ia1C9BW6nnfx2Lv48GJ9NlK\nEeVMTJPNbEOE3pOT8xb/l5no2EjwJ8o9rrrmz9YEPKrMiToaa1lH2W+x3i0i\neRn5EXmbIvCe35FDH6Yr1qxhsd1f2G6JwTtl1Vuj9vbvMVXQxWOtb/rVL7Gh\nX1Nh+JDhUEMnbDh5oNqFNnxtpylnsmiuBGTKppGqph29hSV0yAdvrgyRozAC\neRF9vGbnUHZ1VfQJxfoWtaK8ykxGmCDywQ+zqMNFeaIbb2l2PyTH9RiYzlcX\n4w2uK3hIcW7S9gx6NBiaHbgakI7kpSYisAFYFZq2tA72NfDMYotvCUsAx0pi\nrX7hEyLDksdD2weRs6+sqENYblN4s1nv21Xy+PIGk+XmgzPhR7OW+ZhdQGdJ\naIKiRJK+qm/KHh9vrtKVas1R0LQXKKpSGWCvYua2bMs7gdPQLHaaYPKa6+ff\nqiWGgG7Pxcm6p8nIDfV6OwyGnS+r3bGuWqQq1XMXhq67Knzzj4ki/gg3l+fh\nMGtZ6Vzwgi/danFL4087yOen1R6y+PCcHKM9B2OjGEMk4rPDG3ZVnZmtJb98\nKw4lUDs3/owxbTUNucOC767QZ9j3j6LoPdWFCVJNz/Vr4eG5kwlXx32X0aF9\nODMH\r\n=nmeO\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"7218ad9fced1eca5875bd40308a316925198a9bd","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.0","@apollosproject/server-core":"^1.1.1-alpha.33+7218ad9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0","@apollosproject/apollo-server-env-mock":"^1.1.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.1-alpha.33_1569265199632_0.2923964352768793","host":"s3://npm-registry-packages"}},"1.1.1-alpha.35":{"name":"@apollosproject/data-connector-rock","version":"1.1.1-alpha.35","_id":"@apollosproject/data-connector-rock@1.1.1-alpha.35","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"a8f28708edf4d57f1202138217bed9179fb90a4d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.1.1-alpha.35.tgz","fileCount":70,"integrity":"sha512-cv5UdR1bSFdErLtI1d194tu/ErYmLCsCwxY8cC5sfJ3B2TNsZe5aohRMVbaBf7ulZcyyA91HqY8Qd1SPY1TipQ==","signatures":[{"sig":"MEUCIAwFSQ/64Xkogq6No6X6Hpp7mKZ1BoWFJn1LKJvsRoZeAiEA15tjFaA3F8pg2+Y970xfCmAKtYWjqVZz8F8uY2fDNbs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":732631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiWhKCRA9TVsSAnZWagAA9YIP/1+JY9AVi1sLevzAyT/5\nTIcJKw01XHyiCJAe95jDlCm05nWLXTzieQJU10nQ7W9cjJa4ZOM0z+/gUjsU\nrUNhVG7RRZYK+qgSXEZwMy5Pzibg/YIUZ37xAaJCUuNEG51oftwvsr1YTfwP\nCJO6Q9XXyeYD3s+lhT7ZsmEmxbA5qBPto3UefRQcBD6PmZbYLo+ZiuIUu7ys\nmfCx1opgB2C+0BiRD0DYrF/GTOK7qBu64vJz2yvpvbPiBTvt3WLDZaHqo7gI\ndGlVr5mvpY2f1bo4jAStEKAYHbyutPwbkw7K512CHuCJq9AV8VsGfKCf+geC\n2rg0Xfpker7HeKPZSvx8pJ1U//+yOu5KAvjZDQKsuaZ0AMPvEkmhznZ3uSd2\n4+LmohkQ0KWV9LJd4C5vRIO+hlnj/owcHXMXbGcNI89/SXcBrO0ID30CWTXZ\n0kAo27awvWFx4gVCpnnRRCjEA0nyx5k435010WrG2tLbO+Ry9ePpntUlfY4q\nglCpmqggXqEqWEvgfpuUAhzr0jNznDct/hu+5mYqc3ctnzY3QHAIchb7B0TX\nk4i4+fhh2dZc280OnA9tVzn1my7ny3uFXg2ssUlXod2Qw/5rnMDYIVx4EW5o\nRtTrxTYJQ4ePaB+cM8ZoTmvxB0Th3J3+0arTDvjRhNiJ8ui7enhqYe/T74tI\nnVtA\r\n=T2MI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"b0913abd3c15445309aec0d41f87ae293ea9f613","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.1.1-alpha.35+b0913ab","@apollosproject/server-core":"^1.1.1-alpha.35+b0913ab"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.1.0","@apollosproject/apollo-server-env-mock":"^1.1.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.1.1-alpha.35_1569286217463_0.32012150945566176","host":"s3://npm-registry-packages"}},"1.2.0-beta.0":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-beta.0","_id":"@apollosproject/data-connector-rock@1.2.0-beta.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"7756ea6c8ec42df9610ea5891f5c0a22fe1aeb70","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-beta.0.tgz","fileCount":70,"integrity":"sha512-A9o1h+HKbPsLRYXo85aU+bcfUUGBRkeX6KUjPUCXipdp5chvrdHXfn7pbmei1JIaurSZmZGXaegrIwrMfWGv6Q==","signatures":[{"sig":"MEUCIQDCmc7YXXcD5x+cbCoZxgM9NshZMH53Xe69Vek9CEUOIgIgI/PtUp23Vojl/ZHqePfeF8+1Ue9Fw+cTOT4RdkNznjo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":732615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdi3VdCRA9TVsSAnZWagAABfkQAIeFuE/XTzdqq+XGJ7B3\n27lc6LqVq12fN6G5RzQg3gZidZ34RCT/w+VgzBtnMhssFMey3x1SuQAD7bdr\ndd2j1mstlPNooRPkbrcGovI0nwj0NwDOhBTeRDBAYwaUPW8e4dNsVAlYI/u8\nJ47rJrDHH0nZ2mwjsURyUGRXMZ1NuhVRQmmQJ8M2Y8Y9L+QwbJfsKMSHZ6O8\n4RnfBY2rgNXXevkR1mFES4EcWYiNPzSsE17Xnhu8Dd73mufkjVgg6KrlznQL\nYWFXR2IpSThQvLvih6yKSxw10up/DsnYOkV3wF4Jnepk5WasguzhikLmG7vX\norByIvltvw5Krp6z2L4DDPWTewA2fWj6eWpD50WOjnlr2AXXd42rN/Yb0LG+\nCc1Y9/oub0/CWTKQ7Z8EUKzGRPxs2zh6OgLCMjrgqjhPkVqlLMBeKVv+c3fh\nd0btq06vAIpiLwPUEYwZW/zHmcN8Ug3aWxLSg3Vo5zEh8cOg5XR0PXWUiloV\nWDurWJxHT7TiSI5vQCsdzI5jeYxTZF8sVVbHJ6T0ZfjdAFtmYazIcvhDZTG9\nkTjyyWcjBXI7D+iX/AyTe9ojjF99DW17vmmEIxlNvcYku/yIYsris04TNyTP\nWvrkWpCBvTHX/00Ntu2C2YEFlxSqyHm8wisSOrvvYUYYGmdU1Zl6vh/91VH2\nIro9\r\n=XiW2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"ece86dabc3a06c47e9623b842ff53c2b13db2944","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.0","@apollosproject/server-core":"^1.2.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-beta.0_1569420637167_0.49312292122217816","host":"s3://npm-registry-packages"}},"1.2.0-alpha.0":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.0","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"cdda0c2c2e4ee8019fc9dd5672027d22037be757","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.0.tgz","fileCount":70,"integrity":"sha512-YjsxecvMyrvApDPgJ2lowZbwQurrXY7HnunFBH0pPMQ/o1QT+j7Kxp4awfnLrRAB+0wxao5ZXxnPD6Rqo9J1Gw==","signatures":[{"sig":"MEQCIHnIBY8LxgHxLXykrfuF6ayi9eDPl1u/YwXXxHSNsipSAiBXbmel5lE+ElKNxmGFHqC3SzmGFOBld0ixAP6U+RkTuw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":733056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdklCwCRA9TVsSAnZWagAAcagP/1+dym6cbs3nXbFpl7aw\ntFYDPvK/OtlJKH6OZ5VuSFeB/PVqA6EnxfIqi9hujH/wr+emsWwBYmzp2NuJ\nFhIR6IIxY/HtJWaBaRiLdQOREpRzO+NTCAT0AUGNDVAl0gmls/RuHNnAv3Yj\nMA1HFbFswxV5Z+KAOJePm5B9Bjm0ReGRLD2gxv6szLPQuN6QldAo4wYqNtdS\nUFX9F+ywvq//za36FuLLUg11KKqIWYkabhgWiHsWFFgrtD04+i9uxsPI6fZm\nSUHTFoPQNFg2BKRdky8qDH7ufGS7D+z/BuOh9371M4fRWPSXyjCjJqGkJYGG\nCUbUbO8VGEHnrAMzubLEEqVepgB/UmwEvcachYCcQzVkqAYauDBBSeGBcltx\nRDN574qlcsLq/Dpe5hiy2WD9N69/oEhRtHbyZYFpioKZ9Vr8Qdvhq647TegQ\nY3hs6d1+tWl2ygmneYtGD9gJVun3S9L2kgaln8PPMNNsWzkCMw3UjntbysJo\nBD12X8o1x8duBHuF8Y0/HDbZUZ0B/+hSQThTLXf//skVxYQZzZRuQrWdEmKp\n9iIiwutsZW0769NWpJ2dbW0w38SCAKqQtF2QP4QpACsIVM4HLWNDGtBcpo/s\n00C/BgIu0XIm5Clv6xmL144o+FSO0vFa7hlqQgnHWNDu2mmOg72IYkxHmoPw\nTcud\r\n=VQwU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"eda59ff6e0db8ce7d2f8aeadc204f3eb64a33f2a","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-alpha.0+eda59ff","@apollosproject/server-core":"^1.2.0-alpha.0+eda59ff"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.0_1569870000276_0.47184191524616304","host":"s3://npm-registry-packages"}},"1.2.0-alpha.1":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.1","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"67333346892d47739d7fefaf120f052a27387fef","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.1.tgz","fileCount":70,"integrity":"sha512-/0HD1fGxYHJEKopl8Wmpny/XQEGC46T/0/lpn392m6rKIdFD1Qidv9f1YqmrZyEP2oLld3DGvC1z9PIBbhTEOA==","signatures":[{"sig":"MEUCIBFOLWjbGXG/eghoXve1AKnctrJYZDRvEzP1o9aCnzcmAiEAsEG2D0I+F/UDv8OHb26WYWaxCPpG8Frm/HlJ+zls7ds=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":733528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkmNWCRA9TVsSAnZWagAAUkgP/00d9oowwL+EdcAg6VkK\n0b0xOPV6LdVdwetNmOWotFeb46TF3NoUH5Ln1l65LezwOZytvkEoeEnGsgrr\nXwXZxsVEnI4Xvjn+8SH96GlM65Eyhm4Rc/J5z1icod/GfFjQeOfggqI0aL1s\nvkl6Cbypk4YyHVVbOoVx6spIX35C7vpV0qLOu+heZRz8DdjHF7IRqybnqsXx\navQcVjO1WLfwQL+YWXnP/BD6YIqVur1EQJkQclfvHFhKs7RI8Zjt1GMCY6gw\nVbAVnTAOU9ZCmhjaYYI+kr2VYecjtObCP/QgPKHhyt6HebaAvc6EoJCvOajI\nt9mFpbjK8szp+/zPhDyAJ7uQsoo/bY4Gl3jdLMphhPem5ha62s91MxritNaB\nXh+rQm+JVPrI2PHlLzGzbdpsVNmCig5YMTG+sQmwSnoE5PvGGdETQSvykKFP\nDE7Q14l0fqBM+orSz59Bj8X1UUE9tFmIG9MTNT6EdpJ5OFRebU3gB/opZS9p\nJTwJD3egTVmMRzZB+KoVOnTxelHw8Bn3LDoxpJNLPOcJMEpccO8iOIaYTswJ\nMsJtCLDuJ1M9e+h6jw+67/av1x51ttn9pi20oUTnNxvcPSdnmkKTF8wO1fyt\ne8mawNDmenBVUMc4jNPBYW1Re2250ZjJvc1XqcKsxheWUoqt3xPEnI/vcjXt\nhPmh\r\n=oOJt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"8b1e29c27b83025896eda38d87dfaa5f690a76b1","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-alpha.1+8b1e29c","@apollosproject/server-core":"^1.2.0-alpha.1+8b1e29c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.1_1569874773773_0.14980675479283256","host":"s3://npm-registry-packages"}},"1.2.0-alpha.2":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.2","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"e98e13c87bddcdb0bd35a89906a6766a170a7be2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.2.tgz","fileCount":70,"integrity":"sha512-gkO0fo2omxkS5N06VCpFtxDWUU6HtsHANj3r1j+SL4kYWAdtPwX39P7eW0hdxAYJ4+IfT/nXek2osa74canIEg==","signatures":[{"sig":"MEUCIQDDzj9+8++9qbtOwj3Br0elNumbppI2QsPoHgsw+MnnKgIgE0GwXQATdwARssNmY5HeO1kdMhr55KWglw/XSfVvm48=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":735171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdk1nQCRA9TVsSAnZWagAAtYcQAJAYHofTWv0a/fq6JZ6k\nTXrGEMwcE6SEkV+lLCabcpQ8tGsmCcSpKjyIyS0RYsm7soXJ9tcUnzbc1ifM\nafuuYndXSc5sxDt62NKVXeDkg+q6XwvO2et8add2+XTSNsYpGGcuwh/kLoZG\nBR55B7BspzZrEXTLKNIXjlVA9z9JKJYvFnLIvPX+VZrItFdCwHMWfsolC151\nBlsvmjx34FSX7igFdvlvqehP2mUUsw3/s9X6JhOgIrxjRju05m8AkRH2XtDl\nutAxjYk5+W9dmkRvA2pZiOLwIwU/ubhIcePRa3lZz/HfSobFpWZnFndAvSP1\n0wxEVs3S9lbXeB5WN17MAnvS/Q03ly6tuhB89IvX0xZwYnOgJC3YdV97KwZ0\n3K3rstRFMn1RsHp4/4sQ7Zv9Ui0klqtELZuJ7uz9z2EcYHnG9AJDX9pLU8WM\n90KRL1viuTj2pLellO6sLF0F/fE6vEm/18S4XP0d9jpDtiQueMsz9PQgToUF\nobI50VpQA74rbDeg0nWMneqQm2qigl1vMSWtRhjI/A8z0fVdxVp45O7oWJ43\nOxXQB4YAhdA4QROh3UKlI97FzJ9wEeLU167Oskc++KkDIFm/nbJOMd9eHnPK\nmphbDkObHBHNu1vSMJa6oJv08WLQXmmg1n0aEaxVPD+wlB/qOijL1gut62cU\nRiL0\r\n=sSyL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"71a08e9f8e8893131f2ba8cdde0cfe0ea4b032c8","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.0","@apollosproject/server-core":"^1.2.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.2_1569937871833_0.9981285939344053","host":"s3://npm-registry-packages"}},"1.2.0-alpha.5":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.5","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.5","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"6d023a1cfdfd546862f804f008152b85dc9dd521","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.5.tgz","fileCount":70,"integrity":"sha512-KP8kod2HWsyWaBKomdP8rAyZ6AnbbfeVj4kabvvPPbmghXcqT3FFhnnU1iB/XnK3tHP6twJJZYvqhC6KMR4zuQ==","signatures":[{"sig":"MEUCIFvcXGCA6fkGuXECkPqT/fnQkX3Qj/njx4YClhXmHSPIAiEA/yPfwjQWRix/X5v6avqr+xYCs3WuDgfbfYcK3oG/qeM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":736935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdk67lCRA9TVsSAnZWagAAlysP/3cwqGN3Pg1ebNTxxynU\nrMEbrdkhwi96lOg2DvjESfVaaOrCqe8Gh3ZHMwEFQ/Q3CHCf1JVl8/rD1hV3\nuiRRN6PBcz3ToB9+o+VAQzAkrlB5JrRnz9XzucFk+o3n0e3Qlp9y83o/KWX4\nzab2ZxEpAfB30L+Etg+Yqg0/Y8skj0AVIq58Qw8qUVrWADjtOi7hny5l4fFE\n67ew2D47GRGy3xsrdlMwzMsexxayaxQi5xcfPOOQMXIBnmYfnnm8+HyCrGOs\ndIzCXWg6NXGu14rTu/m60LWZeJ0tp4N4qrLKwPiEc6L8PMfXDRNBnQ72Xftj\n5pOAvqlVg5jAtErs58h4cAqCTg9LpenIEKwNKcCPt1DweZ/3QAW/0f2j/qzj\nxgCuxDtzGavKOiK/x5eSSA91RV7tsrqPD8N7EOsv0j/CjPQBRGXV9wfuGxyY\n5luiKjpRAj17MfBhcZYrbc9x7VohcX6W41daimgQGZuocAOoQpPSmHSx8qDN\nVmTzElWlbFVt9GQYVksDvdTfKvZnj16N5MrnLEqZzICpWZ8d6GEc7T6hY42L\neoBGrIrW6IYw5ZXsZa5rIgtoQTqqFPDPVpTB/Mz/i9C+7l3KLinnpnYO1ikV\nuwsKKJdN1u2uQrzXJprFwS0dhzcRPOlBf8k7LwIjyYY4XSnSGswZfPUzdIAZ\nIi/I\r\n=c3xu\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"43c1b5fbf112de59f3e98dce4273e04704d1957d","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.0","@apollosproject/server-core":"^1.2.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.5_1569959652352_0.8647683644103556","host":"s3://npm-registry-packages"}},"1.2.0-beta.1":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-beta.1","_id":"@apollosproject/data-connector-rock@1.2.0-beta.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"6c213adc10f2dea59bb65de87f81f5fa99e5ac77","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-beta.1.tgz","fileCount":70,"integrity":"sha512-vazgcPf6soVtiiB4K6+KyNemzn2fH921BasYF45hI4dRYNaBRTkL9udR90hh1EtNH97eq1gmuAEwTsez8lTj1g==","signatures":[{"sig":"MEQCIAtqkZNbx/29ZlDbIJxmb5DZr5pLXjKiuY8HaEvmx3x7AiBOStqfD6LyiOjriPco0/3lyPjH6rN4h90r0NE881GN6A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":737231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlKh8CRA9TVsSAnZWagAAvFEQAJU53DESHjQ9bSr4TWwL\nrrQ/ZP3z5NRxXZtxDKuYkjbSzNkrEeUKjliy3Ww4f69gzf9bSJTkYkCOyQC0\nkFGitcF2RTXPoH6kGhWGrQeTI1+JhzNzVePbjCdEMaZsoDYNdhHz3GxbSnHc\nOWsx3HpwGGucaDQK3f6IuZxkIllr1Wk46jrkWdRQBH73wX/1Vff3OhFOUN1B\nmP3/um0j5q2cDz5Cp9Xn1+1fc0mI06cdB6Y+A7Eq+s702aISoWHbBbK9TDUo\ndFliro297iEA4AuDV9wWW/sMla6ymqNz/we332nNI5y49J4YLeUjFpaenMeW\n0DaDqbaWrlU7U/rUZB9HhiwtaaadV2KiK1cr2HTAjvYFXDUi9zffchCWdZaC\nOK+ROoiby/9pHtQk6CXkMcscvfPwyiRvBme+QgylJDo4NONv7IRnShSSopB/\nBbNtbRjBcVWFV1EMGl0mOgE3nZkNhdTxUE2OxliRRIe2QSIHhdTpVaE7LaDY\npAAhlz7wCDpawDa2+RlmcspfM3zf+B2MmxFleJCKNLmqj95oytWkZOiZ4Hoe\n511zLhu01m0yvnp9JKpWTH8O1kDd2YrFuWYhOqJqGZAzQqbXoOfyZf4jbuU6\nkf6PYiQIQ5NxJtwg0Ee9/9N8qcdinNjhcw//qY49fthoQivTjt2RUg4L+sug\nabSl\r\n=VuqG\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"dccdcfd414897b4a1ce4a079e5d0a93b379e7f30","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.1","@apollosproject/server-core":"^1.2.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-beta.1_1570023547942_0.8493983701800347","host":"s3://npm-registry-packages"}},"1.2.0-alpha.6":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.6","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.6","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"39e1d945f4971f5115eb6e7add53372da20956cc","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.6.tgz","fileCount":70,"integrity":"sha512-EG+CBewQeN6/6BqX/QokTgjWCqghkN7mdNg4la94wYVAWeV9eoKoe2KGCsESSSWAXpetumtajarntd0MrvBGLQ==","signatures":[{"sig":"MEUCIQDwO68rEOfGGa45T5Fj2CILhhe9nt26k0ed534dKnyryQIgc4EaWEI6hxctg3tAuGdo8Ig4EwQdH/R/Tpt4Oczqf2I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":737240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlKtVCRA9TVsSAnZWagAAcSgQAINkI68NEX32DLESxhX5\nC6wWxVUKcpd0w2vB5PY/MqQbnifImjaaNX4n+j9w5/BeyxTY97g4CaBgG2CM\nl4bQ2+8+EpjeGazRDbjVkgnvZieZgnHUDjNfswweQOXrU27InAKouILtLF+k\nHs9I9RLcFOu4+OUzZ/CT5jOjAbyJORdo6Z3TqwtYLwon8etJwMLlnHJZzT0r\nQJYALvsGGC3GrnL6KD2jIn2HiRUyF2ewXBnE6epqNP4Vd3exxFc40UfX/vKy\nUF+IEk5d98/+jQkcZycyFPk5wSWT72pXY89W74NeAMHChEgsxq2/70b3K04P\nmTffqOIH7eVTOfPM4KxaupWkfqXGf/iTkqaM+f+zvOA1X2vTMes/cs8mfN6N\nQLBIo69JClKYNMuxYdPo/UVvP/zPSKAfkjB7lVFcKITtPzKm25DaJlplFPMH\nruZr6TKZwSgCO6KkXm7oNDKGkXwuh5kArc2YxyJrF5ULHRVB6BBx+iEUHxgj\nIQcm0gtIAPH4meO3kmn5omulVPbUXuIy4IuElOyy1b/Ry+gS68fJN7PxoSQQ\n9uzlNnMOhPoi3l47CoRDE/dJJYKlxfNQdzN8xa1OM/fxBonZ70SQAWpgvrjY\n2gfcGW3fn6I6ij/K3YCG/J0OWCLuNz+/jAdG0Bjr41Bglf48ZZ+VHL5kNZyp\niuyk\r\n=5gdL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"5c302a177ef311041053889b1a467ac82fcd9970","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.0","@apollosproject/server-core":"^1.2.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.6_1570024277203_0.9142845407067026","host":"s3://npm-registry-packages"}},"1.2.0-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.4","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"632ee7b9cc06ad9c67eca693d660fd274a514e3e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.4.tgz","fileCount":70,"integrity":"sha512-oNyT5ihaDNlrxk+aXPq0atDaJ1VUqGatlxT2S/qgd4UC3DC1bqzK95DLPbKEkCQqljczE6HXQJ8NuUk9I5fJGQ==","signatures":[{"sig":"MEUCIB8s5r4bTH0izcpKb8juhjRtpoi52ossIE3zvzJL/u99AiEAqmWTH5JljgZ42u3FauaoVQorpj2Kb5QkB5Tnla3s5EM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":737421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmzxjCRA9TVsSAnZWagAAuhQP/2kgU3/Vobaxq8KEfy6S\nX46iSA3jSEQ0LeIY5DF9MZDgfB3aZP5OvJaAcClAz2epe4db0aG4K0ghxabz\nQvG4MMGUBKFEXdo696nKylqsq5VrHxY3ZVkPFHexTRKXi3S4TCLuf6QRdy1Y\nyFLe1UtSZKPEkBwIAS9+ymvwne4VlrFBHnR2B4WmIPOPDTHvVUleMUT0QB9w\nZFsK/aI2esjWQ7cTkkQTW7EVEfFk/UYHUhlUkwXZxWPcFHQlYfdnDoSoNKVA\nalR4QUUqBMTHs2p2JV+KirRGcbPOBksc6LSak8IfgNGzXOA0GhFyozbKABC2\nac4aI4m3xR6yKv4QFfCSUzYyT6Ld4WEXQht/1asDvqyjlpg3Am9XBFVdgpAV\n/HBJfgdEeid7vlUMQ27D718l4Vlopf1Oj7CmtYldgNz/LQOvGjBYIfcrmgIO\n0BbmhJkXq4Lf0uVzehlaobbyxXf3bl3e2dA/2a27wGPvh+6tStUn3vt18i4x\nt5DvELsTmdR8mNUem39VluQkf6+xOuAd2/ILDje7zsf6IjKNPugwd7UNI3ST\ne8om5CgwXBvepsjPSP6K9bpfvXjGljLkM0sWBQMUrYTkGNxHHH0ZyFvmVjHJ\n51fEOtxql3In9jINrjY8pS09DHklhFkOAp6TqAk0MQ0Lofyh4q+M/nfFG5ns\nTXNf\r\n=LGwK\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"3cba43ea4f78d701dc9ec12f9981f4bfa026c3ac","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.1","@apollosproject/server-core":"^1.2.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.4_1570454626841_0.2994397334682153","host":"s3://npm-registry-packages"}},"1.2.0-beta.2":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-beta.2","_id":"@apollosproject/data-connector-rock@1.2.0-beta.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"20231849319b5d07fbef4bc2c12b7a445b1f1cba","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-beta.2.tgz","fileCount":70,"integrity":"sha512-7tJVeaAIamWJFfk2HaH7FdWvQDlPcOdfV7BIUKVLKqqrdr+fE/23eA3P2o89ToDosNaBbt800ZuMCfGla8/Alg==","signatures":[{"sig":"MEQCICY6A9vrLGZcK95ZU2WsW1oupALfjIAIo8E2NGqgngf5AiAMOUHBCFVKRc2R2YYm18UmQ5v+f9ToqKco11t2gjUBQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":737412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm1YnCRA9TVsSAnZWagAAcxwQAJZro2+XtzEcn5C3JQ/e\nyCR7iISESnliWjvfaOovZEHD4lMyeqMXJFLTuTxYDQbfMEZN6JHhQi+PYmnl\nTdJZSMeSvscchlyCEYsBtR2CQYWWx9+Eop/X3asgIw+VJuvdo13FdO/SeFqb\nEX38tg5em7uPFo+Buznoh4v/IPuK6OXJJj4iFJx2+jAdcH9g4FAT4Juys8cs\nGICr/vRHPiwlJYMN4PC6RMipfSEdaVeGUkvM335Q4yUnW5hl1JJTZLZ8N/FJ\nV2ZjO+wwVzpyQLhBjIhuiiztkRXmyaBpEUsUFxF12P48omOH7bwKqVyveuQ4\nid91OkEKt9/s+3BKCSgG1XtTWkb2Uv0/mpLrP++hIkWZx4si/dMQTbXMe8qm\nQA266v0wLoldl/slwd19HVdiL5DpjlK1WusNwIdHFWaHeMIeixC5iEer5BPw\nYYJjwF2rPxJxhWDR4gA0XCmzJKwYrE9QgvqcF/KNVdPz4MPuoCE+ZgZkujvG\nPnTpauU84u5pXgtbPll1jXpr8P3aCxYJYVZS/uR+sPndZYqtwHGuadclYvuE\n3UC15uzLQ5U3xVM6HzNrDBYvNjr9VCRt8dwG6irxuwxuZwErZyiCuchB196t\nGuJ70IUzD9nbpYS77bVp6+TbF7fbdxZSphHgo1EXQZfKyE3SkT5ZpzCwPzwU\nxFtK\r\n=b9PO\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"79c803e2472ed3bcada49b12bf1e2df4799a3814","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.2","@apollosproject/server-core":"^1.2.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-beta.2_1570461223206_0.9668535832949161","host":"s3://npm-registry-packages"}},"1.2.0-alpha.7":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.7","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.7","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"4bd7ca36a664a5b813611be16ea8c5beb853a51c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.7.tgz","fileCount":70,"integrity":"sha512-wIyKi2cqf3h8PSpo8kf7nAOe6dZLddG2cCqbSq9AVdi1YqCl50EyxQkx+lEhmKIZ2h2XnXb8hoNILGdrKgGEYw==","signatures":[{"sig":"MEYCIQCPaE8ntbKjTR1y+yDpgpTi613lrfiV/VJJ7syKr0w7DwIhAIFwkbYXnul2urb82BbV8KzyJ5ekHx7LME3xT7xVo5Lq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":737430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm1pwCRA9TVsSAnZWagAArv0P/A+KHQWS8xd14Det41yy\nQeXuZt3in6XW3w6j8pm50jMGLATglY62ZAL3Ovio54t7bNrwtAK5IXa2BfCu\noivYG6NQXqbxgeCAzx3EdXHuCfU+4vFNDZ9ZnRX3t9/OaNQFQSyU0E/Oe2BP\npg4hoio1N0zizmEsbwAoo+R5Sgqpy3k8MrEQUuQw7KbqTtQ2zfVgjLQzKmL2\noL3sXRLW3Kyst8s6cJpRheS4QEB6NwgyxSufshQ2AJh/kIHMiwd6gEsCZ85G\ncjDJDeyw8mN5w6aBk9T69Re/SlYY7WSimQHqAeY0bCu2NNsq+mUDG1dKIaGo\nR+9bTFFYuDov9N5AcQy0uII8vl4g+ZgM9C1vbTZge6fwye+TnwhnSlauJWmW\n5sdO2fQWyB5eeE9c9iajLFhinkLZ4Aep+1LfWvgIg+saY77ts+SI5FK5Jgwb\nkoYxuOqH+kD0yyZ9rixmUJo+mllCnKbJFaN3VGLRmuorEzkxDzGbOYK0X31j\nLsOMvOUgPNl+0rpVYUf6eMgWMXgJeo7C8jLk0LAeoeHOdypQ6XcWloD0xVXx\nuPKc8XSOSXNN/KzhSSG8Ky/a3G0/gUr2HxrdBEnyla639RZdm7mwl6owXymw\n6MtU8QU4H1SnMX0Juf/A/nJ5HL88U/FBkfcaiiZAPOvTHMmZAmQaD8BaMR8F\nRb3e\r\n=FcB2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"bfb972ad460ac61dffd429eb9fb201cd296d0bfe","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.1","@apollosproject/server-core":"^1.2.0-alpha.7+bfb972a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.7_1570462319525_0.8702575436925621","host":"s3://npm-registry-packages"}},"1.2.0-beta.3":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-beta.3","_id":"@apollosproject/data-connector-rock@1.2.0-beta.3","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"998239f96364406316c1de14d472c08693f66d44","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-beta.3.tgz","fileCount":71,"integrity":"sha512-GjZkQUwK2+C7zhqNJ37zyN70WFhkTBJBgao+DtPzHjur0wEJGkZ7HGye58lrBLPdRq70b5oByoWzb7A7pttuTQ==","signatures":[{"sig":"MEYCIQDDwy4IQ1kWxD4FRHBtulQ9nhXse9fxw4VB0gojqBnNxgIhAPMKw3Q2N3mKJ5FyHtQbSbAZ2MKtLjQlxKx3wwZnitzM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnztpCRA9TVsSAnZWagAAuZoP/iWYmwgsmO/A+sg89bQG\nQKMEOEaNaLy5WgWWM3Vh3I0lCAHzHFNIkTDXpk7+SuSqniKN5u1p0h4t7j1E\n3bHU3XJ311P5BUuuU7csAjQWnmtZY/OXYAWT76sOfTLRfyHf1Kb35EKGHxjX\nQrEv2goN7xgyBKoj/3Z85XnjyKaWBpZWlE9r8mjQWIy1A27XXkta1MbCo/Gu\n7Sa4hXet9jLZhn2gYsAabhtIVqn3LQcH5nNNn1OWqTu84Tc6VROB2HcPrpAf\n/MypOg0b59AIYkRrJU5soEmRqmxznjjHvnohnM1l/MvpZrbvjFfLR4R/TKwl\nkV9B/W0HpH6aiUGmfp0s8q4qO9vsTdFEmUABZEQAK/XMFxb4G3s6cLcH6As0\nJJfsyVam5ly7Tl6fEiHp30WKSEQMn+wO0p5fy1j+Pn65LIW4Jv5PNOeJi4UG\nwrj0iv8lUOS2pq9Tn9ePF2GJ35oLlcNw6KhKfOPh5086ehkGuJdQHOjDDERZ\nmFTfqiWcmfdYSnkg1unOBPhJWjqPphBy59GFWirLDHFOFFLjVHjx+E6FqJpF\nSC+UkhRfU8y+6A7v/dzepTnyW9qUqix19dByfKfwOaO0/mn9wsQOnVIGtJUE\n1WjoRCIpslGSZzoFd/3H3guu0OSVueRh2AkkU6J7NfISX0g1hCe8TMoy4AlX\n7P6k\r\n=tyVM\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"dea8a596427e2de29210f26564728809d21704ee","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.3","@apollosproject/server-core":"^1.2.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-beta.3_1570716514559_0.04865327612167314","host":"s3://npm-registry-packages"}},"1.2.0-alpha.8":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.8","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.8","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"81fe76bffccfe5eb1234887863facbb508ab5962","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.8.tgz","fileCount":71,"integrity":"sha512-6qtFG5AwCmefefLxoboF/jGywJWHTwT8Pyl/Iaa4DPnk8UAT5B/bW0ZcN2mEOW9eN/GwQnkESWYI95oNEf5bSQ==","signatures":[{"sig":"MEUCIQDvWJSSA7z2oPFPQ1EiStnbf1ntjHMrgTUx2KsXOXrA/gIgF7aBbOoA4cXXI7trn4Oyg7nsKQPVCdW/zRWPGrSMr54=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":762322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn0IFCRA9TVsSAnZWagAALjsP/2OvREocv3wcqCILVSl9\nWgRDPLWdrlUgZIXoqYo33fLNIXt6j8lY3oujmmwV494Y0zbR9Qgq5dFd7nPO\ncRQN8RWozyXHhwYgRqG4H/TXdSeusPFw4jDLj+F2b3suzgiiVqCoY0ADR6+D\nV/HYo8Fd0f/FJ2BZwgYDb+MenpuogVxe7kywigVq9UFAK2tZQupY+XwtNNgT\npLrlDmJn8OzMLKo20AhG1IgQNMlvIxJJ1D4RgH3RScmm18btfncabS/m4oE3\nsSbFkLarBgYoQTGNkob0QuO9oxfEVPkw8zw0jRarjP5cSEGZrn8h1X7g1dIV\nB0tH8oOJvkD+/4jn6nvDRalg7kVwSN4mpNtC+Suxh8X3vMSIxsiMrktfUPDS\ni6B2cWuOV35YZ2mKd7L+7qOjR51WjgEb4bBZJvlpxfOER9ASCDq7aeyGuCza\nV0x1zFowCStUCgYbh1YQ7nj2b381VCmhTQ0DC6YW0Q7HetcoJX/hRxeYRAyo\nPKEi4YXGrw49ULuYlFRdhtKwUuJH+9t2FozrTBJYVF6V93PpE6+NuAO3jIkZ\n3yI+lVo4FcH3DGlmWHxxzY8z8q8vleOPaVnFQGDN936uExZ35vvOXDEEwNzp\nnsoz4Ol90mNJBOCq+Tl8eYbyWvYmi5lXRSoTg3F0qNfW2mDKkK/lbzVSjDSK\n/QIz\r\n=TuIq\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"aae10c9e6650d6661136d6c27e42b4d30be5b971","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.2","@apollosproject/server-core":"^1.2.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.8_1570718213048_0.9339601930547208","host":"s3://npm-registry-packages"}},"1.2.0-beta.4":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-beta.4","_id":"@apollosproject/data-connector-rock@1.2.0-beta.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"1318d41ff2cf074f0e54e2d798b6c094056d7356","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-beta.4.tgz","fileCount":71,"integrity":"sha512-YVyG/1r1j7KWzM+y55hjYwJaQ+rbyt/HcRqP3FFBMrA7O5JxlDsLJ+thgqwiUKEZT12WZhjn85d15AKklo/omw==","signatures":[{"sig":"MEUCICb9gzDu5mkNzST9PYHAIMB268mH/OY34JdPoc/oHB6EAiEA0pHN9TkBSXHiGG+kbnh+JMJpE89mFBSfZCBVmq7A2f8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":763709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpGqsCRA9TVsSAnZWagAABa4P/1Yc8NEYo6MltHLcnC9b\n9WPwjQdAmM39XHs+HjeWCd8UkaknSzMn7e47WSEIh0XPq5ZW4NMH2QWeEXgs\nQkzvfyq3ujg2wmozN8xWPN4DC4BQTt4zPpUTdgDt6656nRe8mzWTFapl8AOV\nz4BzTv9rzqiLJyJcnG3wwdgAV1w2D18x49UcqHw1Ca6KDBo9EFA/KlcEge9p\n7ijJ37h3TaCOc9uBbFzVh1SRXmNW+eyNQW7CXRXZIZqeHd2ijfiQnZ2ILq4x\nWp+FKJpYX5eFZeTHKO/bXrFwHNYJyE2TBNFsNA1wHo0VlQXYDMXkIUSKzbZz\nEykJKF0CxiMU564Cgd8xrWmOvWm3P104OqcKE8yE6+N+p8mcwltiUmk4+BzS\nuA2wTS72yAWl0hYaSKhY7XrKvs1Ib3SXiRGul16IaNdJ4N0DTlYyT8dv15Bp\nQhhCsmgHdqtpZ7Wg9xeaQ5/ywm1y8LFUsQnztqw2Fbo47VrCCtf+jtplSpto\nEEs3tIztiH3Dt1Wm4CVKIXrwkFEf8RXYjfYghbckNjiC4UMZmToQ0qFjitCv\noVnRnkZlkmJIne419NhbvuenQVYywDYHbLTJU48LRMcW78dEPgxvU7rcZx8G\n4b4F9jp0FZVkrhDN5ufw3bVXLbnHtm1jefQtwN1zAh+7KTIbgyJYApJHbxnr\nC13J\r\n=Lz8j\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"7c432b0ba334fe6a79d428e92d57c084b599672d","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.4","@apollosproject/server-core":"^1.2.0-beta.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.4","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-beta.4_1571056299861_0.3460976854700455","host":"s3://npm-registry-packages"}},"1.2.0-alpha.3":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.3","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.3","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"1f6eb883c39993cc219c9e88df3118fce51f08ef","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.3.tgz","fileCount":71,"integrity":"sha512-nLXw2reKLOXqEHKocWpoYIdhU/k2vqNe+hbDxxEQjFc3bIf3WZRccGIzTj7vwWnVAxQQLdQHx0alaTiUwVBBJw==","signatures":[{"sig":"MEUCIQDmU48lWYMVAjGFul2iaz/EWlcXogP88kmZDTJr2dabnwIgGdd0/qTf8K9phUgkMO9PqA+kcI1bDtGZ3dvdfLU9/bQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":763736,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpHNxCRA9TVsSAnZWagAAKAUP/0Zog0XyiaivLoxfZ2FN\njoE+Hp4XbyFi9gUXK93uHfeSQDlkNCrH33cCI2THKQdL6Tw/Y8fU8a6J5OBQ\n8bZQiGCz4DpTuqxo2+bWBM+tcZYiRabBPDf6PMbHA/QVX69RdwrDx1FQKmJC\nkFE28zoDnOnlB8Dv0JSPD2WUty3Skqjpv5cXhtbjpfUH9JetdeawWTCvrWMO\ncA0RbR6CqDxSWUutaMLt1/kMNYizr7wX+MHqFQWcEzvOwA7hpgNRjPu1zU4t\njT+krx4z0UJvjcjxGTfQkv50eBmOv/FjSUkprJkY02yxlRNdt6ihnWXlVWfb\nvTMed69dT9IIVbEMP0/CeeeorF3J53xCG0cXwkTjIyM8IiL5ip0VE1noHGp5\npszttUAf67bZBsNtTqCHia+Gkm47S+On0hm/pDGio2xf52LzKI3ToBk3W0KI\nHcu5IxFuxuGCR9uvrCy3TWO2H6vrxRRpxEcGNf05wSPBjjirmSB1cZhmPCRE\nBtKFebZSA9/CwqlrcO7zwIgeDe477oT5aHKsBaOxJnxwDKCV0k9euO/eexMi\nVnWrKLWLNZ822vW4s3FHXnUwhCudNEqMdkqr4ZXyJHwocMPb7TQQ5EryXvaQ\nMtEsUXJYOXo11tRLLAXL1kqOacupr1+pQgOIRoNE22Mi7nLE2ZVQbrOYOcan\nnKm9\r\n=q62G\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"44e5f5b3dbd51e7954a5fc250bc8e04132fcc778","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-alpha.3+44e5f5b","@apollosproject/server-core":"^1.2.0-alpha.3+44e5f5b"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.3_1571058544956_0.6442308165384194","host":"s3://npm-registry-packages"}},"1.2.0-beta.5":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-beta.5","_id":"@apollosproject/data-connector-rock@1.2.0-beta.5","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9d17c1337b9d388b3f86a23fdd0e75f3350947f9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-beta.5.tgz","fileCount":71,"integrity":"sha512-99pFEzmtB2FgDzraJqv4UiZfevRNEVxe74UQxqUWp6n7B5K9hx355HFi9kbLRAHNFQvVIzBoR/uwByKIKkj3cw==","signatures":[{"sig":"MEUCIQDcs63uuXWXcegJzFjTq0M3VgcmgGwhRp5BQOXgz8fX7QIgXKYxRWQYNBvAW4oRMrn3/vnFX4EnbCtwoI1NOIvWDlQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":763794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdqeaNCRA9TVsSAnZWagAA3UAP/1RmRQ5ExPU72WJ1sLdf\nO9MYB5a3xAXZQD8E+0J3FnwfBvu1PSCH3w7Kcj/xW6BANDBC8GJRSbGxGbIO\nz8W+JkNGKM4tf8T9keAGe2DdG013xY0eZ+TNEoshO5UfC9bneOlscOsALfyM\ncoeMVEr1hQoKNfwvs4z5sl+Nyq0HXTh+DJ9x7+gij7Ij9qKA1jKfGX2TcyCF\np2Q/+W3+Lu3JWRq/U0Jt+EjaX5rMkBXzwi2ELQYYWUPQjvygIMXIVseBQWUp\n42GSE+lGnR83/UmbcivFZBBFviUnhAOggPD9cadVojcy4f94cND4pXb//7zH\n3dlUGe/PO7nbvJJ+gPRSrdLYzDip74KxuWODNWrUtYqx5wczQFjJvQCTUsS2\nMyYBPdOpuVm2DfJPuC2VeiyT65tFVYy7Fb3WSCHweknQHmuZk6UifSrqVctX\n9zRF+6+st6OU32+y98kMxdl7M84JoM5Wj/n/C9hRxJTGzwcQu5bXsTck+hJ9\nR54XRGo29YCKCHnFxMTiDBmzFFXYrogE4UpI34Kt95UkUBQKgzqudg++X7PU\nuUupWdpPs7/BxYZLbyLLkUBQmp1vft5khhJnGi14RUcV+LXnTO661aNCOtjX\ne6mwC215+AEqvCf66ig4fomzibrWSKNBwF6uJW0DuBv1cKs52z6md6rkN9OT\naFQA\r\n=jLSj\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"2e812a4025c0bdc9d99113fe33b76970ce7371db","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.5","@apollosproject/server-core":"^1.2.0-beta.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.5","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.5"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-beta.5_1571415693148_0.7334548050432006","host":"s3://npm-registry-packages"}},"1.2.0-beta.6":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-beta.6","_id":"@apollosproject/data-connector-rock@1.2.0-beta.6","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"7cf38a8589eec0e6e7fce3d57a1e9e7cf9c33674","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-beta.6.tgz","fileCount":71,"integrity":"sha512-QtawKJmiLyMyqE5D5eAaxSiciToZu+a7RwKam0jd2ZnPHJA2IFazOP9z9ddd5CFIt+lydiTsU/cYjrgy/2LlTA==","signatures":[{"sig":"MEYCIQCGEx4Xw8uUu2ud5zDYMfgE4Fniwe2Um8S4x9MhBCrqOQIhAPaJcsT3iJFICfslZe3l3uWD693cl3YnxiRKBwQbnfxX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":763794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrefPCRA9TVsSAnZWagAAiXwP/0ZNe/wzQUDSk47VqHGo\nuzH+BBLPfusAxC9d6Vl6Ofrv4R1qhuasWw3Ksb7Dn3ZwD3Vfig5LD4HoqVUB\nRC9QGtiIpsg8ZHzYGQIdEoHNExuCdASusiu3vs/eeqLJvGjsreqa1ctaZVjp\ndpNLmryIdehjrnr3l8dTGZ/Zq9HTimNxIPnv5SPluOGPZeK7UYn++t6qRcH1\n0RYnMmZQLwsQ3n/EgjjDjZemX5InovZndljAzS3dFeypJlHVDHUY0bMIG11K\nLJoFqd6y9ItE+XMKQVnwdJFs5C99gcic7FF3tgscIdHe4iYxTRjj42PxY5Mz\nJKPydRnTIYNAT9dC2ee7TUcFCWUXsMPqIBeOfLrar4AEIeyFvoC8+xnzQFFj\n8CaKokMgdQrqDB5WF03rPV+BJe85rMrC2huX0KSEuCcPIQZDm5wwRpinW15J\n35nXF9LGyqqrTVrFyNSZRJDzQFXX17CLNLxIhZ38pEkqRhdor1cqMhek3lo6\n4N8RGqxx46tcJKvvQqvgIsem0ZQbdtRRuquMbunsYhy9ZQU1gZyQDBuv33mw\netR8ZQwiz1WM6AQlyl3XM6vGfc+Zduxn3cQnKhaOwCo5aVV+GVSGPJCIV25X\no/fmXZVCX1nTpWM9/hves2Tf5Yt/mpS4h7uD8DkE540oBToKqEOgZ18Jn+6v\nSsNr\r\n=67Fj\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"38464c64f3ed5b79c0bfefe155dc3852b1b7b339","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.6","@apollosproject/server-core":"^1.2.0-beta.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.6","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-beta.6_1571678158974_0.6976165855891499","host":"s3://npm-registry-packages"}},"1.2.0-beta.7":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-beta.7","_id":"@apollosproject/data-connector-rock@1.2.0-beta.7","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"41330254f12809bfa210bda718487bd61781961c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-beta.7.tgz","fileCount":71,"integrity":"sha512-thBtZDaFjo+H/Y+OV4cQwAYmhZpvlrYaRJ+Te7IrAn9c4ejrAkoKBdzaqxONi6w3T4XSfEQeUIhYChN07o/tEw==","signatures":[{"sig":"MEUCIEwWF454XJ3IGYFrt5fFVa5Te9ATCyiETmY6VAaiPwvZAiEA/6nkfanNI7tLjoMKVFwYbCQZ/eyByok5YceS0Z0vY2M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":771105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsK7sCRA9TVsSAnZWagAABQ8P/0RsyueHTNr6SfwByeA3\nv5r++VSluIpVUSS3JMLfJEIlSnqhZZYj7bsGU80PpxbjghQ/mPm70SN8deNT\nIR1fPWSzMWxA/NiRuofNx2FbSDSgw5OE76/++ID4eEv06DhMh6G5A3Qw5Lxt\nHT6DQiRNShj19ETuWppTH/KGTzsGSZPhKi8YzGTzBNDaS4mWxNcBT1kJVDKB\np859q4nC6vZesDvJ8ajmDzO+GTbOL7Z6b6JcDcZy1VixcYPcGd/lASEjiMUM\nfjv1rtgIlsZ+3MwtzSXOf2/z4B0EiuS0phxrjrHVI5np9S2tdt3mfavzVfxB\neaZAqGlSqr2FdFEYIdqHkfsDWwRaGlBB4vf5AR1hkdhJNan5KHvpQgeWsbH/\nuApgl+ZxCIzU3wVWSuuxTAhsuIc7wS+KQV8vincJOAkL4pEn6+zjOYuuDFFu\nZBqpYmz1TykW6RrtUc396mhFmjiwQM/BaXlAhFMGynrT4ui7FxJPYvyCMbo5\nilz2UW7vsYyrno/XzomfQd9uQtR2iq5kfWRN16Ix/HlSXmFGPfiUr+rv9tzQ\nGsX189+4ezVPmkqU6GEBnxXGtGbTQ2xoW0SFO6qFCbXmP7Gu1HPjpLVNzQN+\n9+vB7dDKW8FVyMDB1/2kcZd+otXls/6fnoiynJcGawyGsOWqwPQUMLfmfkUR\nm2td\r\n=dF6t\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"073af22eb70e7f8f8be3f9a3a8197f5e586fb418","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.7","@apollosproject/server-core":"^1.2.0-beta.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.7","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.7"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-beta.7_1571860204071_0.2548561423317097","host":"s3://npm-registry-packages"}},"1.2.0-alpha.10":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.10","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.10","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"b15cff185751812b1d0e31259fe96a8b6b23cba0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.10.tgz","fileCount":71,"integrity":"sha512-39dGnnaHvpg580fhmydeFSXYfj7s1qkwhyIClbcZQtBazn3L2VkVztkklhySAZTO+BpOfNT4fJkPubBZg0H45A==","signatures":[{"sig":"MEQCIETHNV2RCib5mRYQjMMAuN/au9FtQ3LfAOw0QcI9wocXAiBnxYVpF2/iRtAkx8qJ8kUWm4NGzD/WX2jkpKXS+Re4NA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":786876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdualwCRA9TVsSAnZWagAAoJMP+wVUO2uF8ckwwRQ1R8w5\nBm8vdkEnMvJc9aeFvXZuF+qrEBNZbZhIsTZ8587dFBLYOkSty1/MTD88mWOP\nY7USGQlQEiJga8WoIv6vcYEHEznYAkUd4FypHbBe0R2CSWlP/t4HY2nJkg1Q\nAdIS6DhZJquqvsy8tAu/qp64lLVwHUJPQcTE4MbKFvT8RzBA109JwyQXFK3P\nr15rnI1UljVp2zZf2I1mWCRnrljP2qRK0CBByfNOkojcEPZQFVbVjNxrg56s\npg8K78hS/gNKg9H4IAzonv8UDXekZqu1dWR8FfxEReUpU76FB4nPmYnLs3gV\nYXO3bYJdPAILKeNBlG14fAKo6GSZ6IbewSacURaq9XNN5B4N1ABAqH/5GKNL\naa02R9Dhg7AQ6SB53FptANGfTn9CY1VbCAjceGZnoUWmlathTJQC2WyB0AdA\n18Rx7d9CzLvdZdIiDxOrRAKfsCVYSC9UrS72wA5q8TNkYYPsDNbND/6mTGwv\nb4J3hXrdlRfc65RLtWYhMpRRdCudXpG5JQVoEojylYQMk31yr8cw37yapdhT\nkLQAlqeYYjZn6sZuCm2llsgqFev8Ht0Qr2m1cZQjYk1448TkDtIOqTbED9dO\nWowz7IgOlgYtezFK54Yh6GKKgZJyayk3oikDu+g0f1OMkJC4NssX6RQnbHQ8\nIMCd\r\n=raSR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"dba9f0524528abb535f07c598e34a9ca419892b0","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.7","@apollosproject/server-core":"^1.2.0-beta.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.7","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.7"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.10_1572448624353_0.6966574575834141","host":"s3://npm-registry-packages"}},"1.2.0-alpha.11":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.11","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.11","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"d3cd78aac2e37c779c027c4354e48130f3313cbf","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.11.tgz","fileCount":71,"integrity":"sha512-tZCzMfn+o4TZFmEkgS6YJfAJk/RacOtoKXrDcDwQkwuU8Li6uuXhPRAZ3B7xaFQ8smpLkjMgsLsIsMbP+V/x4Q==","signatures":[{"sig":"MEYCIQDGp2CXLMMPjqMk3UjWN40MdvRPvXXEJ+fukVwbU82azAIhANaTbsMDcHCB5sSTDF8w6DRVabWFMNoSjPCW3RXOaeDS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":786906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduc7xCRA9TVsSAnZWagAADMwP/i+1bPVyYElM/OvQzEDe\nBwhdCpXPbE+uJA1Jwwygl6SsLtJSZs+HMUJCa/v4pL7VpUoSeFUydQw3tUk0\nGkzk7IxhoN9xU4ptcK/7C2ZqaK5nLz/Nyse/UMQqrVSHtO0ek1ihJ9pw3Bw9\nfx1vYMKUbU5Lup4bIUWy/F2M9tRso5UWIzJJ9B+2+lW1wBhNlnM7SgFlWCmU\nWOKKpcBXqnL6tjn6cYSu+DwXFpE/2H2F2MnO0gMc92tcra9b5ujwUgvgqszJ\n4xH7rJIuCfrQDk7SX18bmu6hvx62wC1a+cEC+lqctqy3K2+rS2khxFe15MBU\nQSoFPKQxvP34GagTj+X5GN6dWxoBKhfhNeY0DuRBMO/SqncHlfIP57p7eZ+W\nxwB1ArfsvPMyVmuHWQguM9oOfNCOZQ3ymM74J05hnz6rO6W3jFcPYRiNTCHS\n7HELyzeABKJD0lay/CbFtUJZmgBunNN9wul7Hcuc8Bf+5gBI8docky72gIvo\n4R3OvAVhiK02BpgaTlH3fDC6xK3J4QsLRBQjgOZiM3dift7tZ1nMAkwceOE9\n+o1/vnqTsJcsU2hIB5IQIUyK+0Y5r2vaU1/vx0g9uE4efmO7bXbekr5ydBJe\nof7SKkq1B1esQztlrwN4OKIulZk/+nt6ceV/yDcxLqKTKrgkahedaSDM62J6\njwWM\r\n=iWB5\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"bfd2af79c72ca9d8e78b6252ce1521be99b66f11","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-alpha.11+bfd2af7","@apollosproject/server-core":"^1.2.0-alpha.11+bfd2af7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.7","@apollosproject/apollo-server-env-mock":"^1.2.0-alpha.11+bfd2af7"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.11_1572458225308_0.8717306243529697","host":"s3://npm-registry-packages"}},"1.2.0-alpha.12":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.12","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.12","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"b1e1611a111549c623d99aa3e23507df2fd51e00","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.12.tgz","fileCount":71,"integrity":"sha512-ofa9HOIwa+89lEItJN5nY/eo5y8WUesfRaMZ8644Nx69MwMJQMed9GF8xhNpTnpq0DmopU3puKp0dIP1DEGN3g==","signatures":[{"sig":"MEYCIQDGM+mkgRrxP62NQ9O2FU7bZijc7NzPr5EHmlGvOAdq/QIhALi0fGeVK5kT1QDDu28J0krhhiVGtCyHtA2heiVeJP75","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":786904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduuMNCRA9TVsSAnZWagAA9swQAI37zlH2GAvSvqoT6AId\n6w3ljrWAqy3nf6hydTA0IKO13j6Bfk0q7jh/GUTLCQS1/Mll3ftjH2irdRa3\nyfzYO6uaHKf16IHYZQVfTi1w4EwXtKQN5H1ucjAalFZpUAk/xXLBoFq5Ji+C\nCTdMX6W4fFDvULnM3J/4bExcoVuqnWVDlYglDB7rmZhI8ySGaozpBLgZelTB\nTpb0EsXs9DFKOihcTrgu1jMKjtx8qZefEdVPFk7Vt/vczFhMytIu6XtI+XHk\nRxd1bW3bgOiDUIgWU0SMRlH+O3Lh95UfDIL5MZTl2KR5xVyBx9UKpv4/LdyD\n7djZwfKfrFgxDvYP0Fv8B0l/uXFQBlxXa+QvwkGac5fVRbnN1Ps2pRRCjPkE\nzZ04fp8irisTC/cj9c1GzTsOEIwQLaATppihNJmfL5Ayq+QPtVTWatyyoVXx\n0SPXzfK+FXyNiKmVHbNDqR0ZTKEY90qXOxpPDgDKWS3Yr1ivoQP356MhVro/\nS6/C9/BJtw71gNbYjkhoMQYjc6biASxqnFf+qxsm0/V0ef217eozcjrPDUyM\n+UlSqZ/hUGXNeZD6AKHf/3X3YOx+iD54SZCoJiIPCN61L+kXSXaiakzgR9wN\nr1Zsf+uaYxfozfBbxrNLdq9M7gXmSdSRBbmEmAFaaZD/bsvb6nGJwIS47Ss7\n9OUw\r\n=IFUl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"ca31ecf2f2104cbf6f822d2cf295eb5220c330f2","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.7","@apollosproject/server-core":"^1.2.0-alpha.12+ca31ecf"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.7","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.7"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.12_1572528908788_0.936968175102453","host":"s3://npm-registry-packages"}},"1.2.0-alpha.13":{"name":"@apollosproject/data-connector-rock","version":"1.2.0-alpha.13","_id":"@apollosproject/data-connector-rock@1.2.0-alpha.13","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"a5f48547d923ddfdf06db91ca6c899e5d111bc88","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0-alpha.13.tgz","fileCount":71,"integrity":"sha512-2JK4MTdxNZsmp5XyMdbXq9I2mUAY2BpGJaQqbVOxVmD/Lei13m3cQcErOGIAsQCqpMMrOyHOMuYIUV/mobgNNA==","signatures":[{"sig":"MEUCIGYI0RY2cVD8wmZRnv9R48zGnLHusRdtVRuQdrwgUhQKAiEA6lWJadYRjHTZIk/HZ5eTiNuGkgv8Tohx5KzvhdGgU90=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":786904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduvweCRA9TVsSAnZWagAA9yAP/jr5hmXk1frtPT80/NKq\nSani7YWMhukub50OJD7mABFJeoAS9szToO4rogtirR4N9NhgaRn9MuOB81Le\ncT8pO92+qWeLbIe5ust6eVxWbpUQda+WmEBGSPLP4TOXMD3YE0ViM4v0jDyw\nnKFF655mNCDy7iP0jRdRcpGkBSGDOilw7aR2sCtYfc64NLy7pF0pb9PyuqE+\nRcK/LFAvWou0XBL8Rri8V97D9RETXRmSzWP/MVSQpw7+7hR3LqmNUOkFIupr\nYRg4qnUSRu8APJOCaWwcIPsfBaD5Mf1GI6e+WEnxOWl+J10i+0uJKd/nJ9IG\n4hD/7vQh78Vlef/gb3klC19NJ1NJP8aMlPi6xPAPrDyHTRuesTln5E5Zuys6\nvY+LR4CXjESzYLg/urvs3TxBta5XsLAZReSgJYmwEzbXuQ130ONLdZAUjaG2\nCvWQrWRMVnGR5l3bB9l28E636IinH2jnJnTEItzrKRXeAwHVDdGUFsz5JNmD\nv9W6ho93shRmzGLY7Guc189JbKkFMozfjff9buGATFO9Wz6xzhdQADvcl2NM\nTP7TUl2dUofQZpMHi4g7HaGXuWjg0FQBQE9v1Ty1ShAMh0XeIkB8fuMyYxZ1\nNyLhQ5mQs7O0NqfEeka9w92m7GEwdR830ot7yyJXPXjDXHCFUDjMT/37UeVm\nCpqX\r\n=yske\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"207440df4450ffeeddc8e5a32367c5c1748285ca","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0-beta.7","@apollosproject/server-core":"^1.2.0-alpha.13+207440d"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0-beta.7","@apollosproject/apollo-server-env-mock":"^1.2.0-beta.7"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0-alpha.13_1572535326397_0.947127058787147","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@apollosproject/data-connector-rock","version":"1.2.0","_id":"@apollosproject/data-connector-rock@1.2.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"58d4de98b0a8ed7cc08bf1553ed67dae633eb23b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.0.tgz","fileCount":71,"integrity":"sha512-NOif81bNTo3Woaj4ohPhy1tocwiLq8/jRk/XB4bX9TvxsGc6K9suKU1rSA27ZxcwpSBrhlZdtaeGZxPx2fubYQ==","signatures":[{"sig":"MEUCICAWv9NfURzJcWlkWvBdF9CUqflX8N7zYyAL8wswIXs4AiEAnHm2DUTKjIW/mT53dtkhNXeY0Xow1KOgQi5XgzrjzLs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":786849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduyCkCRA9TVsSAnZWagAAfhAP/3tDvOtup+w8FFkylwLy\nABG722kJ4stbGykWQFSOnBORMD/9twO6pxlK38C0ujwJbSq0hRfBfS40Kg1Q\nbLwyOYY4voPTLO2Wn4NqyHB9ucLmzwZJ+69K/H5VlocAaTol7vq5t9Zom4ux\nR5obfP866ama0pWv0FZCjEODEF6Di+nIjzxrJeMUXSS0VjMOK4GEjBqVPe2K\nwogdHcA2AcOeb2Dx77Ew3HJe2YZhrOK0yN7i2XWP+e8URg+Ncudr6RTgWpLO\n/Oex4RLsthvWhFzhau8mVKme4xZ0Df1K6YuZxhJr2/HEhhxXdiTByNoSxMtT\n5Cd9HBrjlc0A9ktMUsKFkc7r8HICLFKJiZoLAaZ3meS3YmKHWg5ZidOtd+PD\nQ43a97wjYBRMzGObyI4Mb/HsnyM2lVCTI+nSsFK+BE9wqhJ72j+JPvaDCaTn\nzJu0QeNwAxXOV+2iRby1UmSkbDCe7UwqzWIFUTsZOO9oHnV5TKENMf9l0lPL\npIYcb5tcqzPZuIGFejiXnLgda+aI2gVA6oe2o12hR6rVbWuq1BPZen90qR5m\nUxR3mjWcfJQAd+sj9JMROuNdxosOCsumpiwBbdZPi0cfD+VExzfV4HwgcbJv\ns6GMZmlqgHk+53VJGrc7v2gDqfYRR/yovGTR8QTHlV3aJlYHgCgcM0oWIBW0\nfzGP\r\n=KMML\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"855e66f1ddbdb7170f047f5014124138b9abfe84","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0","@apollosproject/server-core":"^1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0","@apollosproject/apollo-server-env-mock":"^1.2.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.0_1572544676123_0.015189496509331768","host":"s3://npm-registry-packages"}},"1.2.1-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"1.2.1-alpha.4","_id":"@apollosproject/data-connector-rock@1.2.1-alpha.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"1cdf2762f7d758a3fef9ff3bb2bd23c544eeba4c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.1-alpha.4.tgz","fileCount":71,"integrity":"sha512-Q7Eq8qKeF0nPcnBUUZ5nDQewAMiuHrjJrmMJtBU5H/L5n6U2JBHO4Co6ICwlT0kpzSP5k4f1CLe1LHZ0wAyy/Q==","signatures":[{"sig":"MEUCIQC2/jz4DOYFSei9k18aWlzWNfVURXoCbxvRiowBeJkRCAIgO1TeFuWUDuMZv1OAciOR7NnJCEzpAgpgax7KzSJ40ok=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":786881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwI6HCRA9TVsSAnZWagAACPwQAIsES5OCKkgZDmfHRH/q\nXgmVhHDIGDvRVq42cc8X5FGHR2weyTW/dYF7ma8jDRBMu53TUtqIAqk1mx6u\n6KfvkrdOP1ShoKiq1MnM8dP3E0hffYhbytC5PWhc2OQzzLOH8RuhA9fEx0az\n34tvPFPbyGtisbV6uduwel/jKygmEjByhflQHX1aIKlTW+kkFjktJ0Ua9gHS\nZUmB4gwtuXBvtZZt69R+or7EpQ/viWiF9vKPyccMEbr5hMEvdgYh3262EaW6\n7b4AlvlT44Az8cBckKYGP7RXKoK/O5l3TEssnKmyYYKs6n1KscxRPkBd2Wbx\ndVY16fnVNdAuznmMAZQk0EyClBdNo7QIhrZ+Edv8fxvkb3c7vjrbglVAouME\nkdXCuG2Y1/YMlA4usjLnPJBFZhr1Cs38ZKmci8buDLcP51wGWnMrB21FeHiZ\na2fBKqicw3/i7Nq8SvYuGostHz1YJjqrBo3jRhxp0pb810A+BbRfQ4TJJkCG\nvfpx8pyCcfEHgxqVV3kYvYWmlQF3ULd5lauDuLb166CzTWkLqpqLmaJEpIxm\nL5Q5boq8Cc49o86gnQDYGmT552tAx6ZoPe35F7jVi0Okfabjem6v3pgRViaH\nO0aGtJjhRaFuhbc+BDUOgXM6ZJl6A1MOjRmdVyWmU+L3WhOZmbf+K2QJMsn4\nR/3t\r\n=O1xX\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"c9a41000105fedff47f9c74ccdb0b76eba55f855","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0","@apollosproject/server-core":"^1.2.1-alpha.4+c9a4100"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0","@apollosproject/apollo-server-env-mock":"^1.2.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.1-alpha.4_1572900486798_0.7387582140450917","host":"s3://npm-registry-packages"}},"1.2.1-alpha.5":{"name":"@apollosproject/data-connector-rock","version":"1.2.1-alpha.5","_id":"@apollosproject/data-connector-rock@1.2.1-alpha.5","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"143a185bafa42d548c5a1d672e286d0262d450b7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.1-alpha.5.tgz","fileCount":71,"integrity":"sha512-2k4JjWA1B+tAppxbtPh2kT0I2he8bfDJmHDdcrO+LzJiEgvglPHqLcD3esdpYf1Hdj64XkMRyurXFz1eJVT/gw==","signatures":[{"sig":"MEUCIQDR+O4kWDPjkCzm6Q4iMc/OG4DvpeYpfkUF3KhIaiSRqAIgIhMWx2SfldFBdtNrY5Rm2zlnhnsVxwLbC0SV6VDnvEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":787224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwJjtCRA9TVsSAnZWagAAsHQP/i6etVIT8FXVZIIYwbJy\nohIm4X5h+yDqobYkgJXRElTrp0cVrZz6vAroO0UKhxf/kypbiDKO8+Lk05MB\n8jq4SSKIqCQ/TUUpSrj7pb7IqydhCLx5vRd756HgyQLzT0gJFHDqsmsI5OjH\ndQe3fLTDN1M6TQ+zp+BJgGqsFAihrqBMfgHnmxro7U2NgHMzZkk5ByHDu2gK\nNPO0Bu/wg4Mmza4DY7fCZjZKTXLY/sXlP6tP1EcVVclItDyvkecJKuMScZuZ\ngCBAa7X2UoLmJeRZkvudY4ocN0nFfPk05K0a08MRhNH6HFn/XuxMfblImW3x\nA49lyqJty95it3Zk41Dnb6pGwV6xaCP2oEJUkgHae9wzEJOPQldFRgblCBkP\nkgZBkmMKgBjODiRQJklJjGshO5serN7evkf67mF90JTl54/QNmCewD39USIg\noydTHOL4mu2Nq51t525DhD26dUgAyUNEdoZYbz3h3hXw6yU6cDIIRs8YkPjH\ne66KY0IivQ8ngrdks722IvflZ5oOIefOJKKGzI2MeEzCQJPNVNorZlwSMfHS\nQulsuEnb+BPQiAymcCXOUwZS85hqpn+7y9dLpwtH04roREKV7QpxKad2CFZ2\nmykru+hPh23VmNndIVhg3AGP1xkCw1UKcn+82KT9H8Aj6ZWy3lOIBKbyb5R1\n5AwJ\r\n=n3Sw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"28aa0f1b838bdb661bbc9e82c880385c5ead8f96","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.0","@apollosproject/server-core":"^1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.0","@apollosproject/apollo-server-env-mock":"^1.2.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.1-alpha.5_1572903149439_0.3015967744016139","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"@apollosproject/data-connector-rock","version":"1.2.1","_id":"@apollosproject/data-connector-rock@1.2.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"58a1cf8d210d3237184bd8d4e66a6a0ea7bf14c6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.1.tgz","fileCount":71,"integrity":"sha512-5SKFUSwp9srM7QWPzhpUmBu77C83E/2KbfBrIAPUbbkyuFwKm0OO4V0WX89bVz+FEF1obn81+Fi3NTfaWKyctg==","signatures":[{"sig":"MEUCIQDKV45W1KW5zcvt3LssB00K7ySvCQ0K5pz1UAcLeiRTAgIgTSuFC9FFK07MDUC1w4tSxSMS2pbeZaDIsE3cBHh8xN8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":787208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwZefCRA9TVsSAnZWagAAnqEQAIO5EglODFgnL6wgQ3GO\nBWVefGFYgtAtXivk1X3uWcVCaeoo5uZRFa9o6vCokUQvR9Ce0jHffDXrAu1l\nZP9vmUQqbneg+Q8fpFF0qLf+RltgoSv4E2sebUvkbaMay8A/AZpnZocaeYXX\ne6MHlU1uLbmuxN/CWP1eodzc+x2sgC6+X0r7dv7cKxNYAM6J1Ln6R5veRiUr\nm8beqwQAOXgApxElwlKYWItgaQyMgTktjoKKwLT9Igmr4pFAWrKml/FxkxjB\n/4GocmfoDvbUBPsV456C/RWxIGBECbLLEDgEcAYXmun6WJsmOAiwAePgGCC4\n6c5xwnw6O70rao1uWhnRnHifryhb3frNYbPzT7U8+BoHskhPSbucr+Pggln7\njJm8MOFoWNWj5BZVxTtMnS+50syQvg5IZAR54dzmh59ng10+tD5Wme8mdH24\nTzn4FpR1k6GoUPO2rvS5q5BCStqQmIJ75dsg3svDD1ejQ+7p+IVHmpsZLMzq\nc4Mg2Zrnd79XnrLuSBVhVUnSNCfdNY8k9MYI+yXB4krFqCPl0oOk0VlUJifK\nlXOgoVI5YV36DeSTJvNcxX0weTNKeainljNrxWLp4fPJJMA4cOTI5LdPR2gV\n9SMNpJKLt5enljRAwJYfcJjs8qjX7hgfro0TTAe9rLUIDTJw+RRUYqSJ1BG/\nw9h0\r\n=yTkl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"03dc63626795af82d86f1acf541721e83c929437","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.1","@apollosproject/server-core":"^1.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.1","@apollosproject/apollo-server-env-mock":"^1.2.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.1_1572968351015_0.4960506646975733","host":"s3://npm-registry-packages"}},"1.2.2-alpha.0":{"name":"@apollosproject/data-connector-rock","version":"1.2.2-alpha.0","_id":"@apollosproject/data-connector-rock@1.2.2-alpha.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"7bb7a6b98af477a3d5b539fcce77f324f8882c1e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.2-alpha.0.tgz","fileCount":71,"integrity":"sha512-WpFCW1MwjhajTuI2B2wZOcFi6gaBKDKdwsLbhctWuFviAO+Mpu3bDDHM9QbKr9ez6ji4epTVrmlw2Kx64J/tUA==","signatures":[{"sig":"MEUCIBLTnPbvhbnlu/oXB/G6Mx+T48lZ7XqRTPHf1GhAkrRBAiEA1TTEWRICaImD8gcGtSLp9fWNtr73oGeipTqPc1SGBVA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":787811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwgNGCRA9TVsSAnZWagAAu+cP/R5AaVt8D4ATO4IHKOJz\nwsah6eRJtOIlN7FnyMs00EYgfwB0pZ/l4W0/wNz8hhdoKIFHuP70EF7pP50b\nZHSBUgn74C0eZCkII0ZDr7VYjo/ed7rnp4c7lfYM/l3tla0TRCYt9ZCXH1/v\nC5V+Yfi0qBOqn+XNSxrvIdvQJC2ly5mH7pQfStQ4b3RPa2ouyS0+8IfONBmY\neiF3QxcYjrSI5gT4SUJJaYk1mgBOL31wgUAZL8Rw7cAQIYVl6yeVwSobuQxr\nX3DWmjjzF5OHgTie0vj/u0ClQadp3eC0kc/7WwVxNAIVn8G7iIfIzHZLtpqW\nQdx/jFlp7TH+TaCZ7USV3YfwyaKAiHKKtPcg5wv/1gZQbYsNaXgC01kFAUy6\nczTzxbvBgLpVSYdrqgfKNcEWY64HXzL6gst5+A9DkjRGSb74oXwjndahB8kV\nMIrukCxfooHVfIvy3N7EXGbM9yCPaJosc4R0LEyX8fHg9h52XEtBSfZhHrqN\nYCOXyfuMLsPQDRPGihp4oUmXYTFEsz3NxcPBHQPXstpKKZuJeIYbNT/v3uo1\nS7cb9ur02jEJaP1r7jtKbIR0Fsm1jon+BcIRZMOni4tq++001YKsL9P0+K6s\nM4G8hOBHTM6acp4isc9noCeLD0q1tlCQFRMhv+AZ315knVKuc88hnltb/mEe\nHmky\r\n=b0Mm\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"e5270df30043fa1200031b6c76b7f9f615ce9f5f","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.1","@apollosproject/server-core":"^1.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.1","@apollosproject/apollo-server-env-mock":"^1.2.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.2-alpha.0_1572995910272_0.5548290439057302","host":"s3://npm-registry-packages"}},"1.2.2-alpha.2":{"name":"@apollosproject/data-connector-rock","version":"1.2.2-alpha.2","_id":"@apollosproject/data-connector-rock@1.2.2-alpha.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"451e12e49d86294986ba6f5adc54c00225bf503b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.2-alpha.2.tgz","fileCount":71,"integrity":"sha512-AYY0CUJBD10Xzy/zIlHYnH4VW3V0zajA2zHTMRZrZ8FTFxCBTAY/XQSg4WJURagBbw0cfRGF/2p7k9aPZfDzvg==","signatures":[{"sig":"MEQCIHrXgvs110FMnxANii7xoo1AHhEpvY+zXs4lzQaWdyrxAiBVTqfHGXe63zs4yS5xarUotGuNm+36R8TiHpAWojS3Bg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":787843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwwZyCRA9TVsSAnZWagAArXkP+wVgHk8/qyASC/hX9HFO\nuxyDPIuHP9wkPiF4heG0u4WiNeg/vNM/9bNW2sCtkGpisW6olnFUKL0pXKxu\n/KdybXV/vMOQnSVLAjWAMgzZdsFl8Nq3WK7MU0oiOPiPqz9bzM8p26AfV+CD\nzmx22wQofx9xfCp1972qQ6BHf9KuvtqjHzuli+nPdOkZs35l5CLv31Ea171S\nia2TU0ZKqgKntcWTUV2CHj/OtlMGLmhx1Bw3vQGmEA4SHvQtFN5ftAI0oKLj\n4slDEtY0aQwQM1Qwzqa0QDcsqFXoDB5j+jSaOByWu1MalAYzXl9n26Rqidng\nYrrLUC3veqlqODe+CKoPC0WNhRgWxSPz70df9YkrZP/X6w+0ttw9uS1p1wih\n+6iFzw4PYhAI/XiNwLqMar8WWSK5vqmgdrESexPTD/d5iLwnjyjX5Lpit3xo\nU87tQzDb30VorbIkW+nndHQ2B48wBC5xSqRw7+4UHkaFZ8+G+FOMYmOZGCSP\nY1BngV71YYhM+aL8CyCshK9IBlwxzCpydlooMA852V3rJh+mtn/Ko5+ge3vR\naezPzDsl5aVO0nvlxXnpMfV57jJAzsDdylSzJuw1A63XfXe3rZIaaDnGF5qQ\nN5bAtaeZ42M/dbeZ6e7uxxU7TMfcqRxYfJ6KrPOhBfzN71cA6aPIbINJFBDn\nT7uC\r\n=FEYF\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"3113ed97faaf98ae397b9bdb76fcaafc84e993ef","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.2-alpha.2+3113ed9","@apollosproject/server-core":"^1.2.2-alpha.2+3113ed9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.1","@apollosproject/apollo-server-env-mock":"^1.2.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.2-alpha.2_1573062257836_0.9887984333379531","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"@apollosproject/data-connector-rock","version":"1.2.2","_id":"@apollosproject/data-connector-rock@1.2.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"b33e1b9379f8f4b21d139f7b37adcee5bc16d6c2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.2.tgz","fileCount":71,"integrity":"sha512-/7iVZozgdLrVY3rCPEQtscnFHiXN+PBzfIRwTec5djXHja9gRKmlXLmAg1t7vaIbiQ8QZzGuh/hKxJoojU3VDQ==","signatures":[{"sig":"MEUCIQCXzPu9v9FAqexZIqkDbc9jzuuidWO1dnTBO1zGPlRVaQIgGh7nMJsk0rullQFXNt487l8DAuYmYjycsDw1qOXG/b8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":787795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwzEhCRA9TVsSAnZWagAAdmIP/31+Yzj2FicStHHf1MSS\nb2A1tYwz9PHYhLme1CYgKwG1zb5IyaNB6bOwoV+UxZJWKkH5G68epjR1KTkm\nWi4KEryRLiYsLou2yhfGW31E+EUlKHb0WNr0bkWS2v8X43bdlunDdIEaWXOG\nL+ViPjQf8faUTtrbyi5XANRQCqm6ah+20BKnjfxeQCj4xBj9xH3Z1czPviIJ\nHjwmkUSSDhYcnSj7BBvqxqBxV1q5WGRd0iF21RAnhbPe4IEvkOAYupzpWHXx\nFfy1WwnwnDXtp6EAiPV2tRh8UCfHm67ABLScPpc4lCEeWyzjKGy3caoBjzxh\n7diUng4mEXpS1f0MJR+ajD6J0Zbhx5HnWeEQV25n+wLm2lH4xgw2HQkKhnft\nD21fgyyiAYjVYXVYU6kA1EX5ZAOb2ORTxsmdLA+3uax0BWTyw3+5dZ5gUuyU\nYHOiWHaz+VePeKQIjtCZmGgeGM+UVMn6341j23Zi1Edu1c9RpRVzFwl03yMT\nmdPWRwTyU8i9XsErZXIPSoHy9abQwxpo8fj/Q6k7+RrZRv7HP6YDswQGAcYi\nJI9keXqaXdpIzwiFLoxmZUUoTDG0Fa5/3/pOctk+jvhIoeMNOa0koM8o1K0F\nnaqK3l4ztNiRdHOp6GRH1wvBns2aFE+um6uS+UHzNOZywZko2JR2Cndh4vml\nrS0x\r\n=KSjw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"406b5c3333a0c04a21352086ba6d3a25b0a879cf","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.2","@apollosproject/server-core":"^1.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.2","@apollosproject/apollo-server-env-mock":"^1.2.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.2_1573073184587_0.913865936896594","host":"s3://npm-registry-packages"}},"1.2.2-alpha.3":{"name":"@apollosproject/data-connector-rock","version":"1.2.2-alpha.3","_id":"@apollosproject/data-connector-rock@1.2.2-alpha.3","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"d324d613852e807da5fe1270f4ad7600f835dea9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.2-alpha.3.tgz","fileCount":71,"integrity":"sha512-fPcQWh9tu11kJ7uDL//+eD9y+UWsLvGApLNvIN+1LH2Lq3iivqmGKburwUKPP3hdSGbPxpG04sxRsMwqrq9NwA==","signatures":[{"sig":"MEQCIHvAgHzGTZGvntTSbwTiwyrmwwmMG67LV9H8BoQVPkkPAiAQfVj2nV4Smx5XVRxgsAN73cDhOMUPHfmmBsmkCNpmCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":787875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxDMXCRA9TVsSAnZWagAAGtgQAJ3geleUDw1/N5erGI5z\nK86dK3cksZ2VLX/aTiMA3m1eiBjIRU2CBKiYT1eL/40Y49FJza2Xb8Nczztz\nwrgbYrEkR9TG73GjsT/rflYUmGpHytcA1Ec8eyzokIeTuA4es+HGw6Fm2vmx\n6YgwBVa1ms7Ez1OBsWKw1M9a3kSoEYYtzneKohM0lPVk1enajCEYJ5s4WfWd\n5hqIXU8EqDdj/Zsukjiqp3EIQYMvln2NgLKRrCBh9Vrs+JALInEy2vKpUP5c\n0GhJA6nNczHrcYpsk+4tY2ImuLEkp3u18NCR80fbre8YU2qa82B/kbEBlJ9A\n6PWdsqjZDqDZdSEkKPrtQLibqIZx5SAdcM9w09LSOEl9i3ml/OKqJeWpAAMM\nNbFS4VA8pKauVfttahs09FmK5P3vQSC82l28zw66iqgCdh5mUnuq3RrhWZ+2\ntz4QEGioud/NJrUrthaQYkkMZSy3lcBHK3ajxXp3sWkcYVVyQeSXELDryGy2\npTCn88J9Ugbk72scYDyUm90Qi05OcQLLOnf/9dS63SOOZ9oVjzmQO0gz932z\n+EJr69EkF0kB5p/wVE0m1IWH/WWx5NGaI9fWAIQbIcJce0gF6E4f0zm8WyuB\nQ6fg0rpSurAMOt9EHX6u+C7aYluNfYjF+lSEd8T+K2K/n8M9J5JR/mk5EoXb\nT+mO\r\n=Bfvq\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"331a84b5a963c5bb171b7788faa202852f98f4b5","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.2-alpha.3+331a84b","@apollosproject/server-core":"^1.2.2-alpha.3+331a84b"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.2-alpha.3+331a84b","@apollosproject/apollo-server-env-mock":"^1.2.2-alpha.3+331a84b"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.2-alpha.3_1573139222830_0.7350721539385425","host":"s3://npm-registry-packages"}},"1.2.3-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"1.2.3-alpha.4","_id":"@apollosproject/data-connector-rock@1.2.3-alpha.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"721a18be60e6292e5185ab42226f0d89ff9293ca","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.3-alpha.4.tgz","fileCount":71,"integrity":"sha512-WkzB37Y1fdTZzlsPEIDgOQiQHwIAEzcUY1J8QUxWrM9MjQuANsOw3e8eoxabgXpwcP98v3WMkfjnLuwvQ1qnOg==","signatures":[{"sig":"MEQCIG9aD3JVGmVVsdriYTjVxrGS89wSpGVJFYLmIXwN/HjxAiAWHsvbjFSHYWraKqCdyfdktmAF0YQrJf7WrQjyx0Txzg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793257,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxHsJCRA9TVsSAnZWagAAVQsQAIoD1+W1b+QtP/NjV/+W\nZo/PowBxAYaqEVswQiivpGi7TYseyGhS5Cq0JwUVz69EAjW0qY/yZ+sySUNP\nNsaglNUtZhiV2zLdSbeiDYIemBOBQczXPoqz9KcniAO28yqz3Zk+hIwPllJP\nxX8aJbZ4etWHAMG590V8DXQZ8+vQmGGgtgu/GHk1Yc8car6E9yo1E+VYaYA+\nokwtNxHhMrxPzFPHCOLRsGVVWSlmLfHB0k+Uh2syshB2x75X0p/AEL0PCtQ/\ncBGmLAUWbEPkes9X0059b7uOueyBOF7/4I73IqZR2H7DtKpXrU2PoSFO/Hk6\n8/aaR7pFeMLigHFqCnQKCQ1okdeBvHG9h1so0Ol2gLYLb2hviiLLLoIIrtyA\nJ6qAbJIrmYolNrGOz5qLeVhwbHynBceLX8kRQiIqS4IfWO6t6grorP15TE9a\nmh95+1uEwe9+GwZ0swLzYqtTBC7sZ/6BlYETlwgWY6dGCMjttgk34rwqTgw2\nu0QqQvb2GvwDoiDwhcriKnkump7b2s/hZenIdXFegzTSm/TezTlP/vxq23xq\n4sLJTlZl8g3G1AKEUi5UPfrOcTrOkBJ862dnzaX9TL47EaAVwHkN+Flsii5K\nKEkyor6hTGaawJP7UbZJ4nJ0BEuf3VLwbC+J1h+J6AwsxcBzmzXyKa/wIZva\nruND\r\n=MMVb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"ca61e557acb717c484ceaeaad9071e51e1945886","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.3-alpha.4+ca61e55","@apollosproject/server-core":"^1.2.3-alpha.4+ca61e55"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.2","@apollosproject/apollo-server-env-mock":"^1.2.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.3-alpha.4_1573157640948_0.5039958068602948","host":"s3://npm-registry-packages"}},"1.2.3":{"name":"@apollosproject/data-connector-rock","version":"1.2.3","_id":"@apollosproject/data-connector-rock@1.2.3","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"147615aec5e49948c3063edf423fe8fe64cd3291","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.3.tgz","fileCount":71,"integrity":"sha512-dEVOEapRroTkeKV86l2OTxNJiEUEaXq0njxB69zWc563pFPAPFS+Izry8o92zE87Ub1uCgHdBrhIoO5/pmtLAg==","signatures":[{"sig":"MEQCIFJlFywemBbJWqPcxVJ24XXb4VU6sb34mtdN83wLzgAeAiBp9781YdJRkBxj4OulHqQSUgShT+Zt/+p+HeaE7UwCiw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyu74CRA9TVsSAnZWagAAwpIP/ieqrAMMgPCV7gXtbNJ+\n9HnFmMfbC8qMm3UduMcTpTYUhoOxIK8kz+fcCFKY3BDokZq6kT/TeNIl1CK1\nF4F+UITY0E/p8tZCM+I5aM/PuQsC7/f+iQXyxzbvFcKrFJF1zg0brca3GSgY\nZS16RTcvSF7/vWKp6iKrxfc3Y2PeYQhsd1r0cynsPrRMP0n4IfBZdhaepuca\nGE3xuPViGHUjH3hpzC5BCQhZNFYIfkxF/vNeECwARA3uPGvnd9y6ALwdnMhZ\nJo4PHuEdunhXpAIn8LwnJ+xbuRbqUYxKFH+3rM+kVI9CFBdMBKoS+dvbpdBw\nrhuqS55uE3vQCuGPASqQR6iOYr6k49kHME6DO58QWAyg1XRDg0HGuOhG5gXT\nVJirZiQykbow3FG8zFYLuxbnRxb5RwzKU1PxlqpzKY2eTxIZo7i9QY4DGlQC\nNZJLxG9lfk7hwp+7eHHyKq9Or/fFOTnxmKFWtXU6TJyWimY6LcAXGguVk/Zb\nKFZA+aMiDNCs1sa88YpiEq7Vlk5fmwCMp1AcJbDTa2E/Dy0zthEIIyx42FPU\nVjyonzhjWY4dl8p/pmTCktF32v5ENUS2WD9C3OX7AYaJPNzqwTWGIREmaxWn\nHCps3LEX0SYDMsRIpWshWpAvdOgCYwX/75arSoVt5cGKFzW1FEC+QmsozLuj\nTEdn\r\n=qhyp\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"9138069e8c05dfcf14843be0ca294f34ee3deaaf","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.3","@apollosproject/server-core":"^1.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.3","@apollosproject/apollo-server-env-mock":"^1.2.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.3_1573580536304_0.156815340744606","host":"s3://npm-registry-packages"}},"1.2.3-alpha.10":{"name":"@apollosproject/data-connector-rock","version":"1.2.3-alpha.10","_id":"@apollosproject/data-connector-rock@1.2.3-alpha.10","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"4739699cd5a84af3ee0c89a5d9e13069c7366fe5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.3-alpha.10.tgz","fileCount":71,"integrity":"sha512-7o9XfY0LgGCeNaCiBCtSaRzO9GU3ax2HlTNLSSYeP1SWg2e3iJ1z+hZu0fIWNNfj607iAHOosraTVuH/sZXODQ==","signatures":[{"sig":"MEUCIQDJIs3ehDaiHw17eTFz07nTPItWJT1dOCxqUotx76pbaAIgItm/uWE7Von8vS0DQX+9LXvgpNxw13+A4PItYhDftwc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdywHaCRA9TVsSAnZWagAA4wcQAKP+nPAkCFKnatGq0e6H\njLONRz7owbzwP/24xhl0uQveJ0vbQTl60U/DZEgR1bOWRYDcdrMqFYf+Kso6\n56WPc2D7e22KFyBvaryr5ees8Di5WE37EYg5g2cS5gOdXeQkd68iQICYPkGJ\nAmkflU9Cz4oZAtLVp544zQDDjPV5NPVi1L2V3JX/ORHn3ZltKr919LfayJTK\nacPqxd37qsZ91pOlRFS/OcqEw8oRDpGUIMq6O7yHpgM/ah2DOqqxibFKyFBA\nufEKgNlNB5DOst9Ag1zBJ/ENGF0A0OLoUbYsNKcP9XVv5Y931Sa1YnEi3+JP\nL673bzAIGqadFhHbVCVMvVNSecYxVNYmIGEsNkbqINkAMeWuhDEkz5GER9Je\ncoTk7o36EeLy1oxfMSnKcKBWx073UfhBHQWPhlkVGU3hlQSO3hDP/YklVxSB\nzLOQTSXbhPoC7GIliYloc7ZMHqonjH5QR5O5D97mocDuvUgbF3eheiT/kqK9\n3E/rTWkMidPL/FzMWx3m7AdISvW93gD+0wPJv2MrYuqYE/k/PM357G0GxH0x\nxwwRFll0pfVNyRwFAppv43u2FDcUgEjp9HvS0dmU0I6iDSuhPakYXmbhABQa\njhpbR/efeX+vRvhlHjmmSXj21zQTo5XLhQVrRwdaA6FgaGyp2E48z+6oasEe\nkKuY\r\n=3/XD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"a67149ccd0c61f6ebc6471afc1fc7daf19791491","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.3-alpha.10+a67149c","@apollosproject/server-core":"^1.2.3-alpha.10+a67149c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.3-alpha.10+a67149c","@apollosproject/apollo-server-env-mock":"^1.2.3-alpha.10+a67149c"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.3-alpha.10_1573585370157_0.4239537924278636","host":"s3://npm-registry-packages"}},"1.2.4-alpha.0":{"name":"@apollosproject/data-connector-rock","version":"1.2.4-alpha.0","_id":"@apollosproject/data-connector-rock@1.2.4-alpha.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"aa9753cebf69a43e486fe1add844e696e526a071","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.4-alpha.0.tgz","fileCount":71,"integrity":"sha512-y9YggDS42zpG3w0cUVgEX9pDBPpuHIzNitUdVk6LWlKcRdAuuPEBtuaLUh1x+PwL72vChWzfg0SdWbV9FsqPQg==","signatures":[{"sig":"MEUCIHilwKM2G7hrQpiHZA7p7/wdi6i/hE9GhjsEISTGxV7HAiEAvqoUXmfi1LWzvHauZQ56MiOx94RFtqXi5LLZ1WFslEM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":793918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzfwJCRA9TVsSAnZWagAARDUQAJweMmJe323Spd2lX0CI\nV6Evk+tBYIqMSFvDUQS8QW3Fgs0hfBbQ4RZBxXiyhTP8jQ5bnEA9r5CSd/fh\njp0zaRabjzYKp4EicZO0OlW9LVLXlX2zKZsK0aan7tDSX/S/ea9Uf+qkyIpQ\nrFWIcYY9uUDBv9LGEDhxv3VScxdmkP80xQQVK22+bDtB+ANeRoOelTPOpDuW\nkAGmCHzLIyjW/khDk0kU6Q51ZfQGYJ2f71Je+PSOX4qRoLhj1AcVzSeQzZZN\nIwFozM+ETaEkNYGRTnMIhIGfXfxAjg4+F1mKTWOSM5FKgjHAaR2I9weWXHsO\nXQGJCb8gJqZ4BHr/1OZUXdOMQ1jPOaMqEzwWJLOawFVnYqMqu5GVqMMU7WYZ\nmqoTO5jxCK4laDp+jXLLifKQEDXBR/tP9HYdpbbt2NBVbuW2p7aG+tXe3GTo\nx2sBqOzTh/eKcaTN4NunkF75bX9Z3583PnUVFOKAXB58ftPtY6vuf/MCdWfc\nlWudqlWytpgKV9hIKQqwI96czFN0RydBOMtBPoUbfshfjl9KpTWDEII5ZGGf\n7cUH4xs6FJMK5ZRmH5dN4Kk1zSXUQfdJZagjlaUnYCvy/60w7yJ2Vh+DWNFV\nH5JZwietF/Am+PlJKn9EybgsVkH52HEotMBmG4TIOiBnMBT14cjhROEkDTQb\nFsm9\r\n=GR09\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"c879eb14a882afd5761c1c8f834fafab609de40b","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.3","@apollosproject/server-core":"^1.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.3","@apollosproject/apollo-server-env-mock":"^1.2.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.4-alpha.0_1573780488958_0.8743593601331843","host":"s3://npm-registry-packages"}},"1.2.4-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"1.2.4-alpha.4","_id":"@apollosproject/data-connector-rock@1.2.4-alpha.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"475853008654ccc115b0380b7f598f6bb7f2145e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.4-alpha.4.tgz","fileCount":71,"integrity":"sha512-ZzoIlCTYTxSP32VZWsbEiFTptIcbT7K8YSRDocTdQBNECSZKEsij7wxQ52BN6PvEWqlBREfw0ZfJgLZI6kBSKg==","signatures":[{"sig":"MEUCIBV2dFWP2A6qg4Npvj1Yg7wmtbZE8McqVY8VF+MLmkuGAiEAq0jBfpy/3ozrTShXnYXo/yBg45P3sXh/FkcMp0Lef00=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":795205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wIbCRA9TVsSAnZWagAAxuQP/iVqd4BCVuDKkdeAgTr9\nKUuWR29He4ixABddASfsgbRHCIihFgiLlb3a8EUZ2qY6dviMSRQ+AADD+mPB\ncTPVk7K1K/GZrgXSiaQTnSX5o2I6OVqmXCnhts3uZ+rYcdNHOAnEsMDQdQCt\nXPNn1UxMxxVb/fnBlxYu4w+D3dY1bgu+cGcPokoIEvXAMdBcXqbEHZbn2dVa\ncH3m6c4eEnbQcTqPzzsldftiouKuYmSzuNftvxzgG89N/kV6WRgIYj7WYLSN\nTaAJCF1b+DYZ5naxlWElxLn7F86/oKM51PAh4GH4Y5pQejKpXhz66lxzNIIm\nMllKl4SbQB2H4KG4UWvqN6ZM+3el0s10d3hFBpliG54apVFSiQ/p/zs5Yx4H\nk0VnVZGoor/p7MMHviaPFXr2r17U0/qfrEc28NtOHCaiIRDO82EdHByklxCC\nCkp/Ntn783h6hyJ3Ot+Y0whNYCFwsE6GVmriANNXabDe88uZ9mzdVbrPHO1/\nZ3pGCMNOWQakvjZ5WrlgALEYWcmrj765cqzO2C6Iw0T64xSteVJ7Cerw0Zag\nAKz44HX8IGzGr+r+42cGAZxQ9u8rS0r50wXTweQITLJLN6JAjkCfPVRtvlC3\n+Z3SKi6cngwQCQk47AmUUFXBa1eKo0dZYRWGrueIVXHydaQrKG07yvuWQkeS\nDL6j\r\n=SsFW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"eabc622f3275c4c64761ee83b253bd0b39c44f52","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.3","@apollosproject/server-core":"^1.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.3","@apollosproject/apollo-server-env-mock":"^1.2.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.4-alpha.4_1574109722739_0.08590983336887614","host":"s3://npm-registry-packages"}},"1.2.4-alpha.5":{"name":"@apollosproject/data-connector-rock","version":"1.2.4-alpha.5","_id":"@apollosproject/data-connector-rock@1.2.4-alpha.5","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"835be2ba7a4c983e213e0e366b07f40c91be6a91","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.4-alpha.5.tgz","fileCount":71,"integrity":"sha512-6ZMPVFlkxz4c4m9hZY+bCsMyjOZlv6/lROK2Exvn2oMTXSzD99l6x+/8aG8E8YffjPLOTFTwwNh7Mb6CBUPxmw==","signatures":[{"sig":"MEUCIQCH9yZwxnS1lG+f+xbsXa9WcRRpznsJhkGOG4kEJk8HHwIgSBYfgra+YBu4x4Gk7bk7D+WRcf1ORXobSQfc7KmXoaY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":795237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wyaCRA9TVsSAnZWagAALHkP/ikW4l193eJEoss+l2+3\n6Y5fA24EytOUuJRGP9fcKIliV+F4/s5c6orBSKA/G3GAiPrwijLxIyThCmuk\nxWpFrACSnZi8vEHqgis4jeyNk5pHH1JihaWCBxBe6ncGgohsrISKbYKiP2BR\ncG8u18f/mwKkfQfMwLFf+/C6QaIwS3GftBu0dJFq0yI4cBwqDYDE+aaZ7cWI\nCvLiSqCwImFhV73prFGfIQSVRTHBHUeUiRG+2OcqJsPJ1mwpAAbG/SN3Nma3\nuLFX1CgLG9qCa3Li10LIVrvjjlwczKhU8lFaEs5MykDF4M/9AQ5sSXzO0aZd\nngjuR3SdH6CwLvJwjzZuXIvDi0TizX1zLnqomQJV687eg2PZUYqZSzL+4erf\ncRfKAwgh+7WM8OoSW6Pf+uZzknvtdsnemItVS0kQu3PfAiqRZRsBHjE3++t3\nLfYur+SY7R6u1WxtuTO9/n3mw/Y+1CXs0vq2Urj0xHeAcTriDwN4qyY5jY0R\noTOi9M0aETBvXe1ToQKoqwFNIwTs/9MuF10QBw18jUFKdTqxSwUtceJBw7NT\n9yN2mI9N7wSHtmxRThfAABXrwW9YZoH54LT/w6an2nop1c+DBLSPScLxMyKP\n+xGbzv3QnBieJ+pmbfhMmbhVwiG93vdnhms7GJ3pTLO7y+nmuTlDcRUVy4cN\n/sfv\r\n=nrjl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"97bd8d6c9552df21596e9a9243bd2d2db5209d73","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.4-alpha.5+97bd8d6","@apollosproject/server-core":"^1.2.4-alpha.5+97bd8d6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.3","@apollosproject/apollo-server-env-mock":"^1.2.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.4-alpha.5_1574112408272_0.472241434120517","host":"s3://npm-registry-packages"}},"1.2.4-alpha.6":{"name":"@apollosproject/data-connector-rock","version":"1.2.4-alpha.6","_id":"@apollosproject/data-connector-rock@1.2.4-alpha.6","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"d0c2a7fea0cc5fcb5f04fb9decddaf9701fbad7c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.4-alpha.6.tgz","fileCount":71,"integrity":"sha512-3JLu/dE/289cplM/rCumxcuLzza+b7e69UMpQICul7VMsdsjzdicmkjW0l1mVxn4XwojzYbU/ix22C/GY178XQ==","signatures":[{"sig":"MEQCID8JQm5SSrDriA6ZD/6wjkks3pPGNCCKiBZLXLAx+fhvAiBgFJClxJBb/xBJoJCBRR9nJ9P6CaL00mKVlwFqt1MtpA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":795511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0xXiCRA9TVsSAnZWagAAGaYQAI1Uxz7IFF9m2Ay45PNh\nPOCgHLpTd4lqIuPc6DPVbtfDHBePCklf7cT64cejZvG0b+OlDfNAfDpXbmy7\nhb9uMf1HxSkpPIhXVeBrVMHyzYfwGugLCvF5LshO5ZQi7NwaWmiqZrI2o3VP\nE0XtKPBeUWwKND9pxA9qf/T0r1OuqiHtQBKJU+9KDUC5OKqMnmxav0i++l9Z\nOC9tcNb4qML8wmd8crCNkYymTNBKpG9AOP/yPK0ne9xCpF72+3BEnNOqpYrP\nQSlWIqTeUoAzOovZ4gk7rpNFfpfqUTsO3PxsRg8FgIQKyHpC7XemM97WUT0s\nVBnU86kJh+Y+sYENBBkPSjvsWpYMaZJKr/E3m9ii4BDl7VEwIXO1EdYeur4Z\nmOCO/ZSGWLbq84WixlPVBcicS8MB65r/7dV6BSOttDrfWtQ1InP4KfQ422Q3\nwd5TjCnw1kO2fdkJqF7fHbSC+3Efq8GcRqndr67M6yNTODdUYZ9Y4P32Cny8\n+X4XCpaFG2Jd7KIFdLA2liJqpnZfbsBKtHuApxolTS0jXw+TrznFmf4FlSd+\nbHlMz63Ll1OKQVvOXej8rtB4bUHbv3nnUlnKzKBBIanLq5lcVTrONOC67kHK\n9FhuqoAS7grFUuGtG6IzJM07l18eVkwYhjO2IlTIHmrag96QSEieu2B9GL9Y\ndB4l\r\n=6vnt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"reporters":["<rootDir>/../../scripts/fingers-crossed-reporter.js"],"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"f9422a1a00501e8a5ecced24e6ad37c96b9b4329","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.4-alpha.6+f9422a1","@apollosproject/server-core":"^1.2.4-alpha.6+f9422a1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.3","@apollosproject/apollo-server-env-mock":"^1.2.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.4-alpha.6_1574114786457_0.3105425940073834","host":"s3://npm-registry-packages"}},"1.2.4-alpha.11":{"name":"@apollosproject/data-connector-rock","version":"1.2.4-alpha.11","_id":"@apollosproject/data-connector-rock@1.2.4-alpha.11","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"2559c4bc6fca1bbd9c1411664512c41b725413ab","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.4-alpha.11.tgz","fileCount":71,"integrity":"sha512-HTRHAerPi3qu7KNydH4NcxbK7lkJCfIMwPZzupQVbRMjNEUcP5T0qLdMrYfQmlXMa+8NA+EXyh6aW8R5oo1tDg==","signatures":[{"sig":"MEUCIDVHanmRYh8bVFyAqo87JF81t+9pawlreMGD/By4B8dFAiEAhnD5ieI0mDJqkGNPei+RjDlk49Pl2gcx1JRdMauX47I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":798959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1KMTCRA9TVsSAnZWagAAL4IP/0A+Msyu2t8E2f5/DMBW\nhzEBNcBc28jVW+RLfKeaD+KTf6G5z1+wQb4hHRz9EDFXrJJS8AMxgccUQXUB\nHnYAk4trD+F7DyZX/kwuLOnK3sCu+yWl+keDi+0JY3GQzMXIgCEhP8fDf6iU\n9cX1DcEwic2nm9SauGUSwL/eDmFoDgOxIjWj4uB/NhjRIOnWzEUU2WoTykn8\nTpRWqAh8vGMvJ5QdzZ3PACRP/oIJEi+9eeiivlzDHqU7UwZjijrkds272efr\nUVowpRkehlsjX/xDGdvd79pCdxRUB3m4nNaTNmtH+6DxnZJSDhn2QGPX/e25\ni9IsZcA9gWd+6tdMDhj7ESojfM3XEHK72WS1PaSd5jd/Gq18pXwALa5BjVR3\nZIxQRG4Yl0FO4vKTGBRtkBq14hf122fp3f58FwgIV/gX/yM1yHNSy0pjAiUr\nzkURKqyLon4s2FT6DEZHjL5GVYEzSh2djBsCUu84UClNQuaaUv7G+Q06qwpc\nfB/uIwBBwkhTtqvnDVayDbfO+fsjfCJY+KSfOlllbtffGNDgp43GNd880Nta\nR2QomFGr6W7VJ3f1JeCodbtb6mC5Wc+9QbKEom14aA3if6D1jAEcjeiIvD96\nrEDP2GZiYqUDVESxVn0kVDX5gq4UK0OrjPT7yT2UwlQpX0NBAkhHtnzjVJVo\n1VKW\r\n=ClFx\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"eaeb382422210c7ec61fe9caa512499a780c3e16","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.3","@apollosproject/server-core":"^1.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.3","@apollosproject/apollo-server-env-mock":"^1.2.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.4-alpha.11_1574216467222_0.3640121723719447","host":"s3://npm-registry-packages"}},"1.2.4-alpha.13":{"name":"@apollosproject/data-connector-rock","version":"1.2.4-alpha.13","_id":"@apollosproject/data-connector-rock@1.2.4-alpha.13","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"54f070aeefd4580c24552162b1c574acdd36aa83","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.4-alpha.13.tgz","fileCount":71,"integrity":"sha512-UwS7Lb5SCPu/S0oCfV0sWXgBNHfn/uisGynPZftDQpfzo5mGLzLQ4tRi0vPwhJCkGbAkyKQG9G0Jb92cjI6jAw==","signatures":[{"sig":"MEUCICPP8M9pztVktT/FF5hPSHi+0oRLIjjQfQtwnPB2mEo0AiEA1Z6vXpM7JPZlFVhtpRqtF7zWyfl8NUEq+erEgea46ls=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":798993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1YGHCRA9TVsSAnZWagAApB8P/A2cXoDqW94wnB/cwvBV\nA6gsI7G/SYY9zbUG8E38gI7FkA3fkJiFIRSKnbUDOKpEis5GRqG3/4CdC6Mq\nbWLEexhQP3Ceq5kzbHwgp7Qg0+SfOmFoEplYltrsO5O1h6ZNAFfL5OwBHCwT\nSmyaLIr0T3Top8AOPRXEieEteKwdaHThjeoDQ0ZqvWY0EmgmrkN85oWUQDcs\n8Oru5TeV1nEWa3+T9jmZvO7fXBoywWG6tvnsx3yW6Nc3Lv5T4TCDWJ530XMC\nJWj7nW722WeipOSnDnh3h81XoHlUYtdeM/KoYTJ4pv6z7r1QZ4G0TCgoiDX+\nq5n2EpXrijD0Mc5JzYvcMYsONlSKR6p5hZIQ6KaKb3heZ4mQ1cGIornWQvHl\nlvS1razQuB4eYmuRsh2kM6VMl+3QUSmmeyzmMXqIyFwc/2v73KreIORUHYd1\nBPw0XPjQV1WsebAeIJrrQh/iBIKlYceWadjg/+GskqhJ3GtSVsr2k2Pb46Cs\nfD7RvvJN6fuDnkJDjKCVHw6v0hsTq+pNFB4s/H8sXup9DalHloNLkacIg/aX\n9f5matnCkE1BN1YucmwvpEYojFBtBY2JxutJbo2Jc3WIlIfrkNaPxl5mjIgg\nnDCJXRzVv0eXtHZIIPdflM+i/mkTLJbNK7wz3pX1Uej2ISYStnPdktw+cC4l\nobyd\r\n=ivXg\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"21f1d6cf97c5cb1f0132b34ebc977a6c69667f83","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.4-alpha.13+21f1d6c","@apollosproject/server-core":"^1.2.4-alpha.13+21f1d6c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.3","@apollosproject/apollo-server-env-mock":"^1.2.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.4-alpha.13_1574273415393_0.9723063344391112","host":"s3://npm-registry-packages"}},"1.2.4":{"name":"@apollosproject/data-connector-rock","version":"1.2.4","_id":"@apollosproject/data-connector-rock@1.2.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"a7a4f1a50331c8e0ce70d99d46f6ed204cea4aa0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.4.tgz","fileCount":71,"integrity":"sha512-YkNNRdXsf4vxq70G8xhbgQEdgaGnsHwedRBfnjzvZbYyTA0zX5jKzez4vnbg5jB3Qrik1nMPShShOvUM1DZWaA==","signatures":[{"sig":"MEQCIEVMMLBvcD2PlhHpuHGkH7oPJmr7VhWF8ZN5XdvktT+cAiANOikWN2b0/HwN+FvoC4Jup0VzyqXw5K53Fpw4Q/iUug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":798942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1cVQCRA9TVsSAnZWagAA0rcP/2/duuA2q7sBZ8ZsA/Sv\nPdLu/QB/KSvp38RDQri8ax2qLOivseXKLWgNmDj9DAldhhy+kNU3t3lFPu1v\nIP48x+iUm78YCWTxDe581RTGhzTdCzDXpXmLOHtN0KXCP8jXZWx9WZf9vDLS\naisRrB/57BCQY+qgbMbv6hWVwfIMJ2y0WyIG5VxF2efR4A1OVAbni9Qv5nqU\noKagWWCROvQwHRGd1jRFCdx8gFH5vyM9i8vmN2YVkeHNl22AAPSOVTIWbptV\n+XBG3w1YaI0VzkDyj0t5NeHKNHGBhGPP4ObgXeDkdgXCNkqwdcZI6WpbDrNH\nN0g2vrZ28pJD1WzYTO0OxTrC0ppHiA2hrl5v4enooQ4syTR5dYZ0RPPMhicL\nOTF5OTb6gcmeg8P9gpLa0m6gXMh59ofow0tRzD7nQ9tlWMkCy3u7oRu8OQOB\nOOmuuX69bMAm0dbGGNsiTWwsMGxCTot9Qen2NZbPkOoYw3hQb6VCh8bJ1Kht\ntfuotGG2ZEhCFqQdjR6rEve0iryDv8+sWxGqpigDpmpPaFZDvwFjfgCdzY29\nCCKorbQAiAGNDNMzulE0S1Ba+6RuxlCul8TgSadBSnPNi07p4RDedoTnEyy1\n03DEoFk3DxjnTOyc1cMA0EsCq0uJpZP7bvbqqvvNGzA0L9yWDkbCEWpPCrL0\nfmmf\r\n=baiX\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"1e867364d2451db921c3716de268431ae7783e90","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.4","@apollosproject/server-core":"^1.2.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.4","@apollosproject/apollo-server-env-mock":"^1.2.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.4_1574290768144_0.33940787184946153","host":"s3://npm-registry-packages"}},"1.2.4-alpha.18":{"name":"@apollosproject/data-connector-rock","version":"1.2.4-alpha.18","_id":"@apollosproject/data-connector-rock@1.2.4-alpha.18","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"30225db0ea85eedfbdb636e8ad6c803a53eaa8a2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.4-alpha.18.tgz","fileCount":71,"integrity":"sha512-E25OkzPMxaXhoCF+bQgao36u3e0mbHhC+N1vrglBS+9eSXlX/QCETs7lABfpJXQMVhf7NtSfBs9DBTx8gv397Q==","signatures":[{"sig":"MEYCIQDB0dL6PVgIlaLZEczq4vMXgpj+vTGctUP3gvZdLdl2DgIhAI5RH82gT2QUg0Gyr+dyxy+2G2dusbNcEy7pRoYDzrAD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":799027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1dw2CRA9TVsSAnZWagAAK5kP/jUGRS045pdEGnwPpKw3\n12CvEwu35OosD11oZmK5qdQcOEbgMLdt7ZsClVTDhs/AAxm94ca8f8bfxoX/\n9e4v5Mv0DZiS5boTjWOCKHw+nmMj4S4cM2ZzX6I9j861+bqKBUN/09GdyeUT\nJqN78fKf5qq4qEf0hj2NiN6f3LoxmflhgZe6g/l/9yvV3RYihs2+21yexp54\nadMXOLQQmRfazlXyaUl+iIZ1bZYLgyugUUmtws8KF5cazJB+s0uUeXE8OWdT\nE2z6sypfu9flfe1y8B48MtRHD+BR/e33qGr8GxwlDxFil7vW/1fBNvf6AXTY\nNnlseQBNBmq/Hrb4A0YuTdiQKSP0PlKKYi3UoJSDVJEWWIIaKxtG4NQs0mVb\narqPcwHFpFivdZIAIuzpya+e5cxcraAkGiLd1iq/1r89hpKWjn1ceXZFF91F\np+Covjtqj+x2d1tFA+xcrEbCqbnQsbvknsPQtwjm289wMyomew1A0KFZ3az5\nWJLU1NgGC9TZuZwZyk/0y4NCzsxeGc9MGxjIy6kMQoPY/SOUn+kNrbXCtWfS\n0GbEqDeI1PIrFqNaTnkmZefYnhyjHOHRSLi/jRxTVS7BtQk4/RKLGy/zacCl\nGEZID04Xf0evaukEA/ZwjnMu+q+bpt4yfwvB0a/s/HPJn4+Mjoyyu6E2FVlG\n2m4f\r\n=3pOt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"5cb2cf33fd88afc707c4515547a2d1dbf45faa98","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.4-alpha.18+5cb2cf3","@apollosproject/server-core":"^1.2.4-alpha.18+5cb2cf3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.4-alpha.18+5cb2cf3","@apollosproject/apollo-server-env-mock":"^1.2.4-alpha.18+5cb2cf3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.4-alpha.18_1574296629658_0.3606022646552607","host":"s3://npm-registry-packages"}},"1.2.5-alpha.1":{"name":"@apollosproject/data-connector-rock","version":"1.2.5-alpha.1","_id":"@apollosproject/data-connector-rock@1.2.5-alpha.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"effb1a0a9f6a80dc53a10ab9e53ed36e89ec26e6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.5-alpha.1.tgz","fileCount":71,"integrity":"sha512-CLPlawP5ZPiy7SXkE9uQeojvpCvT0/XZSlbRQgQzWDbzgQQBWprJ+abnoI49r52xv/0mfhfg5fVNHSC6oTLnFA==","signatures":[{"sig":"MEQCIFyRRgORZ37faOykDK1XA0yrIszfuo1eF5v5fOUSV31iAiBKmxu4aR8oOc6YyL8ulLLy+BBK5JADX7BQxyOoV63UlQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":801293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5W0VCRA9TVsSAnZWagAAjWIQAJYtbRJAp2pls61zoBnw\nUljfgqRtNqcbWfxA2q/DbF2hm0PuayQBKuocN9ovvVv25eZbGlOPMsi9O2IK\nicl7QekaqXvJy2sJSfDB8jXSSoZEpIggZ0kxOxA+TzHiPdYH20FxvQAhZ6lM\nMMEAZWGua4yS2ASAqskcApPekHuzPlwVGcn2w1O+LD6khBCH7zefv2l+z7rH\nQSG8IJWBV/bzTsqB1Z1EQZH7WjSdrS9xkhEbmczM5dEzURS8CArYSrWHcwll\nSEZAkf7T/vzZdAds9cQou//WGfyBZwt8Rix3O7vQCG5Hugujj6lQGdbMEjXJ\n3tLdwvaKFN2EJRsYSdMNfo5LfuzSxAW5vvux9qjSDO3LGpeH+OM+xbcVvUDg\nTAHjJzQEXJInke4z3hTun7R0BcRa1ldEs38MRXifbM50VNWuXgq9z1kQoO8+\njTzkuMa6jV+syMkBU25sbRPgxNXk8cvAW0TMj+F1lx/RKsSdecOzz3tk6iGq\nNuCACz4bXK92ulT8hCHhsdr/UDA5AMt0zjLSjcdZOq5H3KNxYScIW4Hf/+MR\n8EcQGk18iuAA2TZqJrNv0M30QEeMYIMdRR9DndOQgEFdYKKCLNldUJDTBiSQ\n+f95coCauHbvPxbZRc4PPtZd5GAFF/7JEmRMr/A7dQZL4ESTpwIT2HzfX+6l\n+ZmO\r\n=ylLo\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"7055e938048e69ebe16d475dde7d57eeb4f930ff","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.4","@apollosproject/server-core":"^1.2.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.4","@apollosproject/apollo-server-env-mock":"^1.2.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.5-alpha.1_1575316757200_0.5853694640717142","host":"s3://npm-registry-packages"}},"1.2.5-alpha.2":{"name":"@apollosproject/data-connector-rock","version":"1.2.5-alpha.2","_id":"@apollosproject/data-connector-rock@1.2.5-alpha.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"03a23b112d6b7e28a7ef10f3834c91f780117dd5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.5-alpha.2.tgz","fileCount":71,"integrity":"sha512-B5OkZNnaGR2qCHlG5P27JHRZOvnmDZ84cOAAMPWfuuknztvRueiVzIMwy09G+dKyd9VLwyg//kKgZwERzc7rRQ==","signatures":[{"sig":"MEUCIQCb/O40l6ErSH/C6LgG+seYfl+A7TYPAPj7Dik0bVFrEwIgXny68gIJxpZ+RHAfzMnB4UEVcqF+RwAPMSIRT+z5aEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":801500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5nbPCRA9TVsSAnZWagAALMMQAJlAvQPdg8MeX1rWKHSZ\nrf5/QICF9GZZ6fRnHQmMu9Emgvzc59GmvWK3L4DvyTq7QWoO75dkyu3BFysq\ncqXBsCwagAOzqpSvyC6tdLHRbYehVeLiarULswPC2Q6TlodJGTeqZxnVhTtH\n5XE5DcCZezrNc3Ua3Lwv8veSxzn5Tuc4455YnmaI5GqmLcW3uG5eS2CYnlAh\nOvYrDLw5p+hYn/RnWXjEqnaSS8eSnEpHblaLYSXhvNnhSODJmLRUvmc79nTg\nvSxtm9jORgykrWYt0Gw+CfNSONEUSHJVrXxEDGZsF4SfNzScYO6aR2kvHUgL\nf9azFMClYvU3Pl8bZ7QxQaD1f42zHsD2kizBzQSQGiVH27/4Z/U07DovXHWz\nATXRYRi14nv9VqPobBi9Ov8TSAG+MF6tAjGoKNQddf7IJNTozG4g1NafPTKd\nY4Ln9FhcsiyimQoVOaGqf8CeRWA0IN5bQDvvI40KUuXtIZbfSNepO3x4l3E3\nB+ZkxPpKyjcArKp8MhXEJ5yPRCoEOspJKKFBWqSE39lGs/pkSVTY5h3tuK3C\njW+AKEAFSS/bcFoeloMkLRb+hJLIOg6Jo08gjPbZ93TniPg8wKNoTTkY9XcM\nw1z1hY2RP1R8aGgLQKX5hEV1hpNaItmOaVvrihsocf3O5goOJMk3+OkvXApz\ngjCv\r\n=ZlNx\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"d45890da909d1b81a6145abe1b811290beb752af","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.4","@apollosproject/server-core":"^1.2.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.4","@apollosproject/apollo-server-env-mock":"^1.2.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.5-alpha.2_1575384782754_0.6577250898056834","host":"s3://npm-registry-packages"}},"1.2.5-alpha.9":{"name":"@apollosproject/data-connector-rock","version":"1.2.5-alpha.9","_id":"@apollosproject/data-connector-rock@1.2.5-alpha.9","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"c3b3a6a62a6285ec22d497a8ad0b86b2db8d8005","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.5-alpha.9.tgz","fileCount":71,"integrity":"sha512-LJi2Od2pucE4SmFdybs9AUTuM26kU+x8AWOVqlkztLkpdb6y9rO4N8G+BEc0f72F8TGh2S/B2TY4qqX6PPsKfw==","signatures":[{"sig":"MEQCIBLb5ruJraMswLZXf0s9cfbCHXR6z5Wu+zWWpxSkiNkyAiAdfn0JvCCnT3vxDpNFWvHVuGNaNsK2mmUod4li93P0RQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":801516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6rKpCRA9TVsSAnZWagAAZ9sQAJgErc1KJRnb6/vrURDf\ntYTQ3HrPBcexJa3nxAhMkf/MH0e3RuRZ6xeEgqatxJg1PyfH0G4HUnq1rFZS\nhrzn9yKdO8V0ksiQtM52DXGYV+atBrx5T9idRM6opyKVpIis4aZ2XIcKS4Hg\nWdmoAVTkE6xIX/gL1129RLMEhFFsqeYENDYT2yRQrP+iHVCU49SMeB7lG24F\nM5Tk9ZqiGwe/yi3Uru1LC9k7V8N+DegxicFm6wpIznzHc8B4GW0/bzYDS2KT\n1SApsSsJioh+pc6htuQ1Iw6s5SMkAUnnSRGZzbpX0/gmD6xvfNtuxwEqPgHS\nXkF/4Jmgc95QQmy7DhHfPs31ayEVuGzEDth10hnxy/cC1UhNkn70mtl0OvSB\nnuIFL0TcYWYLNgD68v469YQzZpbO6qsf3SMu+ChiEXmeQaAH62gQwuVaGzkS\ncvbSKKQZ1UODPMIlT1rGw7FpJVOxKWTLQGIvEav+xI+xVjbfuySoj6JDgVYy\nL3lYySr0+4JlJnYHwesHEAQiXO6exD5dnXm6q50D5nOehWMvIxr0UPGjyjG7\ngNY1mNymBL0fdGs5lcXabY7thGslNDRuSEWUYoxhyyXhGGSl0PivGPU+8PxG\n9IsLpY3bCgC2oSZCk/XLndFmxywqITOR+Kz7PddQi7xNMVMWsiiGNB5PKbPk\nyP2x\r\n=I+qw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"db32b636950a89e55f47f12aba1c315146fbd0cf","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.4","@apollosproject/server-core":"^1.2.5-alpha.9+db32b63"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.4","@apollosproject/apollo-server-env-mock":"^1.2.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.5-alpha.9_1575662248904_0.7468380420254974","host":"s3://npm-registry-packages"}},"1.2.5":{"name":"@apollosproject/data-connector-rock","version":"1.2.5","_id":"@apollosproject/data-connector-rock@1.2.5","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"5d805040a60cb9e2720cf8ad1d7149703a7978ea","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.5.tgz","fileCount":71,"integrity":"sha512-q99cpeXxLtZ2Yuoj/qTJYMskRaUXBS2CePAzpCuJ/Pz/DS9omcNjPJ2KJkHNBpn8Dx7Y+3UcfYPeKzcwgTbJWQ==","signatures":[{"sig":"MEUCIQC28MRHrJZe/N0iKxYrezNaj1Wvpeb+r7LhooWUgaTm3AIgGWhD21uYOrlwd/YQvP8waWoVXs+McBtKe2jGIXyFihs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":801484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7++yCRA9TVsSAnZWagAAmxMQAJ6NW3JSssrGEQPHqORx\no1iP7huOGsD8WksaYiFkp1WhUVayI00xdn3GuyRmVFa/2SdaL4BmKcdXbc4T\nWTRN351xP9CXeIvkXtTFAjaMAk/y7TnRrzC8wbzIfsareMt6KkQXijG5z7+9\nWMuKLudd8F3WD8TZ+IZMUH8QJLiD0+F5N4b0C60FLqxwpj9bt7QWWvswC6Pd\nKkhg3oiHtkLd3eAd8pyhmsWQKG9zkTQxhSaSXNEeFayzSFQdsPAZczbzMCMM\nVX7N+4JsBtpo5cvGzVch5f1ORKE/qvHiLYm9lYrAAYGopMdeYctwtXbcBXF4\nFXG0AvMKXzflvIPZFbXD+cYPismlXQfR9IBbXg8b9HTaDMhkR48xVeMgo6ME\nnra7BNqfTc0o9PcM+n7lw/+zTywPVejdWTTIwXQpT4H19brAULYJsCYxPw1w\nGEtKxDhggbaDyLcaMEj6igjdvfKkUu6o9hNDXcLfs/OHNUcF4aNIMvskU1JN\nL5/I8m4hKh40SCvyBEWW3dJiOOxZv0gXrMebtZE4UsdHmnJI6zyorXWqLgj6\ny9kL9eskHvlR5D/3jt9Brq5Lzkvp+YFutRB1HVemxykw1Z8TfORDWVmpr1Uq\nmWV83bfA1xhhM2H/7xgOhbi08dpO9ss6GdBnfYSY1980g0UFdcdk2Zoz6io9\n6yYm\r\n=gkK3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"fb72648f5eb1f33cb594047db79d5c025d47b7b1","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.5","@apollosproject/server-core":"^1.2.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.5","@apollosproject/apollo-server-env-mock":"^1.2.5"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.5_1576005553701_0.07726848082892657","host":"s3://npm-registry-packages"}},"1.2.5-alpha.12":{"name":"@apollosproject/data-connector-rock","version":"1.2.5-alpha.12","_id":"@apollosproject/data-connector-rock@1.2.5-alpha.12","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"165197be4dd17d2f28ba17453e256b9c5da4b3cb","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.5-alpha.12.tgz","fileCount":71,"integrity":"sha512-87dAyWiyK36OduhN364xmjMY+fytxhEPKu3zwzp9/F7KdkgI7kvAMNmRZBuUpA5H9RyshWikd9JpAy2MNlK9Ng==","signatures":[{"sig":"MEYCIQD1paOtsR3cJknf+cFhQMGs3D3vfSk5NRvP0eaBWI2E8AIhANCEu+mu3lSKOIK1FqpJAlDwAYYpwghNX1hRYIJnfks5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":801569,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd86WDCRA9TVsSAnZWagAAl0EP/iAb2NE0ajvTC3YIyESr\n7PKV1K54tnJ+r+EFHDKhtjUqAFapi963A7fQ/ksVbaPWrG+cbWmEuA/4SgWx\njAoNfFwMlq5d+IRzSyloI6DQOYAeQIw0wpr9NeC00SPLWTwVhAe+bFGuke8J\nUnJZXEAjYcedJ7qvAzULyMstiIKJB0hLQgS1cmfxPYO04tyPphCzCQvWopMw\nynw8JbVyNejH5BT1NT7bTYeyuOTXYXZNjHq219iY7LCILNO2wLSlXTSclg1Y\nB3u5nH69ojQv3kFB0UAmdwdiMOlESklSCNvVLZ+NPuatV2DSX3CC4csqrfC9\npbvrImOaD2VHH+hXvuWTnw6Qrefm9qhDOwq848whnzUCSVtfgVAIfon1gWmk\nP1yi58FCpK0eZUDxaVV2wblv5Apu71AzfEYSUn1mvh/536i3i/cerVvw/hvm\nK4S7xoHTrL8XbcvPQESsrOmOpff6UvBhnjANoW0qT3/WN7OBUgzEJhEPPlFC\nL0hOo1bP733YJkm1DfA8fTgF8rjzfN28/gAN+KgmbcsnG1l3b1rnMOuGNEox\nBJR+2Zpc9MBoGJQNF93h6coHJsLlq1TuQvEwmn0LJehsSix+i38iYMFi68en\n08pLqYQ1IVv2aHGz/vxNW12yGDZPgIZkn7NzwBw70ixrtBHWKlAxSQsdYJKq\nZ1vB\r\n=UIeD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"eb730ef769c21137ef33b229b2598cd2f52b57d2","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.5-alpha.12+eb730ef","@apollosproject/server-core":"^1.2.5-alpha.12+eb730ef"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.5-alpha.12+eb730ef","@apollosproject/apollo-server-env-mock":"^1.2.5-alpha.12+eb730ef"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.5-alpha.12_1576248706745_0.4305784458684889","host":"s3://npm-registry-packages"}},"1.2.6-alpha.8":{"name":"@apollosproject/data-connector-rock","version":"1.2.6-alpha.8","_id":"@apollosproject/data-connector-rock@1.2.6-alpha.8","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"1825fa9c3c559544f96e6f9edb6bd9818b671570","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.6-alpha.8.tgz","fileCount":71,"integrity":"sha512-HPWKyqpkrJfshk7YtW46hQucqCHsD41oqRaTHdiTGZvMDhvjSzF2aZhZC8gP2zA7VsclAZWIC+P9t2j5BAhmiQ==","signatures":[{"sig":"MEYCIQDqz4uHtVJaSa3ZRv5l+ASANSSz6uwaEQKOv384bRClWAIhANDmIr+EnPmO5HU09YZ8lUPnL+x8bVcXUlPYrvqAju0P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":821913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/PFbCRA9TVsSAnZWagAA55YQAI3dUXqvDY2Zes/PyYRk\n8z03UWV18xZ6RZOazltw+kGt0M7sVsTH6/h/boKfrGiqnjCIg9jjV/cdekn4\nCuIsfsAzR5agk8350hjpAl5tCvl/7Of7ZkraT1P/8vc1EAopVVcdOFlFQCNE\nYZNeGw663e44DnCNGS7lHAeDK0iDmOABp3tA7cHaxG6xsGddvx02Vd1leyq8\n8G21B6GYfq8ua+xSwM8F0jbiv0n4lTrX8J3hb8qaMxY6Pn0rBKId7IcAF0G/\nnGwmt4Gj+GpKULoDRPQGORfSffbB9WOsUoOswN2rmOSetPVWhKtOBH4ubjvS\nBFrkfcdU30fcu26MParKVAdi3/cax1RWOvnrCOoe+2mIGvsNuFpydH26BFkV\nfvDOfMv3fgoC27YfHAaYkQJRMyNMx9EA5+ZbDxUDCYLFr/B4Jj7VsZzg+Een\no0J+rh5v5Texw1XtjxoZWHowqaA6Fr6k3uiYE+7dwMQ16kZKoXXUgLitEcE7\nXBcOfxTEvq0dr7tsnEj0OVonuH84a3e4Blz0C0LUsWgX8Er2C/0zpcoCewXp\n836YrV9uTYDmRyEwIs5uFot2lk6s7G+zvIN0qDPsAltcJFBSom+y2NjAYXFq\nIZc0h554/2WgrM/0KEAVYadLEgX1HHtCS626XrEaA9S4l5lW3o6+UwwUSjui\nXfoe\r\n=v/nh\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"e5cbc0aa1136e49eb0788d439f6647b89b585b69","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.6-alpha.8+e5cbc0a","@apollosproject/server-core":"^1.2.6-alpha.8+e5cbc0a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.5","@apollosproject/apollo-server-env-mock":"^1.2.5"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.6-alpha.8_1576857946689_0.9271160885939567","host":"s3://npm-registry-packages"}},"1.2.6-alpha.16":{"name":"@apollosproject/data-connector-rock","version":"1.2.6-alpha.16","_id":"@apollosproject/data-connector-rock@1.2.6-alpha.16","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"02fe263ef690e9418ff8852c8f51fe9316608628","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.6-alpha.16.tgz","fileCount":71,"integrity":"sha512-azdp7miPArY9TNqQuKhXMXoVWpfRIg+wlUY6mC7e7Vvto9B+wwAnRiZE2FQRheoCr0hH3vrreMotkr9pBo7OWw==","signatures":[{"sig":"MEUCIQDEkTfznD6P/Uf/jkKsW7Nda+5QLB3vUtlUzdm6AFrTDAIgMvTVWDfYXdf+4BZS4IC2d0nJ2hDgHeQ8hVM+c5xTxtU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":822367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHk/sCRA9TVsSAnZWagAAxPIP/jj3BhSC7+YhgIY60SDR\nZrMayQ6O0/CwDJS3TR4J7W0yvDbrttxiJA9R+C62K6rgxdYa1bxvQ8cxUaPo\n1goC99WJr32v6/tamvPKEQpK81oxiRH3VulvwTxQosOkGijzpCalwZUI8yxE\nYdwmf0PFVuCDxPOGFoCdctUcIb3OtnbV+QqGOHEeL4X3BegP9CZoZANvKyME\n1+HEe7PxmuClnNeD+G2JhYgL+nR9pFx+/ViliA9F8+WK6t2tg1bpqC+xjqM4\n2kV3RQu2snEGYDom+/7Hyub/seoJWxms78iPH6FIw/6QN0RMlsQeWhzSGpa7\nb1WhCe0/Jr4moVVVgg6ywx3soZhvMPT9e27MryN3DopPAjDNNY5wmXbtOLbf\nK8ci0T66YcQml0GEeVwnYfnh1Fm80U8yJzrVR9BKSLPe6pMKCb4e1Px19bn5\nYAyEZhMPUTX8QLg9QZX9bmI8mSiTjTwxiDPFlN1rWzhSjfd/6fWR3I8/wFbW\nMmxQEZN6rJsQ3Z+wCcWemuI9hmikcITKl4NzCXi1QaIvS4JvI4AhR8CcoluE\nsWjZyY4h4w+prZ3Vo+HmyUe/wjx++TMp4DdKx+8jOmPO0yYnsHclC3xN3JSW\nBtXdr6uWBSYY63r95/Fk3ONI2LO9k+XtbZjlFYjByGMfzh7RUK4Xb4RxfUAD\njoiz\r\n=znOb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"59fa276ea8a039812504c365e3121a986f3cf04e","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.5","@apollosproject/server-core":"^1.2.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.5","@apollosproject/apollo-server-env-mock":"^1.2.5"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.6-alpha.16_1579044843985_0.7365221938803326","host":"s3://npm-registry-packages"}},"1.3.0-beta.0":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-beta.0","_id":"@apollosproject/data-connector-rock@1.3.0-beta.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"f7078cbe2cc026d089935fd6c56d9ee3ce1a506c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-beta.0.tgz","fileCount":71,"integrity":"sha512-CaH5Au2DVormDxKR+KZEdejJFcuR3pLQGe9kf8secJTaN1vz/u7NekZJgyhY7w1cg5QZ5X0KZzPL/gcGjtbhCA==","signatures":[{"sig":"MEUCIGKuiJ0bzIEsADu/XkJF0YD4wPYi32vl3RMI8xn77+c6AiEAk/98F5epPEvSWO/vEMKxHawVYtgjjqU4X1MBqxbzYmg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":822385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIIGoCRA9TVsSAnZWagAA2R4P/0GJHaqse3XyKSqB2z36\nfp75VIBNw4nlI8kZm0GMAYgBeu4SjC49gowk/jr9QMbl50slTCH+F3bcHZtb\nZ0R85bmuoDtrEyUPdX5q7iLKPjweHaafM9upUdZ0ymVImy973FiQ8puJUFal\nWN6uiTLFA7B9loM0/jpK8uKOEsZYKIyf7ueeNHfYkdc8y65G416zq7P6Gqer\noa5WOiSGMWHCM7jnRVOd1sfZjp2Uar/7BcdYgHkcXV+45+dc0ZnZi0w2+WCV\nh4Go0gLxMIoltSHTs4b2UDKJO7OERP5OVi2J6BuZe/FkLH2xyWhzlG7cEjw4\ny1DMzToYcrD3+W9Q4mhY+tl0KsiLkmBBO9bD4I9qij+lwJlpgiNS7A7wFKDe\nPjaKy9ju/EXtXpaY6TKbU37CFwDNTDbBKJ1jxaxbA7F/QMOigyf2z4E2lwu9\nydfZ0pTNEVntF73sZ2WHzb0lmfOUfMxDRkrz0lktVT+iZGyP08eHftTHoFOH\n5Ek4EVuUt6QhV/C35swDDmqOQKKndf78XxY61JeGrefsvpHRWZemO+RFUyyT\nTEaPjCQir7CVMPyKqcsoOHyRj8JWj7+uu+Hjx4xJqWh5zIsqH1IV/NsOyZWb\nJD85YECy5q84Z1Z+uXVaWLm0QtmT7U7yjItSNpYfYGKxDQvMvQxXXhwho2Uc\nkus6\r\n=t+mZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"a7345a0681a2efe7f254bf387b6c3c4c5349293e","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.0","@apollosproject/server-core":"^1.3.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-beta.0_1579188648005_0.32453821490962564","host":"s3://npm-registry-packages"}},"1.2.6-alpha.22":{"name":"@apollosproject/data-connector-rock","version":"1.2.6-alpha.22","_id":"@apollosproject/data-connector-rock@1.2.6-alpha.22","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"a4ddb48428486ab1a28a8c479e97a344c327d8af","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.2.6-alpha.22.tgz","fileCount":71,"integrity":"sha512-0EHX0wfIHF8+gNL0vA3QQT+aM/I4ebz31kRK4EFb7tnMvV/k7H4bQCPCokjWPLhrwJb0sgeESikXukc+pxe1FA==","signatures":[{"sig":"MEQCICHfGM7EkWdJYqXWUkGHrJex5Y+w4ljDx3HA7anydGeEAiAna2Av9kDLGnVCWsK8wh/vymDnOtF2AyJS7TE10HSUhA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":822435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIJI4CRA9TVsSAnZWagAAyZUP/RYiELDs/tbaF6BZ76/a\nkLTN1U2MCGu+pve3URwL6tki0693EBPPWmhsphk2lZK4/FOUVV49REREJ13M\nuAxpdjUXYSVYXvY0TxyexQdlXhHlYiG9iYG2wp+rWA9HFMukoamNiEkuRrSV\nySBG8TvFjtHRH0xxxwmzpFVKsglgsoolHL+GEimnac/X1Sn2mCfkxRoexVTK\nEtp/FEIKj5YP+jrrYA9vI8F3poyU+pJNHA0cjKZWfX7zPSVug55P4E4a9uEl\nbLsCjjnb46L0ZyQV4qeSXL3j09aeTtNK2Ih8AkZ4Nt7yr8zd+nGdxwKSkO3C\nhZyT2D+wcxFq7CgRdZo5okrXUXUM+dJCnk0SK8bGbubzI8+z5XyBwXvV8RQv\nxjez7v/c1rpxTov93iUOlgRVKYeBMEpXWcYzmtSVR2VBe+5PoKEn5nPIxWBY\nX9iASCJTpo7u7K7t0We3amJfosVkrRspnCtgeXx+Rc1ATK2tIk77EEdPm+3R\naVtxdWOaLtTRuTN/v78BR1jmozD/Iahb1BvkJ6H5m8Pn7oPe1GmRbS1BNxZz\ncbqLD9qrn62XTZ9dLRjof7piIQuOPcUzbgjPfmQCoAHUn68Jjwh4RtW/UGYx\nAkmpq+i8AmWPI2kN4nML9rQD4xbmonclnROplZjjRfqyF0PNFM+7TNh2OipK\nqUVf\r\n=Rl6p\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"908f5e3aff2138f450b571c49b777a1152c49d11","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.2.6-alpha.22+908f5e3","@apollosproject/server-core":"^1.2.6-alpha.22+908f5e3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.2.6-alpha.22+908f5e3","@apollosproject/apollo-server-env-mock":"^1.2.6-alpha.22+908f5e3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.2.6-alpha.22_1579192888017_0.11220866295737197","host":"s3://npm-registry-packages"}},"1.3.0-beta.1":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-beta.1","_id":"@apollosproject/data-connector-rock@1.3.0-beta.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"c8ff5801f1529a830869c518808af83dc487bcad","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-beta.1.tgz","fileCount":71,"integrity":"sha512-pX6/Mc5WfXKxk1TBtW+LITum4fjshx0PJ+np0s1pP9NoB67dLrOdIeiB5kJTDDp9A+gt3Zrbvfpxu7AvhnMHTw==","signatures":[{"sig":"MEYCIQD8dnA/fiomORzWQ2BG6Jei/zARRUI2jKRd94zOXyhI8AIhAK7aCrQImB7AjZcD1Lv5ORKVOHu/HzzOzvwgeKm+DOiw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":822385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIM8dCRA9TVsSAnZWagAAd80P/2xldrFHdR9tgFQhtMX/\n/zY2WpfGdwBF/WqPsBPIWsYDTF4FL9KPapFcrFxm3Oc+Och8pngOuxvMlsck\n0baLhivYeaV25ZmBVpI38y7fWYJfHhmgfxv9+Q0EukC2PQ070D0lXrf7/8Dm\nEEYna4nEjxKpVP42OqKAqqLYef/6a4JXMYDvCJrwbmJzqQRhEABOmqNKnnTY\nqGNTYZp98NzHM4EgqveL1+J2kQh0ELpERFF9pxPjBQQw6KDb2/JXtOpsMMGQ\na5OA6SUvemWiFe+5fwErsjwJn74M2IodhgMwzcI6PpvLFuX4wS2t4se+2ZFP\nap4ZrHH6DIeKY9YAHBk9Bz3uVmEewzPCBHGt7oShm6v9DRj3RazhOk32+aCt\nzyps7ID1uuXl7E9JVmV8r7wI3psFRXYTppSBZlLsSfMClQunZEm19LOOqjn5\n4t5n+YBanz8mYM0/oRN56xyjjXHKHtARDbPtCkTh4f09R+XnNGo8YYbG1HUH\n9K99RzL+X8quWvan3JhGOcQ3HUBUol0eTyYlvwMsSEdqj5MkbBulchx4Bnbz\n2I2wqzLpOY7CD9MY/o20F+Bp3JKnu2OkAEXAVv3TTX38QAtbivBtM9rsaFU5\njnToMk2O6WwPDY/NF3J5qCTOkuJ0Kc4nIqPMwEV+XiWvjCY9R6dDRtjjbBcf\nznUa\r\n=s4+h\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"b027c945a9917fc329091277499bd9a4a6605fc7","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.1","@apollosproject/server-core":"^1.3.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-beta.1_1579208477393_0.6400700598959543","host":"s3://npm-registry-packages"}},"1.3.0-alpha.0":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.0","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"783c4fad7555ca74b04cf1c234843552da18b4ea","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.0.tgz","fileCount":71,"integrity":"sha512-0P/8M5kQrcHfFHpmnQv+za1/md99E/LkMnxPCypqvFOYrQyx8srqdYctmQ39V7FdFJXb+VqUqEAmADkg+5O0eA==","signatures":[{"sig":"MEUCIQD6CssR05WNgq8djOdZEnbeukSYztt/snKnkGbhjw/DlwIgOroarETJhNa6AedmEtyzwfvvUCnC80GgU+arp6zplKk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":822430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIeCKCRA9TVsSAnZWagAAEdQP/RWUxvXUDqV4kHRIFUPG\n43ZIxWguJqJZCy1ClCSyP42tUPEK3U+EMeOObdEwUlAE61dENviRjk14fWIS\nWS+6+MyY5JbZNvZMOu3rk4QTNfGsvGw/wHz+rYHPU3IjJ30iQ6lOQSGuOiKR\nIkyhynwq8u8iXAs31tRkbprHSWkPT0Wq3VAfg2RXnFKff7j6UF8UqWjOFLrA\nPFf1dOi5AzuOIlxm6RilSBCtGC5cOopzDe1sCMf+3pgEymQz0jwSqO4JXE/2\nJfJwLyTmgteYxrBcmP6Mc9G7YKWqBkTNKs/j92qS0GBYr2OqSzQHgfiFAAzt\noek6atJ7BQrNPcB9P3fNKcE+lEu2VmmT6gjZITYlzMbnbmw1rbcEOevJzrIa\n+8Bz9Z6+k3TBPP99+cdCleqy+CpegTY30E/87o1V6jI65Vzo4iqch5bnxO/Y\nZNjJ7FRKLavTdZqabCp/E+JbURuYty0bXgS33ULqL0OHbUTYBVOJBusETRTQ\nTJuVnBaveWYdkvXGnk8nxx/rXczxSEbkldo73vC3Y7wrVVgSk3wcN+tv+Hud\ntD8ulj9VxLobqtBCufKZ0WYhA1da/QkiK4n3TinsmFAhsUNm/0q8j3drddKe\nsoo31CW2n++6BpK1/w9eOIQ7+xRRSXYRpyNSwJ7HRbvfkcJqMHVniK2STrZ8\nlz98\r\n=zDDT\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"8862021c02d3c430f0968feda46c22ceecfa2bb7","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.0+8862021","@apollosproject/server-core":"^1.3.0-alpha.0+8862021"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-alpha.0+8862021","@apollosproject/apollo-server-env-mock":"^1.3.0-alpha.0+8862021"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.0_1579278474145_0.7642380594190159","host":"s3://npm-registry-packages"}},"1.3.0-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.4","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"0309a19bb8bc7df6d29d22b6368b5b86bccc3544","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.4.tgz","fileCount":71,"integrity":"sha512-sOxVjdUtwmSWR+j0D/f7F6CvAEpyPiVjFcTIyq9c/syGJ6ODpmR2Gh5c7B9AqIIST8Gdw5Q1Eop8Ao8kJZtuzA==","signatures":[{"sig":"MEUCIQCi80jK3CC6Ln3ZqyJ7v4YD77AW0U+HBzTKqpLsRkUhZgIgC6ZIim/i5mmOwaqhPrsZ9WhlH0qqyhCHMlLgxTy8BDQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":822451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJ2ZqCRA9TVsSAnZWagAAnWEQAJe8IFKox6sjMZeJuERU\nLkRLGWPAuSunNc1A+28PQSUZIJEilRWxRr3QKkMgMcuEmmqPNv9Jn/tWBPcF\nA05634xzTAnPfxD1ZgIh+KfpTwEfBWuXWKrtxH87KDFTWCAymarsofOktjZJ\nKB5LAr5I/8NHRYDjHzRMMVbEaKg/BOswgeSt76EkMN/B+i7PHto6BUbAdZO2\noyJr4tw2LDnYH3PdsVc8YmGWdcgWya0ilsABCxM42oQP+E9x7Sf9wRl2t3K3\nKKMuc4iniE5322ndYDZ9vodkySBoO5lcRc08sbvIGPnk9phWJ/P1IutrqLKS\nB3qqRMTtmUwWaud1Fm8aduAI6lNWWYuqZJxAHtnRpe8DXv1V7GvWUxllSRPT\nKhCp9l2O26tR3VxSk+ecOZtxW5Yxl6gBsgGYcHMO3TbcW900i6UP6ojdQlKF\nGHXWoQhiL+6OJpdHyosmeLgboAJjezTT7Cw7RWiaiEud9L+fN5k6Rf4kMW8j\n30wBWnnICF7m/I9CZn6BYjOttPBIThQAapMqWeDylDV2RaKFrfjz4HaoSz81\nN+JoqNkQdDsXHT4eNw2gBKK4KjC3iPQcQzOlaWnPHOBMQ1qEo6zphxpX3YUT\nwh23uSTx/yUfefQfx3ta+wzHdi0uXfHmg4ACVpM1jE657iWUzBOqFU8VDNgM\nCby+\r\n=tQgt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"edbd7493b0c1f0509f88a929d9612dffa8b27ec4","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.1","@apollosproject/server-core":"^1.3.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.4_1579640425974_0.5758241621046305","host":"s3://npm-registry-packages"}},"1.3.0-alpha.9":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.9","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.9","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9e49c6f1e6f3b05da054675f7b9d819d74f6fa03","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.9.tgz","fileCount":71,"integrity":"sha512-9sxUu3b9Yuw49yW7uuWB/aHkp+U7ECVkpvqu6hoTxXJM80X3Mdwi1zNw68/iCw0XapI6FZT0fFTJ9LvfvY3dMw==","signatures":[{"sig":"MEQCIARgG7p3G6/duRofAW1SfrEMxz67bdrHHboO8P9TdgrLAiAZn2ZjD1UeQgPm8zzxhijeg6YfupW5yNa6qUCzqqmADg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":823648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKgcJCRA9TVsSAnZWagAAft0P/2uCjlH+Nl+UnixzZ+sI\nLdXgMW3M+XIkpbjj2f7cUB/11xIsEKBYbgxQCPxtn1WJwACtrqIClokFRXPE\nTPZotsvc5P8GnXZYAyP4At77jCpAUuYH6pUSbx/o9vX3MfKoSaLc9l8prlUJ\nkXw0kSxsKWGBu1FqE+/h0gTHtF4EtTIxy6Z1b0jwGYUE+iw75WCQmQAuvlqh\nRADfFTYXnkdw3qg/37P7ooHthtw9sROzxedbOmf87EG5sLd+4AMsaGS4qISx\nzMAeLh+4bymDtD8BEFTWCh2VMBl9oXTe+BzOrFrrMfInEyzSVg7LOEt4L7/+\nWVgze9MahKJGuLMIGkTvfvrNFCTcK29KzAdDSqwCxlTNxWbXr7apHHCFIhEK\nyEl8IWSUEtwf0eNik1nb152+r+mcDqDzJGk9G4VGdMWraTQZQONde5q0x02D\n4ioEzGId6ctdCbI07mFGqJzsOIH5GtQyUVcwskclGn3E2pCCXsGGVmjK1MIr\nX1R7gIzMvk7ooGJcuB0HmS/nWQWij336vYft3J8kKL8CfCQCv/bwSukcXlzJ\nHSTNrgE02XiBZt3Jm3pT9v8t1NVMdri8SW/rJ0a+TWSx5xHP/HXSjd8MFyE5\n0Uzz99X18z0CQy7cJSjnEFyMHXorUkiXHgdeSf949IrprkzHEQmeEa+2UOGH\nhdZ7\r\n=sGtf\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"c67256341fe1a63ceeea74de42a999c222fa2548","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.1","@apollosproject/server-core":"^1.3.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.9_1579812617122_0.6018663548199203","host":"s3://npm-registry-packages"}},"1.3.0-alpha.11":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.11","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.11","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9908fa587a2f7601cd670dc3b42206dc33e6ce11","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.11.tgz","fileCount":71,"integrity":"sha512-zEcR1G/iCb48o0RBRTjs+JRbs8zKaJGyNtfgMWTvbZBxivHMHzaFPtiFfTkNQYPQK4bFg1tRUmPQNdzRzof9fA==","signatures":[{"sig":"MEYCIQCf4Se71EbWx1VG0OwSlb+Y0g5SLevek4LxJmvnvXLjMQIhAI7XcvgIuGfR9mIoV058pHw7tsDXYve+62eWKip1R2sY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":825794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeLvttCRA9TVsSAnZWagAAI0YQAI+lfJXEa/S59AztvDQa\nK0O8b6+SvsiHHqPYSzUwCmzulE/P5xxI3kpE1FBtk9JOtW2E1d4ZNrW/mvb3\nrDpwiLe4R1RGJjme1Rn8gw8QANJsoBbTCmr3iM/6j0SqwQVdwHZpovkrAk4g\nKWrkE8XRNCpp1D33WlM3juDH6xk5gUsUqqmm2AZ83GcrChKFB35luUHA4LPc\n4AIHvFcQb11n+R9dgkjfnoAOYStZDYq3f5RNJ1uBt6t8VLIPIDsfHszIBgMU\nMUuF/vEYKE85XzIkNZRkOj8PoCNZHY2XLtj9C+Cuk+Gex3CpyN3ztFtD2UPw\nrdQHjDTZT5T41e3oMaCcaMx7kIHja4ETRmqSHXzY7z6GntK6nL8Y9T3N8w4K\nEhu6R5Taj6E99T4dRnXk06TTVjYf9HwWqAtpqk+EXesma7628H2/9Bl9PuAm\nYSyi6YrnfBC1su9ScFFF/TNfKoNCSOzrbKASA29qbsi6P7KoACA3Rj8LPQ9l\nagFdDI1z9b2DtQcJvOskuxFUbeoKDO2JSCahAw2ep19K4kFJc2exo5zzloYE\nrKD6lXxDBXF9KdUCjHtPJD0fdDIakOvuP/AxVlK+XfTdj6WAN5rkyo/JqQ2W\nOh27X8uzsCJfUqlKle+V8LumjVEUMR685n/ugyuLJfuDVEHbSrxpB0rj0kv0\ni3hp\r\n=J9FM\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"605213312e9e4002ded238ed12b478831c9411f2","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.1","@apollosproject/server-core":"^1.3.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.11_1580137324997_0.15196349236635087","host":"s3://npm-registry-packages"}},"1.3.0-alpha.12":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.12","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.12","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"50bc2f6491a754a7064464c1546d2da2872dfcfe","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.12.tgz","fileCount":71,"integrity":"sha512-37CTJQzhXgt0WJWR3IgVx2NIp6A3CaZ7bIe2dHwjaHrQ7GXkhWr+yycifIS5RQLMw8wbJkCl60PrMc2oi9+ajQ==","signatures":[{"sig":"MEUCIQDNy/Lw+dO19sLAu/cHyZdiqwjglku+SYnSbrb4Yb6U4AIgKvnmTNlQHCWA7BpHoIBs9GR4YHes3Mkp/oPEEMzt0Kk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":825919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeLzKFCRA9TVsSAnZWagAA5xkQAJ9A4CGTTmfr1yuRW41G\nr35xtvd5BTCAD1pS+RO2NbqoDNK4SC/oUtbSA8STnVlolgu68NZpWIv33Ryp\nZ74Qvl6a3w+uDQ4+woXwlCbAh7B+V9caEdTG6xxFaCO4EB6tAd1bLHYYhBzd\n6GFWeCdtT2sIyEoWEOqRMFEtAXk2sV8YNbJhRi1xRPxIiEWZ1NYLg6lWsy9r\nocFLs+cCoJwvG23NeYRoIJqS0IBQr2okGQy9/RP5LaUSEIphHzsPENyhaK7T\nol/x0omLGcWPu869fZ32Ke5VGVAHJ/S/xC7X2qmqolX7JGDbtI6SN+SACLTP\nUO9jQP1pCdxcUiO59fZRYJXB2xqFOH/hl3U1JGrUDh4d9Pevp4IontIhGQf6\nyC+9HsboKk6N3bHy6LyRBvmNctvCTAtOnz40ocSavr7esS/mcyQNQmyPDX5e\nrY7Ym2TckmhBZ1wbQ1cMbXpiY4RwsesUVBg8EIDJ6yxFs7fqEGyMfSM2B0a3\nLpBSOS3OHxM1VBGYAJe35EtYJZ96H4xKRsqPcgCsRp2tQO3fF3Oh19iEWntJ\nHdtyQMuMtRmWcIfC2mjWTVfO0toPbL47nvN5ZMOf7GM5UGj21LVjMfCVUJ5e\n4owkPXYP0rPTq0+1FWZJK38/aybF+unlAnwo+PM7fgG03y338uC3R1LniifD\nPM0U\r\n=94/J\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"b8315a136da6e45ddea9a0656a0013ab74970fe6","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.1","@apollosproject/server-core":"^1.3.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.12_1580151428745_0.9323688056327022","host":"s3://npm-registry-packages"}},"1.3.0-alpha.13":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.13","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.13","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"1b73855551add14d9f1bb300994c8310139b4c25","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.13.tgz","fileCount":71,"integrity":"sha512-lFMbemK+A8QFw+JpGzT4HoOgLwy6LIwsgKCNTw7bhmT76xba12cBzPGZznSgwmgmPtCutTdkzoqKJqbhMKM1hg==","signatures":[{"sig":"MEQCIBFntDcPMHfp8r5oZT5lMmu8HpO0eyveIGJo01qiOu7yAiBHAVSAFuLF+YoRm1IlCqRQ0xEsYI5/LyN8TDG+md6YFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":825631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeLzntCRA9TVsSAnZWagAAoCEQAJajsiZYWL9T+eIh2Rps\nu607J6j3zyI2GjDdOi9pdem+RscPu9qRPnDOQQqLDfH90xccHjzW/w8Ertmo\n2gohlyrKS/IezAZ14cwm/mB7DApE7njCIT4y0T8wuL1r+GeCaZCChn+jrSMh\nMopHGA/mEv8KOQphpFUOJ6KqIYJmlNziMK1Ja0kiu5UZkFL3/TI0aLM2W6M5\nrt5sLQBXxNyvRmhFs2YSslyHa2qR1AA4ktJp7fw8+sidKBgibsZvgsxM5oE8\nxTWzCj1MmOh/ggCYYGp9pOAEEUtYSwQtwl8ZSjuPewMrXrA9Jqo8Xyh4J/TM\nxfj+3/vfK0VZ3oOOXfec/hjO0KidYEHPwRCE4WMVyg+UIryiMwY1PpfvnmMe\n3FHP+HoTUvHc8ugFV/twhyRSZ1OiL5u2PMl0jQGnMRRill96Py4LwAK65VC0\nNRRFgIN+CSw0Dvg3xPKWbRranbAs7NRL3hwPedPc9h2sYkVYhFrY78XrmxtP\nwtW3BuG8nfpOHntk9HQA3qQVHA9YzAhexqO5SM/fC9aKjAZWPRG6ZN8ttEM2\n/TJzKL2/Fbvn1OGHForUSOaOoEjX2IzIkIu9dDS0QKW12ipO7XsGkpex/Lcr\nf/X+Qnq94Y/ja3Zc50jo1kOVcqWFxAURI52wdDHzz6pem4PolKLUA0AA9gyY\nuci2\r\n=upTa\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"14e99d0bee85617f8133b205acfc28d0bd36cddd","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.1","@apollosproject/server-core":"^1.3.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.13_1580153325380_0.8946300804462615","host":"s3://npm-registry-packages"}},"1.3.0-beta.2":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-beta.2","_id":"@apollosproject/data-connector-rock@1.3.0-beta.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"27ccdcd6160042f53a4855806519a8efb843ce72","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-beta.2.tgz","fileCount":71,"integrity":"sha512-PItVPfCjxpAh6DbK97lbbgc48T3rAfbYVPU5Ik865vcVQVm+uxXIw8vCsR4PFhg/zkB88voOc7dPr/LoB/XNPA==","signatures":[{"sig":"MEYCIQCrRXIaGiiDfd9vT/Oz57UeqsP+o0lBja2MHDaSmC2Y8AIhAJUeXVYil6WpE8GMLJadAfdOa5qRWbvufLmweaiAKx3H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":825621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMILnCRA9TVsSAnZWagAAdGQQAIdwBgP+9JGZdDd6dBS0\njKdTT70PDnrv4j1+s2LOdeUVq+Z8e22li3ZyeJ9RdKRAK4HC8DWmJ+e1iDgg\nhSjV5yIf69GBgQeyMY1OzPo+8U5TAcrMzbilUarwLi064aACnvW1ZxCMQP/+\n9HOk3616ih67AXhqxjm1jTBWaui0Q8jVlbjU7Kx3FasxlRUtjsMnlC3ZHu4d\nwt2K1OdLyEZ9B50pHxMkAxX/vvXY/4dlLvTGfwmfk5E27E6/gWvgvxaoDB4d\no/NUl2e6E6xVTdNAEIOuMvqPAGG42b47kmi+QhbZOwvwmJRQae+W7rlssr7r\nSD0xGmDru5Qyvy9QFFLtKETtd9reH/M4QYtEMKlYPhY3Qn8eL97tSmvRSC7o\nPq6bTFntxHxsqtk3C4ouVmgt/6KE3LnImbClDcOcyHrwndJRq0oxfNdOELJT\nXZx7txbiGVVaErErRtoqdrHcAaA3Xs22MrHI60D60u8ETxF0rKzHsb+8nmb6\nGw0NErQ2OY+/lqc08kLefUWRSaef+3UjKIzP/iAqE788FWpT8KYBQ/6IaCjD\nrk0znpJQysOWlO9DUT7RaXdQbM/ctj58fcwAnWMTEVB4kR8u6rq6Pfci43S2\n2tivTNPNJgZ74tt+W6vvpc7Xc/2hDGEuebd1xhIjlSEybaCfKZdzyj4XCCKc\nU0la\r\n=8rZz\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"0109f278cc7218bbe9bf66de6decce6376316b43","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.2","@apollosproject/server-core":"^1.3.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-beta.2_1580237543052_0.17714875198403401","host":"s3://npm-registry-packages"}},"1.3.0-beta.3":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-beta.3","_id":"@apollosproject/data-connector-rock@1.3.0-beta.3","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"245d48e4a2855e8fa9e366003e5e6c7b576ba735","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-beta.3.tgz","fileCount":71,"integrity":"sha512-cvF9YiPN8X8ST1poEEjuJMbTbS/S+8CkmY3ldQCcmC3TR1WX8Ty3bexWqJOuBg3K3uPF4JEldJfMf8dQZltIxA==","signatures":[{"sig":"MEYCIQDuTPh4XTs80OrBgdQ9Jz4a/MXe9gmqczSduxEeusH62AIhANNz/+V8kh3rR9zzs2Y3QNq38hZF6EPOtX3d5Q9yxEOy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":825621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMJgyCRA9TVsSAnZWagAAnnkP/0BlHX1BlkVhoaYYDuQv\nHqCIdmloOSN6ELnkTXL65kyNHhkvDe18yBikAJ/mEomWXfwLIKHnJfaNrDbh\nkgzltOSWVSgeYZcG85+aPUjsba7eecpUrKrh4Rxg+cu3Sfh92pU0NjXcOKYT\nfQZsaxZuSJEXEObzcRmm6GATBAMvCEVqYFLPkFkV1ndW1rSb88WXMINsLs0B\n31PbopECMoy1H6/OKWozuBDZYn3uQ8I/7+zZ/zJmf26rpBd/CE48AJsMS6OB\nZdNbJ+qQAgQQ2U3bWfwuZVc5EurO8B2grgO1dxmVBVNdsx5SnBE8toqY344n\nVRjJutBSI8P4TdFEOKJ/2/UsSiJmoWP/J0UvQ4+vymUhF3MlRl3U4zCmE5oE\nfW5WrQgC8a8hJUX7B7V0zfXJdbuWPjMdlcLEC5/kJUzF1tUa9qj7M9nblXqi\nkMuNsyOeJP7o4rApBmqx6KpVXE4g6zMBwyAMOarBFODNHIhgZVlrz0opQePJ\nKj43ETS7INl77sVtQYezr4HuamZHaSb9iDZvy1x+eheW2NYH3pQaw3WDN4rw\nr4aef4VXrvHrgrhhvhKVETpKlxFzgpc4JiNbVxjigRAryVKKNy9BQ5fl5sIm\nOHgBv28xM7uvHrHs9Kl7CMmUM0s5s8pDxQZWe21j25MJB5YfSHXScrBPLQXP\n8BW9\r\n=7Nub\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"1da2572c36b545151a59d91ec093f2d3e935a29e","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.3","@apollosproject/server-core":"^1.3.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-beta.3_1580242994423_0.7808273268421901","host":"s3://npm-registry-packages"}},"1.3.0-beta.4":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-beta.4","_id":"@apollosproject/data-connector-rock@1.3.0-beta.4","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"6994b861c497d07f3bdbfbaf89225987dd688e9c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-beta.4.tgz","fileCount":71,"integrity":"sha512-eZtqTbQwkuxrUb2MAndDjFwHYLXwvFgrGE507LguCOiWU5EmzZ8WAAFqksCDS1xS40zTR/CJnvpVHK+C9JS3Ng==","signatures":[{"sig":"MEUCIQDo9ogXKSgnk7+MgAXAYvevZ9ddvyZEDV5/B67ehVnuJQIgMPbPmPmtnJPAhHmvHOt7nwaPgFjCHeCtv9UBwtURL3Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":825621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMYhdCRA9TVsSAnZWagAAKJQP/RADK/dpyf0K9Hlmtxtv\nsvRqUYhf8grV2ch1W+jHowxyjhmXSUQIhzwCrXaIeaEkmh4nwtVv+65l+OuC\neZasZAhheJcLkcoNNErgYxAhVKVa6bEO0WEJE8I+mA6GUi4QIYr1mZ59G+Hr\nP50M8uwpmJyqIo6sa0rbwSkEFuwZuguZ9zaDVj30N49fvl2AmRc5FA7vNde9\ngqIdk8oZ/I2v/MW2xR8crD36ugF3ynfTZv83yHsyz94Yu8IPVlyQJQAS/lDz\neesgdmi3ToGaFFTt1Glp1Oo4QuL59fg+T+jg31fZq78lXGiepfuirfMVhtVK\nq7pFAqLvkzp0fptlbeLhlukLNvcIh6rnf7CbweDtm6LwvhbzwpO1wyQPCSBs\nJ1Ii80MQBD52BjaoNndC4ToHTbyHQs8E6/GbflsJpKadeNhpyWShEtI7PKu0\nYlEzz9MNEwQjGGoB6UG8nVjAmYNC0tp21VgELPHbA7asw87QqTHC5LXIi3z9\nFHawJVsOV35RpT5q0A373P+hpv7rvOCmb+ULmB3o4itoUdN1r6qi8xCteRup\nyWsvjQrA/HqI2KWs/ccOEaMKulrjtumG92TwsIFqxmD+U2yeVBB75IX5EGeQ\nepCILE/1r0FVkQxOojjheHVce0E8l+qHEOzu+bzXi1ljixfuQOIEGV+IN8Hl\n0UWo\r\n=n1tj\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"b129d78d8be5a702603f594494719f1cebe0e981","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.4","@apollosproject/server-core":"^1.3.0-beta.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.4","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-beta.4_1580304477322_0.4546325307012038","host":"s3://npm-registry-packages"}},"1.3.0-alpha.14":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.14","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.14","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"72bdf62bc4fb0baa0928bad49da79b3706ec2932","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.14.tgz","fileCount":71,"integrity":"sha512-7frNmuXbSxR/fBXv6FoLA0dbpXige0+FJcp3jcVMQ2XXDiiKt7kAeCnCFYAf9EzJTNWqbFxycU/YLBBVNryjRg==","signatures":[{"sig":"MEUCIQDWmXQfB9amgqjG+W+AH/1b2TxlhdLIwLOebT+zy2CaygIgS4lNIzp7UaSiQwB3UoNIskZzk9PWXNJlw44ejXgv3D4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":838620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOwhkCRA9TVsSAnZWagAAPI0P/2tqotlxo4FpdiLolKlm\nH3rWbt2yOpCD5Xg4NmI3pHPK1netkTz17MmylOFDFgMcGG9RnVTR5hYn/Fn5\nghnmw+ZDZq1eB6DzLdR/JVC/J+aj0VmW0RXmmDzgDPKLsW6Ey8b9Vn0J/tdx\n57aBvZKOVi+uwZ4qi4hPIP+XDA7zldJCHEy6EiLmntF5+KRHA7Ye9xrDXflh\nTel5pspoIOJngQ8zPMEwxMHFp3Fd206TpItux6RCLl4lfdaCf9xgFnS8VVED\nivWk00812OXOdEHXpzIo9sproEcPSLefeVdCBiUm3lYO1Y/0FVu4PvuMFuHH\nSP2vrnJ2rsH0htPX67J0Ms7frcaUmdruy3oQE1SDzM1LDr4jbDDLnhQCi8tM\ngsdthuBjXwxwpuYc5jM7uIK2QQAQEirEKSQpaqu63nh0zoms8ZYlmFXTiPBo\naSJ2WoeVV5ptUtfDkIcO01i2e/zyyYirp4kHqQJ2pm3Eq9USUp/Fd64ahcvT\n+TpsHCYTOcWTdZmjxQP6DF2p/5kjCHv9VaajaBRwyHO8dnjwXp1VdxqipCt7\nksziTDHRG4Cs9DybuvJttp83FOo1iCZQDFh0fpLCUy8r/VopcHG9FZq6YMhB\ntg3zw7ZcNAZo/NSJMsSg2AIuotsMV9+3/rCwihM00MWhuQoeZ+/wBx/hHx2z\nawaS\r\n=+dPl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"468517c1536474325232006be85224104452e023","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.3","@apollosproject/server-core":"^1.3.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.14_1580927075810_0.8331993143857748","host":"s3://npm-registry-packages"}},"1.3.0-alpha.17":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.17","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.17","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"10fd9a2256e758745b480a80f57a99efb3b159d0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.17.tgz","fileCount":71,"integrity":"sha512-kQxBzifPi/mortan2SzWJEtbVNPUiyeIUzG93i+XVKO2bBzuL6rNh4kfiTqVLGN54YLeXFwa26bxpoZ9wuiwRg==","signatures":[{"sig":"MEQCIBg05hxKNUf2JWXjuq56+4nVoPd1hH5s1woNcPxf9SCwAiBjG48Ws6YTO4qX0TWePoo5vyBWtl3T+fzRJDLxYuh+BQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":838640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePFj/CRA9TVsSAnZWagAAOEoP/ip0MynLDYD/P1DNmamw\ncRhJ0ZSuYDfPb5BqfFHJAiIfJxxzJqzn/i44nY3WPzaXLHrzwXn69XPvLe48\nPVQxbwhssl6/5Tr3ZIXSZ/1hU/O86At39DtxVCbCRHCLgxP5oSl6gnl8PqcH\nmC7FyZx3UYEtxsQCFF4TD+khXuhMhba2uFJoRLaONin3y5yyXN1ls1uB534v\nEL3dRJ+7GfOTC5xxCvOJTBriYKLmPqZamxoClxCZ+hUm+7j+8U44GbDOUzIS\nn5Rurd91nfPRXw7zOyGMHo4+VbYBs0gPZHdp3lim6OBJN277IGZzNJAbHyRk\nm+xEzKAjqe4+u3eNAW/g/NKJuIzFImN/5VYSUlYFi6g4Xp+9hUfT4b8Zk+AB\nQ7OgPMnLNE/oRwxvhiZw/6uNrxr6wCy32SoHkfk4tgudsLl+pyAJfwyohiyG\nreiaU5e6hTOb2/Q8uY6idPxmGmweT3N/FUCAbtAh72BuItCjGIJPllYDuBIP\nbU5AvA8dLJTOUQewQ62V8TvUbiEcG/nFt/Ql3bmwaeponM9oZGJvVymOVA2J\nBPW5WgZD2qYOh2RX5ff98DzZYxHL79FWxHrqEaqCcUxzXRNL/vN7dy8speC6\n+1bs/UlxG7FP/EPKx8Dfc4hRvqqQ76k90LeQSLLAs/S72MtQWNWjSuce9CJT\nfk+T\r\n=IS54\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"d16c4826f9ee8dbdd66aeee1822effa9f4014326","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.17+d16c482","@apollosproject/server-core":"^1.3.0-alpha.17+d16c482"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.17_1581013246674_0.8754001427289331","host":"s3://npm-registry-packages"}},"1.3.0-beta.5":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-beta.5","_id":"@apollosproject/data-connector-rock@1.3.0-beta.5","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"ad40c31ba25c86c9e99b33c383fcc7be844eb6fa","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-beta.5.tgz","fileCount":71,"integrity":"sha512-hzMO2EWjmRYCAuH3qNkL0xvsEjxtsiX7Ko0wXKrFnN7RuG6Q39xLnVWux2TgjrkPQv8llbNDyYh3i5z4kKc/Aw==","signatures":[{"sig":"MEUCIBNMl166Zg4qvv0E+BOxq1gXNuDyaMDFGgNOC5z12nTOAiEApK51lkio4hEBrR4d1+J+Am6szJh+FYx4SDSTv6o5RJ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":838610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePHLzCRA9TVsSAnZWagAA8KcP/j3tgByKNpqrlrsFAq64\nJUfqpAUpMrCNEeiefDglMukpeePE3U1SkaG6DYzQj9dn9Fx9q5Ts8EXIC3sd\nNBAAikdETppWcTMK42zZKGpQohmPIIZxy9AaoduzhAjUkLL1yXT72SNj78iY\nDzynV2T1a3kqVRDEJqkUar6tBaeIPcXzTJfV/MMxtG9SF0qRbZXFRH7uzRUW\nqSiU84kJtRyiIGomOAjvwa5EyVfr4VBqWQ3avl/dIeu3UwhQE+MaNiQprRJi\njM010G4HiW/WisxrW/4Ej2k4PAVtvAjOPdO343RQcIxZ25ZKkNsCjTyRob48\nogjNkJi/uwnak194H+bqYz/9kKaACz3eTE2v0W7vLNCOpNE8RpJOGRxArZEA\nXbzg3y9Q5nf8T1BKJKXp2P/E/6d2PCE9nOBkUjdJKlLxYwIRz7L6f8M4PKQL\nb1rpcnCUwcDkyZmK5KDYgVYUug+XfvySzD0kLHeXf7z1uo6vzx+lXa5SZ5Ne\nmWc55P7ISC+nFiORxG4Bz0ZN/kTvu3BM/NQC01gFGlOiEAw1SNtPTNTPHabl\nEz6WIv54xqmX1Hq1En9phNatJ0Q4xr6xvtyAsYx5wCHRb9lzqNDuFyPfvGXl\nAMZT3Oh9NU2G3IygfKfGhrmcloy+i/ltnac4s2NF1kLiltwBujmHuL7BkMYR\n5kDi\r\n=E9Kw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"e7d9bd731240476ea19530b2bc7ec66b70901402","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.5","@apollosproject/server-core":"^1.3.0-beta.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.5","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.5"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-beta.5_1581019891391_0.6410093929832323","host":"s3://npm-registry-packages"}},"1.3.0-alpha.19":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.19","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.19","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"73441e8c50bc55ceafcffa43d8eda3af8cc7d2a3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.19.tgz","fileCount":71,"integrity":"sha512-dxuo8xFoBJD1Aqs9VbO75Hxao/idhD1pjXDXJBQTUjqhzl5OhA2zo6d6SzdRL7Y+jun3PVvrP8AxU0dnLEeyWg==","signatures":[{"sig":"MEUCIQCXZ6cYNjTppspEOWMANih91uPL+Y1389t3NVvsfQyKNwIgbLvUBkdeAwnfOOc4OgNGElHQndmcPv3vETer7++KMjA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":838660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePINoCRA9TVsSAnZWagAASiIP/ihDniGWNfr4zzUf51zz\ni2zT0/fBxJ5z30K+6L7pcSC98DXceylZ7Qozkg1NKw3sc4RZ0CXk4V0Inla0\nylWc9rzrcg3BtLJWcRbLfTPoEFhpzXBPphyTHyPRs8ilBvOjRaI7p8XztpE1\nEjYp7ZSx+mY75kEl8O0906ySpQDpHv2fVMo1Snt0ISX9EwGDriRA8KARf0g8\nx1HE3bF3Ve1MRilC3OKxO7efP1jF7dzXjokPN2NaYOiYDJjOqL2wY2mnCZ3C\n2C3RRDEdJte6I7aN5Zse+gMowFKs4BOv4gbrm7NbTmSS23PBsXvJDT9A7HVk\niIJVxySOgNjtnj8wgXChMBEdRJd9UihuK+VpfnlfY6pXyV5y1WPuDxTWG2t7\nVpz9NDJht1CbRzEPHZFy9YDMyy9zUmwxu9DEmvB/4Z0akn5ite9cRnpIqNJn\nnQbvCLzoOivpVg1wOLt3yq5iVZ493VO41XmxvXApucD74GUB/LrFz2xrjFnw\nTabkDVnGzxm14MqkcUZRSI5bb0eIdSDJZ+cm2rHU76+dIwuT3fjcbGWhWFq0\nuXDePEnHvq9R3b2H8KVUCN7of5GVWcA9o4XkOfB8wzUR6+Nha3/akltdULEF\n+ypiJjBTR6YyVMMqJKYQYbNlc7RwJINQlQ/A1b43WvlTwhbWLW6Qjk49ozRb\nHj+p\r\n=XW4o\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"16e8033ba27b8133042f1cf77a4a1982f2c48478","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.19+16e8033","@apollosproject/server-core":"^1.3.0-alpha.19+16e8033"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-alpha.19+16e8033","@apollosproject/apollo-server-env-mock":"^1.3.0-alpha.19+16e8033"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.19_1581024103603_0.3944510157829364","host":"s3://npm-registry-packages"}},"1.3.0-alpha.1":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.1","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9a584c6a73d0ac99fa65eb06acaff0104ad06c3c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.1.tgz","fileCount":71,"integrity":"sha512-Vss9u9PLQUw/VXiNeTkUFGvAltogQ9Rie5qxYWMGmork76eSaY6nohRo0QD1vwDr3YlpCMKJT/HufCPSxjG5+w==","signatures":[{"sig":"MEQCIBwcfJu0fQ+3aK22eboVkVVAw8casXuApAmKrqM8mb0zAiALbDAfOHsD3xZn3Wt1gAKGBQfcC/K3Qa/fY0tG9Z+0WQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":838628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRFJtCRA9TVsSAnZWagAAsJsP/RZBEygPssEyWGIJ3d27\nh0QoTM/iWkUZRaetp47ji2Y3v5dVRbnf76+de7kpXSb9C9EilyB1O+C5j8ee\n3pSrdGUi/DVMbR82Z0eDiMnv84AXVHJjCHL7v7ImOwVwIi30BMBJM1KyRVcD\nGgLW3zILkQrMBwuaEg+IEYA6MOl0ouL+h2CIRURGhTzK6K8gQ2dOjMqIeuz2\nEgHHZfQnYJiJqEuxlik8Z2Kl7mTnl3I663TL/WGzT5SopHitlmz+ziPau0gX\npJAmRSAgTan7naeDXAfwU7gLbzvwUKKwd7IY5PTzCRpqQB4D9dDUQnEq02DX\nQQWoIWbjbr3Ba3zxkzOsLxeLKrkeL228dpW2etMOb9r2tRP1Q8yTWAPWlo/E\nmemY1r66hn8v/qyxGf0m9KDKUF54lCrFV2VkSvDaxwn+zTl4MMcnRn9cHPai\nrNBcDoMNcoaFoOLbyfyrHgxGmLj8s07JBft1OMlrX9u6qU30iI1IBYBG30WH\npDxnMWSCKZuQtN4NPoOxggOq4s477nwFKmZ2RpMc/97/ax2jrm/oc6btNg3Q\nLEve4y1MiJvzjNczCVhemrEVNbFIT9zYk1PIogPTJs6ZIbqPrnEgu3STpD0s\n/PXghqcLAsApiGsUz4kYZApHx0p/qb7PTC3T37ARMFGSUaALrMBKymp6XAed\nY12m\r\n=YKCr\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"c308a6cb7df9ccc44e65d73c3a9a0dfaf10b951a","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.5","@apollosproject/server-core":"^1.3.0-alpha.1+c308a6c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.5","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.5"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.1_1581535852852_0.3227547969503093","host":"s3://npm-registry-packages"}},"1.3.0-beta.6":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-beta.6","_id":"@apollosproject/data-connector-rock@1.3.0-beta.6","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"d37aeeaa22594aca462c1e57e2202a249d7f8069","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-beta.6.tgz","fileCount":71,"integrity":"sha512-0wHorn1YzsDyjZtx02VPOHHFBByHTzxCfpm9H8w3CE0L43A3X7rOvWZVZYTWPRHIN+XtglBKsROlHtbq4cIviA==","signatures":[{"sig":"MEQCIE7S4aHFeNpA6sc1jbp02QYDjjHNIts9pPl1vPtC40A4AiB7cldz2Ifcx+sn+hUvqy0lgGwH7N/4Fjw7xZMimY2Ptg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":838610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTV72CRA9TVsSAnZWagAAyqgQAIJPAaNxHAJMLRzhACNJ\nbTgAkUgvo/sEDBsjqFPJzzUKvWCe0Kp5uR/IQ26Y0tysUKtHZZzbss32T4/T\nycHkeSdAre/nX+hUnaeUyxyti3bt1qf1VJD7EQd/dNOLfh3hIhe3KtWMz8qC\nIXSHBC8CXQAnE/yRW7wUDkEE/L82lEc2Uas7dXi2J1HEquXG1uWiyg/XPqrq\nFYpjCPPsl0Jji3YV5Ln9lOl89bmQGZVEA90YzOG+8GqkBSQRP9sieAk3qnrx\nJmBA4DvQt+uej6Y9ER7osf2oHhn4FR3fjyAu0MLDWhhHlpP+Bq56eL7E3cNV\n74AA5G49ZtBeWCcKEAyheJ65DcmzChEbpKhE8jW2mjJ2x6Ssryo309WpyofT\n8YRwYV+c/W0vv16Fmcr49BglCfnGtPrbMJvNlX76E2uHbI4osCgqvxLWrutB\nP6xfPNRy8k7rclhBJUZLV5BgKHAGR/88d1c+2AKYWqM1VA7g+chCC/lIgKlu\ndGDcil2Nd5I3/TU6F0H9NlI++7Q8TvTK+CvWMvv6Ycj68lLGtTTsvBtuDLuh\nUjOhydXsUNPeNixMCyHDl7ne9ZKb7SrwWZsKua9pu0JDVgE+DL/GjCms6GqR\nlJhaGrI0jUXcBo4+t4hzywK5xHXtIiweLHR1M1UiKrUSj/KtDiimjOFqngMW\nx+g/\r\n=99Oh\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"1a822d0545c45ceb655b1ce8b19b03b842ad4d14","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-beta.6","@apollosproject/server-core":"^1.3.0-beta.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-beta.6","@apollosproject/apollo-server-env-mock":"^1.3.0-beta.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-beta.6_1582128886116_0.09609841876004976","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@apollosproject/data-connector-rock","version":"1.3.0","_id":"@apollosproject/data-connector-rock@1.3.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"bec86c670e6579f2b16334ded17b57d8c44efdbe","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0.tgz","fileCount":71,"integrity":"sha512-sfCYUki24Otvhc13Cv0SxNLurHsz3pilqEyHmMIMSmPdNe/+fMpelBW4sHLFLW0KK8ETttp6PP1BP22c2bhFMg==","signatures":[{"sig":"MEUCIDdWrh5mykzRTp4NACImsV6scBoC+j/5IiQEzKUjvFgvAiEAk43lS1gbCzcvk0Y66Q/fCMNCd5WX46e8pFR9sY28a4U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":839615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYUAgCRA9TVsSAnZWagAAvswP/2g5vlQfVrzz93v/vqU/\nUhWaTYtHh8GovB/XXqBvE+QpUt7Yfav+FHpCpbKoiAP9zwi0zRFkYUouOu+U\nxFRPHElzQxsTbDz0X6lqngyNW+b8Tc0XBt/MlEsgbBAHPJ26HgDbhutsEqVe\nntRs/EGMd87XcvS4+bVJy2iAX3/VKMlpRjggtEZP6ExcaslL0LWT9hNljGl6\nUK/9qkry2v7zrGdqnmhKnOSw0qOEW4jydrCje3x1P1lPwV7V5bG4LUVHpbGX\nFr6rEOQ2TzCGPgzrok2mjBivxJf5GubFjjckRHjnAkZ/XHway54PiFgApu/T\nKHwIjHA/Enqi8SWI7hmtIIY1quOIxvWzwhtlVRRa6L0DcG+G/cZ8CCYVW6bZ\nG7NpgWx0xyhbAK5j9DmGV+DndzBPIZGGjRHKnWiE3V2pwePHSXC1mT+WB6XN\nWdPKqezXnlJx/nAeBBepxxkpy0AMVJUJ2HzcfEde1Zexl1+bvDU1RYazT3EL\nKuOPCvJaTQv5cueoHlLmnpPgBVuUKll1JVd85wW554uKWFTzRXvoml/sNPxt\nS27fblpLY2XTojcZZgkQ6Y8DPYiM5TpVjQA64g4VMWeVmMqAXs/+/GtbuWHo\nLu3Myw1ETG4/rw+Kt3b9DXtr4sY2L+iQAWeANcHWDFdMFcv+wIwJWaOp9tWB\nVQcq\r\n=mvw7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"aa1df181f575995941c9f879e45c88bf72a84150","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0","@apollosproject/server-core":"^1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0_1583431711672_0.6122756594657899","host":"s3://npm-registry-packages"}},"1.3.0-alpha.21":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.21","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.21","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"58d101fb4774676090f1abe97bfe980ccf1ef2e3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.21.tgz","fileCount":72,"integrity":"sha512-Durq7OJm0fFD3e1nbL6yNLsgTpLJcLdSunVQOdCxHkY+gKZTaqChElcFyYu4MnF2oT+H/Fr2B6OHKD1PHVP1SA==","signatures":[{"sig":"MEUCIQCc0IM3UE+zoT9LDTguOrOhmLqj5xLRL9Muhhe+y7MK4gIgFNRdhL6pFEkCwbucj5DdDEB/xKSwUJSWhOweSnhjtKo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":855745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaQmuCRA9TVsSAnZWagAAWhcP/jVzzBVV5sIEK/JbkkMp\nf+W/d+pddlyt89P9D6c+n3bkqRARInA9T4/W/C+8lAAzXz1cUel3oUUSBGfS\nOL4ldj+buUMhFNLXT+PbC7Nv7z4QNSyESnZRv1l4rPu72Xsz5vU9R4/mMf8g\nU5Z7ABFJj5r3gGyWMyvNQT0XQVHQ+/ThPlS5GPS3ZB2m5wOMyPwPHpmvhM/6\n++1kIAbI6UEpZ5+rZYZIJuLyOQjigYHstOFDQhSdh7JbtFcN5LvF0fbPtKRG\nu4R1ZA4ggQmQXs6io9L91+yeDHxD0WV2f4RmIrlPGR5leh/2TZlzWqRKN+54\nif/nNs8gOnMbkbUHLg0HtoBayZXRLCvvhyUJr+tgJvl90/EA0OCXKc7463/h\nqW5w9b9sz+yNXHQbwMrALTe7sZYDC4cnb9E9H5nxO9oUWjGdf3pS9RL4LfO3\nMQ76CnCG3imKpDGvFsYzhJprAZWQgaQ0MjeHK0rcHkO0K5wHl/EE/VN+HXRN\nOEO1K3zHuA3nrAMMyAgP1DudrSfWVwsyemM0grGNDAUlREVUD/h10wZj1UHi\nFQh8d5RRgQEik+6fHCoIce0R7Dy7q7hER184CgeWADP7UgyhN032HoG/NSq6\ns72Kd+uU2OFH4QvaWGsOh1woa48ImPBSyHGHOF4ZOSj2wSq8G9QEP1u2a6Yt\nfHp7\r\n=kwol\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"1fc1478dcdd411c3a56c58346c7db3eb0c8b49b1","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.21+1fc1478","@apollosproject/server-core":"^1.3.0-alpha.21+1fc1478"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"0.13.2","apollo-server":"^2.5.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.21_1583942062080_0.04531648245938236","host":"s3://npm-registry-packages"}},"1.3.0-alpha.22":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.22","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.22","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"50e96dff540e381cb2cf08ad0a505930c4714101","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.22.tgz","fileCount":72,"integrity":"sha512-xFgfN0PzhsDX6XARPhhfb00HgUFmVCSQ+o3MYOGoTTE6DMmHa5n4YeB+NlsPCZk0SF3CXl9e1o8vo30mfywuMA==","signatures":[{"sig":"MEYCIQCapGndJFZY7dcp3nkcPeCY1k3ssKvujicGQsh5LaxOqQIhALjVzL/dTpUIErYvH71v5pDim1Z1xkrs88AhXiR8t/hW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":855746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaT2zCRA9TVsSAnZWagAAFDYQAKPPBGAepuGf9FKXCBbP\n3HKDbDYhGqDiMXJWjsJolPL7ocYdP8/S61lEtj+U5yn5QxgqxcWiOfHY6Q/s\nS84elH5TM3nlSpWEAQy23ytS111MOnQVyrQc22RSqZJ/5CH+vfjj0196MOUS\niMm/cqUWLDhrLz91oClThtwZ/Sfxo09WknfdfPL1/4ur/MZeY361+N1sqpU0\nG/WLIg5Fmec4irrVkBWKXoqkUPoeC+iyiGzNL8XPDPw+Z0SUt5oxkNhgJ37u\nKkbskzAdO4xDMCoOLpCOHpiTGKHcJS5fFo1SL/4miz/ZPuFyY8AzFqNM30Mz\nGowuoUys9VoIAhsDE6p8frtcQ9SVv1dQ4nomKRgv55vfbw5X1urwWkjpJRZ2\nZZ6n9wBTHiI88WYK9fvvgmXuwasKfZSVAlRQHRFOQkLWrcW3wlSuF0ZKT/zJ\nkjuT3olA+eq7k5fZuIVbndwfGeKA9fMSeEDKPCefdV68vlHpS1RttEiF2L90\nTPyzSeurZ59NC481CMWjzF3BcL0IWKS/jgKWDUfK3gGb/E6IkyHYuoFD1MeV\nfLjveYmf1DimETOyQtKAEYvqWk2N9k8XYUm8tjgpxkY8AGUGkRQNt0N9ULzw\n77GywjLB3gUTDS0QSwDlK7KvWpxKzDvKXibab2t4Mas2Anu9g/QhJwSzZUSK\n9eSE\r\n=TKIV\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"36aeb1238b09c74282303e2b1e1ddedeab9cdb8f","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.11.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.11.2","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.22+36aeb12","@apollosproject/server-core":"^1.3.0-alpha.22+36aeb12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.22_1583955379116_0.5406603370750123","host":"s3://npm-registry-packages"}},"1.3.0-alpha.23":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.23","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.23","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"d60a1a6f7f0adcebef9136156f38f3ff9c6871bb","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.23.tgz","fileCount":72,"integrity":"sha512-BrqXFwG1+LOQi58LEhMFI8C8Q8QCAamqICA9G2QI/UYMRcEjHFHNLG4M4FhN8Ld3Qojg2FpQ5zKbjOgOt7LdpA==","signatures":[{"sig":"MEUCIQD8szjv3QbA4ce1s0Y7VYQGzUdRiSV6EKrFtbbdUNqZmwIgJxQv/l/IwnKhS4BOMSQliYODAsoKZ2B1n7IHeMBy/gU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":855780,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea9XVCRA9TVsSAnZWagAAFqAP/RqyQGuVnGN8u4wXLs6P\nU8UoedKZU6FQSYWkvxvYg4TzfZpBnx5cPnbAUzw+xiTj1qhdYy0lkoOCYMfH\nxz6fB5xXqfxbPgfKh8OZiCgD4HaAACEIvcoFat0m0Olew+1D4Jl0I+/G1KQj\n6culloXJ3m/ei/uQ1wGntyenQj3iRyti3vl10fyrbHRoouQRgNUKHxHj0QwK\ngYqTn/f/FdpVNZ/CeBXvr/vZ0GnkI33t8EKgKchZW7jexnZZ4eRQqm9IsZ6i\n60X6FJu82wyCgXqbMw6jvSqEpoGj554toIxRydJyS6rI0QZLEuS3ubpF9a55\nKH/bh4ryJhkcyWF9TWKhh+P8O/B5lcdUskUExLlKkNLjdK9lDE95BYQvRfDY\nLbpL7uRaXk0AIpiFV/fWzK9TElyaaJHw1TtLffOnH47oXwOMFuHDDFGlas2v\n8FwiFpnhTUUabgVGPFnxSvxze9uNaqujbP3+7dG9CxEzoPLl+eDv38kFhVMK\n7jFM6HOtjBOOlpFsi3KwVfNefkpKCkh47UAu89m3tTaNZ3uxWbsAMvhK+qpd\nUchu33P03VbIKLoSl7OrTD6KX1xcjPcGh8qldi8ZljR3pqn802pMIAP2yetW\nVmOJmVhDPGeWwvg3/2TSk2WNb8ydmrvPo0b82OJMFbcx9MPgtmeWUOodwuv6\n0WUw\r\n=lLzS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"d114e1c5e19229aa95f88e787c10f7e7be82c217","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.23+d114e1c","@apollosproject/server-core":"^1.3.0-alpha.23+d114e1c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0-alpha.23+d114e1c","@apollosproject/apollo-server-env-mock":"^1.3.0-alpha.23+d114e1c"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.23_1584125396639_0.36259594883543533","host":"s3://npm-registry-packages"}},"1.3.0-alpha.24":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.24","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.24","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"304b6c65ffd4f069ed31a824685e2dc0d1aa2711","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.24.tgz","fileCount":72,"integrity":"sha512-gj9APrGlKth3W1HmUylIGVae/snP1mxkqgPA5rvcCsszTF5Jm0Ml+RTV4uNLuy9U+FGyxK/5Ksi92TsIT6z3mw==","signatures":[{"sig":"MEQCIFsFxkq1lmkbIAV8+EuvJpViSPbudvTgeyCEtEJvymJeAiAqsm6XvAu34u1qqnCUXu9gIY9QwpM0+/BIbY6JYPSspg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":855746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecFPxCRA9TVsSAnZWagAAePQP/3VpWqlh+KNTaItMB0pT\nYilvVCy6KQxRVjWKIzl0nqaRmTeIdVvj2R8fQ0cZJzeMtfe80Oyw/I96HMHW\nbI6PRRIxEiENRpEEz5Hsl0+sF9jFPcaImBa22K0Ea7hjp/imrlYZwXqKEhMm\n0PhnYiaRMS2aEbJ8MTpYHN3p+JxxPCYYaXaCXRTH0LTgI4Rt9NqUr/FQE+a/\nIct+e6/FB5FTNydWBzq4tQSjBKVv8EAq6ThKGoiLV0dOc2cdh6qYsby+xmin\nY7QiUHN+UJ0vBw4o8HNc8i+RXZruOI/866ECT82gmTuxF+kF0uf0g2EqcRSZ\nv7ASNpdJz+pEBAaJ+io2989FI8qsNS8uThYPXuYlqx4Mfgl9nhIg/iL6Kjvl\n0RQsK1x8bt8TkUtB+WHhFJywsH6cE3YZlGqjqIcTsRgNJC32qeYpwfNM9ppH\nfaaJnLFR9oCZpIagkiVjCER5k5UBbrh7fgX0YB2p3TgEKINgmKCqctMI3cEk\nM6sqbxrDdp9Opgh5EiHuSOZESBZBwPk2m8dkXa00yTRsK48X6TJAFLxYop6x\nxnrHZVQQRh5xTphurXibIZMJnFYgIAPv9KSwG7+qtPpBGfI4ZlvenAGFm8iH\nHT34O4IFdda1R7Q0wFLY5KXjeHVZs6bRQuHJ+Gk/QYlUoObqQTY7ShXw4wgA\nQ5wy\r\n=73R3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"ed1579e630b10412fd3025ced9c66e0e3bc2be7d","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.24+ed1579e","@apollosproject/server-core":"^1.3.0-alpha.24+ed1579e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.24_1584419824764_0.35505782822312515","host":"s3://npm-registry-packages"}},"1.3.0-alpha.30":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.30","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.30","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"139ec418549bd0e0699c61b1f91b6fbb169287a9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.30.tgz","fileCount":72,"integrity":"sha512-bbPsaIlf0FE3gQrm9+PTb/YJITZeXj45S3kcPY0dKdRAifoW2SZsYXyzAWD88BFDegjp8vjqsheUGrzIzHCpKw==","signatures":[{"sig":"MEYCIQDlx0UHA7a5VxDIQhkCoQFiAQiScRYUWArGM4EdUC4pEwIhAImtYSGdVAc4dkned3GZbSRAxpPDOsC/snD0X5djrwV7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":889729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedO/eCRA9TVsSAnZWagAAwlcQAJlECsXpV7d0XorFxnuL\n9TIRwyUTfVtSSJ88OJthJTHn/qYvrAKfHxj7RPQfK04404OOibwIcr2Bsmaz\nOUWAw4S1ORthtxAlm4mY0gZ2gAa26+a5tXhSxack7pgcmg0wR1E1eu/h+wFE\nJeKC1rDMdNlzSN9ulE3ZDg/rnt6+a6/W/mSOvpa21vpR8cXnUkCxL/T+vhUV\n2vntVxPhkEhHpE7E0xVwh1whjTgiiJkrmLpRhIsgJEqPHihkU9lcM1qdPC40\nMqlO1qLI8LYRhq9uJP7P4mZmrf5sZgQb8ZEpwtRKfr+nek609rBNJcqDQKd2\nRuB9IREThgqXFsGulSwAWGv2qaqhH3130TeMop261dTvNILmWmiMZ5JLq3aw\ndLcYnnEa3RLbTUWbOXQuwIQyy0g419dFFGuOWSq5k1dQb3OiYnNaa1qMPmly\np7OhvRxBtBhMvIZgDd/RqrjABWcv70OpLEx8AtjmyBMN+1M1ml8HaIQEx1gf\n72QV1vcjhFVoM5dVJD/8rk3r889Hs9djDoAhjus+oYUQKyFsrCAV4BZ3AB79\ntVBMqILwJ17v0SCShKNxPRJaWIVPvvI/b1d1Ux/nT7J7A/+kI5+YNuwK2r4b\n8WWS26zUuCnKQE4U5SVfEtXfz1OO+W1GAJZsHDorqMHkaIAu32DUPCbke7FE\nCcon\r\n=ZMxU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"84fcaeca2b9ecc31dc1de4dfa9b8c88b3f726774","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0","@apollosproject/server-core":"^1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.30_1584721885882_0.8689749404558058","host":"s3://npm-registry-packages"}},"1.3.0-alpha.31":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.31","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.31","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9748b8bc8e61fcf2ea442d5d9d9ea1f270c6bcba","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.31.tgz","fileCount":72,"integrity":"sha512-DrCciiyGzk3fZjmwrBUHkJGk6VgOfD28FsaQwlZbSoDIAmJO7ujIpjqC2ZR5+mHn9XeNpwFgHrRKZizSJ9VrlA==","signatures":[{"sig":"MEUCIAfmssUn9yOTtjU6pLjwQlUmm3HFCky7c8B0s+Q7RPy9AiEAkkZcJXA2XpXt16zKazOzT5uQjaUwRPi2PU5WqxuahCE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":907917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJedQDgCRA9TVsSAnZWagAAFkIP+wZbqH9ufMWEYYb3ao+n\nA5xYzZVoM8J0eWPh9PESatMJflzpDKAs4SiJlkZdqslg3Icxgu104wohJEJk\n5VLzn4P0ypOez7ukm7f8Ji2NNc1KuZ27ZHgpHWyzvtHhlRzIuF2uNV5x+zFK\nv1HwLtdw+gKQpgwqoeQpPmfPYIfIHszpQDOcTZQrHnixI39awLBtYPvjvBwh\nvrUoU4mE4ugxwWhzIyhQ38yqIxU5Hr/7jvcEWkf0ytmeDKLbVsRW0XmHe5wR\nztUcTbTd19Eea4r9JYGhZRDMXC6agmtDyS9uncMaAUDfL70r3zi71GFFe3G0\n1TiZPtOCHpWuoxm46dUVFRFGC+8H7+oCymsj2Qzfmwesh/zQAVL4ruAnUY4Q\nmMZX4/t7B41sbabzSBfRfZdd2Io3b+IsJ9ujiu53HwbNzng1dIw3Y3OBJAoL\ngJ9hudB0Tmy+cz4Tk6IZivT9uVvpaMeGeudTS6VaikfTOAXbibNkQs3adymq\niByEuzj4AdQBlqLLf1oYh9ofnWJdJ0TIsALC04bmY4ORBbDV7ZbIMiLh9vyq\nde41cMwNOSHFVxNZW51AvDEvQY6t5iPknVA6Hoyx7BlnMEvY0R3FwpmyfUe+\nLiuipdGKDm26p8Ej1D6pa5idpU+ATmJXJ5wMTAkhpOWS6I1fz7GTLMjFipQm\nsOEd\r\n=oS9W\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"412bdb6e0d8278d438bacd8bbebb11fb21440813","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.31+412bdb6","@apollosproject/server-core":"^1.3.0-alpha.31+412bdb6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.31_1584726240429_0.7631554931796263","host":"s3://npm-registry-packages"}},"1.3.0-alpha.33":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.33","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.33","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"097efe29f183bf1a258c463920bacf726c132ea2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.33.tgz","fileCount":72,"integrity":"sha512-bdBbU2kdZNwz0ai20rUKGHQZ2fzK63Pocm1U74+I7Vg6+mtJldccAQQDgdXHrmyRrIey7fb2Jd0nzriqzxtqvg==","signatures":[{"sig":"MEQCIHfCboyjDxfmq6N6yCpm99CL26JsV9upOmm0g4mg4/I9AiAyVqxdGaYiijkSsdkDn9dTsOrQ+k2PVJLWBQyxo9rEyw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":914416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeff8kCRA9TVsSAnZWagAA/uYP/iEX6rxLAA5fTxkvf6Zw\n/Ct8oQNo9NaEmxIjSjoCYKbrU7y1r2LiC1rk5K3owHFUM9SjJ3S8ylm8KZle\nJAgaEKyMN9NPwUy2rxfxYb+DKJFASFhb+gak6qmIfsljFC98d60ygTq31bqw\n0S35T2ZCjo9eivoaNV4wh+fk3MNs/RORuRg8n5W7rmiIUL9tEQHCdg+4bnHC\n3YIP2pfSNNQGlXL4pHq3/QvyZtbY/32YV8hiKN4SU03tC+iM+Gpn4rAYlQUe\ncRcvV/VJ/Oe63OPzzkopvadblbVTJqRQdJAN+EDCocHBFW/ponJ4XWWdHNT4\n/JHX4T0aaDxNEkng/E7ZcckZVi4QsFuyvnxeoKFsl6WaqxeWk2VQNsnbhY2s\nHBVDj73EcbI81v/lEXlUbtjEVZpOhQZnvdEFz++D/FO7/TaYC1zL/Ks2cdyy\n4wU5iS82wdI2FeUuIZfTaFEn/bATJ0HmJxP+aNNx20i8U8Hjj9IqqWM+1bzG\na0KRA9ZTFcCfuoBfppDQ67MOiRlS0cd/EgiDoRoy7RG1Gb9YgW+/WWxFmhme\nHNxklMOQadQvUSxkNy8gQXOn2lx23dsdpoyYr56usdRbuQsbi0eguqHvKHEc\n4ohTIm8KG1xuPJaYnpdhrvCfirTRn2qllMC9VR5xDvpiVBikqutt/MDFsnSE\nQfs3\r\n=pA8l\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"b75278a36d14b1a7d06f04f2f0b6cab364ec31a7","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.33+b75278a","@apollosproject/server-core":"^1.3.0-alpha.33+b75278a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.33_1585315620269_0.880307264728251","host":"s3://npm-registry-packages"}},"1.3.0-alpha.34":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.34","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.34","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"452905c694b0cd513b999cb973548fdd173d5693","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.34.tgz","fileCount":72,"integrity":"sha512-Ja75JQ/xVzhpk0cJe53h83cTuzxST3iJqsvWSRRwEqYG4KMrAgue5q55z7TyfkHY0U8Y0ZXD82IBmFtU6WEh0g==","signatures":[{"sig":"MEQCIHXRx15bELXUV5M/0mYm/1EfjxSfd4p11iGJXmaKQfRWAiBRgLx8o1aWBdqBkjlXP2U7Xmlj6of9YRdXuDguu781YA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":914995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefhU9CRA9TVsSAnZWagAA96oP/iOmhmZm96cuimfBgq89\nXwBHaxD3/2iAKiZQTlj81PlYAMUNQGBZYrbu03w9NQ+nzZsGrWCUukUNuX0D\nD05wiKFslisknLOSrPTRuGH8kJgWOhTV74N8en2Q0/Ta4pbrmlGQlzee0FA5\n4PCEev4qv0rkUPLgrQ0/FcmZ8RXdpA+XSB7c87BTnNCbxrZSKRbu4SGYPoSu\nL1tnyo8V9KndLRI+WCo6imyO0Fh/WFMEt8vxGj2MWd/A7nrCSUHT2eMW9jXC\nwjvoKhzzFIPn6YMQdKKNbV+JMpxbU3YvrVzohZcyazkHdmxhj6fCtIeh60Xc\nmknakxKDlOGpiYBh71m19HXeUR8cJS2RQ1YcpMGRiwBVyQdAcYBV6gCStGMk\netWBfcsDoyd8np2qGDFEj6dz2MCyRkPYO0wJq4JpwUWvpvH7/fAstihOUSWV\nO5qISWma+Gzplk53Rha7OlF8BE77vmx/SIrk+hRoxKmCyGsHmCun582OLSL9\nFpS7so4euSfc/s5Ye6n26FpJ2RLZPkIlg2o2DH+rZJDHU86Iej2dIgsb8eMa\n4rcygN9ragANrFT+rzuVa/4kEFBokhZcRgLtpm0jyZacvb2G0TmCPHxLPTfq\nmQG0PBUkUG3lJ/WWStv7jBv5GW0GCv+CTSBa2fEsVJDXDnsY+dFPjjeUQj/i\nurZk\r\n=y/XW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"79085b6f563649661b2513a48a63231169328e26","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0","@apollosproject/server-core":"^1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.34_1585321276957_0.9132060542399336","host":"s3://npm-registry-packages"}},"1.3.0-alpha.36":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.36","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.36","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"62e6f6d56e0301b1f19a48e127fd43f15a0e19ff","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.36.tgz","fileCount":72,"integrity":"sha512-fDzpDVbiXQIvGTDhJWh0AIS0801SCqa428SKxixgdUH2yaxXbvpAIcYdU9MtiElOzyE1jGqc/L7n1eIslWYYKg==","signatures":[{"sig":"MEUCIGudYsTUtywVq9Z3P8llWWG4C0iZYa7p2p5ppfOI35e2AiEA0EVD/kSEfPOQnZkWv8d+Q+tYJytIjnWPFLdqoZfnUF4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":928277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeg6R/CRA9TVsSAnZWagAAEqMP/0jFYXQUXwNlQlnatHa8\nK4cI8yb4kAnfWqz37cQU/1hBFqeo4tIVwZojQn1mPr6LAGb6CAeqHmjq8gjc\nFXw3LC4j1OkDI8qLHwIWZkxMk/+P/9y7BAoHJ5QmWWwpPEPEUQKfnOkNKzy7\nwZRCfiGFlAj4whOgdQcs86gicwPNgcsCKPlNJh/MP2tvEH9k6OAtY6bB1Kgi\n/9sjiJ2mDzySwCgbBQPkdyRHCq+Y+Jq2ZODT7yYbQ1rLbdwhANKirTP+wf3U\neFke90UHZWSLttGZ8mPk73amjVZUP+Cunvg0IVd3qu8mangG0XWCjpd/gINO\ndELSD7Wzz2NDmz+fjPJPv+vENKBTCWTj122kLSa3+zhhcGmwboevcO0JfEe6\nMTWXSArT3ct1EqXGptVfEnteQbXLPYDq6LjqR4s9PM28Pi4EmSLrS0YMof47\nn+cSXa6ZK0lDQ0Ld8k4IJTs/R43uiLd3yBAHpnzQ/YGLEIpWM3qU7cFK1ZR5\n3Z49ezqN5j16E2Hcn3J9qYjdLcp44I+eV8p9cvBFKNdn3Y/Q95ZZrQ1U7Aez\n77kvTo7pUtzq2yUj7A35B4F1prO+YNDEICWEPM65rXJjWQi4MCK1+DKpTLyV\nPHCTwxcHplrJGIAg5kj3YAHDEGXsiGp2ZyXU7vaUqh9dlhJrWwuxZ1Mteqix\ngYfX\r\n=uHB0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"ab942980d47991917257f96733d2d876b384735b","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.36+ab94298","@apollosproject/server-core":"^1.3.0-alpha.36+ab94298"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.36_1585685630785_0.04024880761458527","host":"s3://npm-registry-packages"}},"1.3.0-alpha.38":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.38","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.38","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"10fcdd28dfcefc5b4c3545dc67e65ef88b0dad66","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.38.tgz","fileCount":72,"integrity":"sha512-ssP2goJC6Lp3NuTV/+1Qu3pV1f7Fiid6ZNXDH2bMTmfxRjmxS3IM7uXCmE//KSe+aNsDdq/uoyO6eVjdLmp6sQ==","signatures":[{"sig":"MEQCICRsM0jf77Oz3SmoHOK9joZqoC32cW5Fg6wXiZNVo/vfAiBeUfjoNfPGPExM6ThJRNyetePuWbyFp81813e5p4EkoA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":928277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehWH6CRA9TVsSAnZWagAAdNEQAJ+VfhfdbqPbev1+fh5B\nwmVQZaagJHj5CGxUNPYB+Is4ns5n3nRPX7qKFjcGORWnwiCxi2UnGqfc7QS0\nGmlHSuZ40YetNxFU1ThrSggvw91V5pFZag8BAJJZ9rwRWPAmHUTuc+w/M92i\nifJqwKvtlwXKe9ooxoHOvwiYWO3RZABdFph0O5X9Hxlqb5zvngGnQD5lDzqg\nVQLxhFn6X7VpgMkJ5RL9BfXwV4AwTlrM7lMDTb8FgPC+bRSsWPczxi7A2iUs\n7C6jTIBcwLQiy5Q08K6qzBIwg5Wu2Pqe5AUJhiGA4Lus+o2bcERobAkKKfIM\n9BClHU9tgCLlwOVN20I5eL6hzTqJ2W2KwawpPhxMRI5VS1QzR/2MpjPMj3Fa\nhqke/iN3d6TsMySZ8MzHV5h10ui3aDNIfWYs/2cr/Wj7Ph+AQaFJ2+CnyYP4\nfUJB9VNDKC1/StFwFKca67GldW/z6UY2hJYgKi4hmt4RVDY25Q0MFaNgugz4\nA30sCzGQX2cfsnxnSDyXzvSIDPM9z9lFuyEI0xtsB7RfANYzGuAmmSwxqrSR\nnbJ3mga6S/aGgUViYmmmLlcrUIlr5d5SQNdX+Mru5fEESnFXLUSXN3xvpopQ\n3yVks5VD2wP4DmXeR//Huylra4fsPe9r7/GzTrqXfd1r6TRvCCg2fCK2+Mkw\nyrtp\r\n=8DNi\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"bab4733f0b94a9a9d6993c8f8d9b07dfcbb6d334","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0-alpha.38+bab4733","@apollosproject/server-core":"^1.3.0-alpha.38+bab4733"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.38_1585799674264_0.005883876503194108","host":"s3://npm-registry-packages"}},"1.3.0-alpha.39":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.39","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.39","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"86786d1ee6fbd795e5efec198bdaa5395e15fbbc","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.39.tgz","fileCount":72,"integrity":"sha512-kwi9RyhI6Ct22bmQyyg5x67NvC93EBkNxIp8GyYSsT2jMNRlXh1eFoR/kxzZVap2ukWxa0vPnaICXc/QM0wEtA==","signatures":[{"sig":"MEYCIQDxDmqcozw+Gg7oJC6DFeF4WN5YXYkBT9u0UxLI64FBFgIhAOgwMSZoKfkos9wkG9niLJqfw00oiOx4ZiFd6W4jdhFW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":940038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehWZuCRA9TVsSAnZWagAAJfMP/jFHUpzR1rJh7br4Miou\nGQe249mfYYs9L1D2oe191EeaYmiN5gaBbyKNQV0HB0cPu7isz/kR7xyc2FAB\n786umrO+bjrRrqK1OvSLksueeNaYFrQv17a3jyN4XLZ4cTx8dyFY/cUoVDTs\nPqsg3LrUJKSiBRrqCL4TgwuQyPMfTuCW2cSnvvQX71QrY/6puED0Q3y/ICSK\nCVAiY/SEMwEaUFQvYHI9avkkxDngROB+X089ap7SiOxKEzoCYSqDkhRzMiJJ\nd+++b7hXL1dcUAgn1dGGnSgNtEaIBTUEq5iwK/0IhjMvuamauoIRCm9Ll0YW\nsDSg9R4i1O/GwoRUWI3KGytKj/tqpjwUgeLlHzTRGbkCA0czkLjKY1EkvMBq\ni17VXJx5LPHCEWz5ggUCZtjlqjxz3bHTbmmgvxOzxC8KF8RPpMKu8EtRHDVC\nAbktjbNTapBnlOdcmGtMIcqvZu3AJtgDKIxTcXJ91nyiT8ivCc9wmhzxounI\noWqDebH++vKf1au3rUjLhfpCm7EL4+PjdNz+vsfxBsm4qtwHcf2G1Bn+ZCs0\nHfw1R+ryX8R1ExeNssMFq4v+T9lDm3QTYcttyVIAccopAnyhTUtp760z53FD\nIe5fdemY6uk1SmRCm5N2vM6qg234SPa60CgyCjffSPYvU3/ybr7ppvnIzQod\nzDX0\r\n=QqVm\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"6d37e012e2f7fde00c6712365ae56633d0ed96a8","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0","@apollosproject/server-core":"^1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.39_1585800813719_0.6164092826433338","host":"s3://npm-registry-packages"}},"1.3.0-alpha.41":{"name":"@apollosproject/data-connector-rock","version":"1.3.0-alpha.41","_id":"@apollosproject/data-connector-rock@1.3.0-alpha.41","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"fb4f440be4e51011547fedd73efb805f6bf1c007","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.0-alpha.41.tgz","fileCount":72,"integrity":"sha512-3WgoiIx/vjFfByz96/xeWZziljiJHYUxtlirVphVrGdRVi7wrK05NqBLp0Pa3YS2BCewom6m6bC1m9nNHaggnA==","signatures":[{"sig":"MEYCIQDynmpqPVFDZuwDif8rdY1ftAhWgFc6qT+kYJHeuZgzKgIhAMVHnfwLPEJXsMoEHwlw15RkWXrrN9oSin0+ZrTsWoh8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":940046,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehg5LCRA9TVsSAnZWagAAn9oP/1DC+FPM9AMjcrOGw5hi\nBOaxbkFDwa8SMwSet7qi1nJ54CiFnwZM3mkosM8HLykz3k+d3dpJdo9e45eY\nu4S4zfd+FdJuJr1HhY4ZGrwEAsh98XNOVhVkNjy2FODIRZIGSHAEjZCoqop1\njMBiEmJMYbuoU4kjpuX/K2zCzUFX0xaAxDkYdXAzDs4S11sJoI3kz2dkWfCw\n7amKLiZwaxVfU9Y5RgrlKZts8ZsNhO055/ohgpALZCZu3IdaX+31ZiVxTLR7\n1J6+NeIIcRoLjvN47JP2921sYjSqR76/NBwA/roPaJp1woRjNGLNSYh8P4dP\nJIOEyVFfz4CLAaQNufVPKA3vtV97QmvuLmz7A45S8rnoFUcAg1nUuGn32jP+\nBp4iyP2szJl+a3oIyiQuLSR2JcNxTJt/Ia+LYeqPERu36TqzUbVNHcUKR6hg\nsFej3gOmF6o93lES833x870Y1uR/S7GaxVUu4V98Qvam/9kLmpT6BYN16n/S\npAyevJKXR+LWjfvWJi7/zvGUclb9gDgIOCmB3sWlZgT/4obFG/R1JAUDAB8l\n7SKMpiZM7NfHGcDisw8r9N7LpiCu0JwSwnQMEYuGU+Qn5LslPY5SX4gYs1hf\n8U9X7Te/CLkgte/Fk6gUs5OSOWIL0w2Eg/q8Y91vhY1kPeZFH5qMKR7xmmwL\n2cLS\r\n=6zCe\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"51826317f16d21a1a0bf5f96041ddab0b13d86e2","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.0","@apollosproject/server-core":"^1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.0","@apollosproject/apollo-server-env-mock":"^1.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.0-alpha.41_1585843786741_0.13072699454060954","host":"s3://npm-registry-packages"}},"1.3.1-beta.0":{"name":"@apollosproject/data-connector-rock","version":"1.3.1-beta.0","_id":"@apollosproject/data-connector-rock@1.3.1-beta.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9724a3bc630f2c3b7a2c3c11b67551ac11ede6ad","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.1-beta.0.tgz","fileCount":72,"integrity":"sha512-PysxGWxXhOUlyceuhnZqnQM8HAnjpJYhRDNHv2FIFqlkS1GHFkmFjtd60HmEuuK8KZTs6Ec9GgfaJ3Y+AgvmOw==","signatures":[{"sig":"MEYCIQD1O3ML+EQMctpYnxMrCgjIj9f063e3L3Gy8HKod1AUZAIhAJDmu/JFbeB1mwlgoZf0J2Uf+EFirLiM9b0by7PgDnV4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":940064,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJei2mbCRA9TVsSAnZWagAAuBQP/1mY8izmNU6/KaCaabiT\nVxMrKPysI25l0PGt+E1JBErGT5LTZMaFwS7CZUoGJkSbG+QhmY6MIR80jd1A\nqYVNnaUa6Y6z5vaGqLOUeXrpmdlwPsxjcKkC2vzN/SleVOiEGa14TVwzokXG\nDwLJQunzay0/gC2lYXZYmcEWzQDxHGJ4DxAtIdRbjL6PdIY9Xr4aZAr4zj0I\nK1ccwmjHC+z+g8k8deF2LJoELYPjDMa7tFrjo4wMJ8Equ0OryfuQCMTHL/Uo\nOAM8Rfd2sP1DKPhphUdaxvU9LeD33fMMIDS8HNCWYp8BURrX2zkgSe4gnsYZ\nuoDgz/9mVEPC/BAZdogb+2EB0VAi7moFEDAenX7gC4UYE/UwEeshWT3gtY6g\nfPmHgPbPpt1i/oshcHTABbUFwLn5gpZ+GK/Hman+Y/w+UEduyB95dIxO4ghL\nXiEScaQUaPFOCoOiDtt0lUGK21YK1mJ3Ga3txk1LIN3XGSCvZsjGedp6QJT+\nKnSbBNtnFH8Sw3Du0F50Uh5iGXHyc72qzGhA6Uk8nV46rgGhgwILKqHvnL54\nzTaaRF2JeW+cUuqgc9a9Rxnh7oDJdbcY4qyrTuhqbLhV2k7nvMVXoTvhYBRf\nXzqlQeT/a5JKwhgM6JG97HVE4s0QZBfmleLHwHm5ynzlld2gxHaWmimDrno/\nhlx+\r\n=QfZR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"91cbdef2f01893967018f8303d86c8c1a8625ec6","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.1-beta.0","@apollosproject/server-core":"^1.3.1-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.1-beta.0","@apollosproject/apollo-server-env-mock":"^1.3.1-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.1-beta.0_1586194842891_0.8722381752415476","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@apollosproject/data-connector-rock","version":"1.3.1","_id":"@apollosproject/data-connector-rock@1.3.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"8f7d1b6e1991f7c08c09f0332461a0f7c1e6a5ea","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.1.tgz","fileCount":72,"integrity":"sha512-Pmf3UYGn1+xBU8Ff6zyhAQIZsF64VvX8i6cACjJXP2A6aKXPD51L9lYzs/+GcXqOHd3vZ1QHUa0j2iZfBUJoBg==","signatures":[{"sig":"MEQCICaOkpCs9vGEIJREYWXkvyUSc1OwgLAM44GRCcS5oToiAiB6xJDjI07uvbWoj2Fyb26jmZ2Kq3G7oXq4vVXLFLdZGw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":941260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelH6mCRA9TVsSAnZWagAATlwP/1XXZg8Z948lkctRuGY5\n9k6pkNd5/qrTbhYjUOWOqaXSOYlg+/k+MeWu9+f6wqMkU+U8tyLkmkBvw1zI\nDVhWMCDS+fezBOtpcM/C4Vud7GaVkyStsSZB4An2DCKh6w2OHQ/OIV0LK/hZ\n/dqm6Y0j81ZrKdELH5Upj0wO0sVbvGh4GRK2HeRlyFAM0V/sy2kkHD2mUJnE\nXkC73GtvxF8lGaH0ac/HYekvEf0BQXc+4Nxww8c5NS0DhriU+N4/wdkTotY1\nAUQSq1X3qR1uyL7/CNYAp5QdJwXegGutNOqqkBxjnFaRUTvhX4xH0nHqwM0u\n6oxpXjz/vJZylEkpVwF+Zh4kfL5uFylSBFHO85/UOn1ragd5RHybRY/xL9cH\nh5xr61y8zoHewlz24W/Mq/fN1y6+TjZv8yT/vR/JTsd0TggHigxaY/lnzryB\nh+2AuIrrrmuA0JyONTOeG7iFgWlKHlRAcF947zJJp5fgMYUI01IjK8zKrOPX\n3dTiR5l44jf2L1FulbH+da28IU9k8k7LoTy5Hpwj751ciCbz+Gl9r7qFZzSe\nPcTVgyfVnjpnJuKV0uY/3sqmoOHb2vKgtR5rQNF+hsz18o5QCxGcifjiEwbz\nkNs+CLXRlL9Dwtp+Vp6iIs4CvFPZVDv5YnzvY6hapCuGSquBVCZ0KWk5vya3\nhDH4\r\n=bkgz\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"0265946d0836a6c9b373a9e07c502eb9f740332a","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.1","@apollosproject/server-core":"^1.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.1","@apollosproject/apollo-server-env-mock":"^1.3.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.1_1586790054103_0.05396731045206393","host":"s3://npm-registry-packages"}},"1.3.2-1.4.0-beta.0.0":{"name":"@apollosproject/data-connector-rock","version":"1.3.2-1.4.0-beta.0.0","_id":"@apollosproject/data-connector-rock@1.3.2-1.4.0-beta.0.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"77fcb13599dba1cedb615992d54e4f3cc9d3ba82","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.2-1.4.0-beta.0.0.tgz","fileCount":72,"integrity":"sha512-ml1YnMbIi+yYOU+0FNtDJQi7vtzXWEyknR76sJu9GU8N1yEFa/XmTWn8ZCtqY01ft16pOQlZ/eKMRbD2J71JBw==","signatures":[{"sig":"MEUCIQDSOI29a6PdGlBVoXV8ulOQYUkGH/9F8cZDWfwYt+MHDAIgRkLp2rDQFJDrJLPKgV00IQkX9itlkWkbpEEInE7VLlA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":946866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelwQQCRA9TVsSAnZWagAAamoQAJ2ZmA8zkInp9IupXjKm\nY30RIDAy1+CGLo+Jog56LlBTSBON8PJYsC+AdvRvOjrJCssM4vTpaN3Xn/kW\n60BTZXL/VqkiJdR/mP08Y7csH4uBK1WFpUPTE4qaG/XYmjoCY4gap6TbjNbD\nU6J5wrvwolDfKdWjUYsG4BQ1HlCuhJJQj9WCv+ktWzwSkWcL0g6gFBxsOkJD\nBSSamEcnlOcJoqj0jFzipZnxWJ2MkbqquGdJGfasGemo907Co33DZq+zUPeP\neddGK+YukCFJjaV9SsIzdEIF+Zyihhdm1DFv+45QzZb0BMKoGtEGtTYYZYyJ\nePlW/zGj8y1XUcOpZqpem6abO0YMkVOAbmV6oqE+cajrCHKsEJWBh6wMhyb+\nq7sSnpYs6XBca8pZoKxbQJia2Xbxz5IohazMQ/P+dfsWcEnzBU7Y65xmD05P\nsPlBS6FfSokTpN6ZG3Jk4rSD0+f7pNjOno8ONzvRFsjMaGzKldl2qCRKsM1p\nJS+EWH6lGzkWCqdY6CLSfZQrtryPRAXOGwQ9lH4bCapRJ9Z/tnpCh3C0T9km\nnXb4mLi+tsaomNfBPbZncELxIf8yiiT1ux1Fy4DHlCFDuSdJDxgR8TZsWV2b\n4uUVQZEZoKuyE2ALl2XCwuwNO9kuHRHxG8EyCsb+WMVjapy8h39amkh1Gh8Y\n6eds\r\n=y+Yg\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"140434179bd91c852b3315f59e9317dd51d410c9","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.2-1.4.0-beta.0.0","@apollosproject/server-core":"^1.3.2-1.4.0-beta.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.2-1.4.0-beta.0.0","@apollosproject/apollo-server-env-mock":"^1.3.2-1.4.0-beta.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.2-1.4.0-beta.0.0_1586955280466_0.6938252469176323","host":"s3://npm-registry-packages"}},"1.4.0-beta.0":{"name":"@apollosproject/data-connector-rock","version":"1.4.0-beta.0","_id":"@apollosproject/data-connector-rock@1.4.0-beta.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"f5c75cd35c1984e2f81ff70f98a4aec2007dedae","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.0-beta.0.tgz","fileCount":72,"integrity":"sha512-G6NPG6ty33NO8lClmik6SVDhBmYhGRsvzH4VJC2mmIlZHbCVHoCsrBN1TSqKlqj4EUiSxuU2kf3/eSCayPCy6w==","signatures":[{"sig":"MEYCIQCUau3c5FsT8AgnANDIxs+UOjHYt0MXZpFTGz5VcFGDiAIhAIcnyUWl00BylQ4a9iSeVjkhl0FGLf2StOicPHkaXadY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":946826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelwURCRA9TVsSAnZWagAAepEQAI8VbBimiOVYYubbsAKx\nSJZchTD9HjoMr0166zs6XktPvEpEusZTGD4eYIqApqc2a4AawEDpbaHpF33s\nyP/wPogRxIab4Yx2wNw2KB4ha4tN7JaoJ6RfjGOZJtv17HTzximroRQIbQ7t\ngM/nwZPgTtXhyphoXp1k+bknmMWHuxMbnehuK8I9wIN7f3b+4OkSFqUHYvig\nsnJohmt9j3AJk4obL8Uki1XD9dsZxCYxcQ9wyTgFeCS/cVdIr3vTzAAv8iRx\nSWOESp/CuucveLUwkXxocQCtTtuYS6LflZLYCSZH+NxUjQQ7tbZ9czYY3TrS\nYudIZm8UzqCkEz/eceSB/R1y6Sqss8GydCY0ZkDuuAcmygIcnSQPFcR5pIqR\nT5es77FPz5fzuHw4T/7oKt+qkL98ZBgiu21SlmDeGsrg4u5vUMwjdx+sxBe1\nV9aMqmszHMOFgT84uOC7zgnQz9MQS7U+XBUrw3y0Zx82s4cUEU5nd1wEQxRU\nqMhySe7cSHrHAGfbqNha/xkNITP5KxLpfmQnjXJ9tLUc9VQGnM5Bc7xP8i+t\nKCsz7c2IAU7mT6jaFtud5k8jf8Y98+DSrzT9alo1qDmcfI5GJFLAjbVFlQ5o\nT+HbYeYAzYwuqzgigK7Nc+SlPyjJiC48WidORaPSZeOdQ4UkYa6X8iqZCRTW\n27U4\r\n=vx1/\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"b711cb4238692477cc28e42bd5e6024d0f6de41d","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v8.16.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"8.16.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.0-beta.0","@apollosproject/server-core":"^1.4.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.4.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.0-beta.0_1586955536847_0.848543691470907","host":"s3://npm-registry-packages"}},"1.4.0-beta.1":{"name":"@apollosproject/data-connector-rock","version":"1.4.0-beta.1","_id":"@apollosproject/data-connector-rock@1.4.0-beta.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"6361ca9d636f93aa65f809064821996dfa0c877b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.0-beta.1.tgz","fileCount":72,"integrity":"sha512-+1wXxvSNhF3yfcY8TjwxNO3ZdFqs/1ZWU+UU5BAcLZpJY4FdaH5kyVtNL9odqsW2rSHAllnvCFQlwuhgyUPWtQ==","signatures":[{"sig":"MEYCIQCZH9MoiMP1qJdpqmh9p6fqyY16ZzUmLimfRPrHbJ/PJAIhALizEEQtb7UUqnzTrtEZnQgbLvp1aiQ78FpnwQvOOzwB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":954986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemhR3CRA9TVsSAnZWagAAyyMP/2Ax+SrHpcu8MSU3MEX6\nRi1tL8BMGX9STabTPI3mAa7s+CKbs4QQN88QbCiX5cIw2qnJLE2AAgzAlg36\nXbd5VbjNBKAwQaF9AJDnCAzfJqXBpsvQKkkrhTCAKDJTE7ULng3Yyyf2G6WZ\nmlzWRIY+kvvGk6cNhKbvJ7Mdvyl95/o1exD8OU/+qJWTrt10tnbLT7Xq9pLS\n+b2RHieBr10juX//5v/PnnZ+EesSZOYxbJ6lJ2nLUSSc+wRahb4qL3tDWG4R\nRVZreVAXhwH756ZVrVW5PDE54Xc0uuyHFd8NUrA6ZXQoT14c9OQsXkhHSiPA\nyudbZ/ysG+bVicmpkzaJNTqn5W7l/cknYuDCE9WYzfpidYSHocZis+oHkOuS\nN4wIZrXAKgkuLaRCh3k4mPc+/CxF32WAeOl1hLgdhaRywYjsmBD8Sr0GBCR1\nB+6q8grnNt36qoLd7YLt97WeKzLF5LjBellw4PWpYQqHQ7bknXQJGuhDxjGm\nOHtWexrmMwyeyUgIYynJtKOqqioWewQQElWFF9cnQfQQOY6vlvs4oLfmlQXG\nl/k2dZrVcFbX+9o7we+P4n4AV1rjKvKu4dmW0I5hUzYxM4yJTKoATGNATZgb\n3UbcOMY/Wc0LccCmo7h2F+8XSmV0Cci1XzIDf+OBID+u0srhKBda89rL9D1w\n+vg3\r\n=SZt7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"fef450054fec04328c91ad31eae9fbb00e9c13c1","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.0-beta.1","@apollosproject/server-core":"^1.4.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.4.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.0-beta.1_1587156087287_0.05300092886433716","host":"s3://npm-registry-packages"}},"1.4.0-beta.2":{"name":"@apollosproject/data-connector-rock","version":"1.4.0-beta.2","_id":"@apollosproject/data-connector-rock@1.4.0-beta.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"c62d00b84903424f86836740dddaeb6a61b9bc68","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.0-beta.2.tgz","fileCount":72,"integrity":"sha512-ynxAsgq0khn/aLjDimTK0BiqxfJf8ie5La9mYO2JjF5+r7zxNeiyFoAlUVIzVYjsLQpMeGlCM+NXQpdUwN901g==","signatures":[{"sig":"MEQCIFejSRcBhhHlj2pSZO0pjYDWoDtc6I1HFdHed3NOjeC8AiB+d66RkZK6pxryApe8rgyx8ACCazmRGAZPSVxI8SKlnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":955029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepxhTCRA9TVsSAnZWagAA/zsQAITc5Vmwvc9J8Yd9SkJL\n/W/0qa+VccA5VR5PYpN22nZNqu8SJWDFtXyCABlZdfAvQhQhV4dbpn/XivD6\nlmye/7BDXdsmcZNeyPwNIRRYQeSHXVatO5FaYTFGrodAV+5/vhEyvdJBmKbn\nrHzMmF9lktxmZxHpJ8RnNe8Sc20GU4D/n90oHCYz4dQBth8R4EQgN8Ta5Akq\nalsK5EXCZuxHBuryFh3z/aVqDLGygxjUqMVyzA7wkpaFAfKqPs/ucyAZrFYA\n8reUbcsFebQ8L+tmv97NPaBR81/3imEPZ4UcSNYaE1uEkV1EtF1/JbfUcy43\nOQr5VXHXNaPuVoIN+n7ZCbPAhGf4/R4vgFlDofkJt0xTXyXEEfa4q3nJBHyH\nlunsggIhhLRw7JFFtIjeUb/VQafPBn0Spf7YHQer4qSn0qAKKdRI6hg/UNrs\nam9O7NVBT+j9NHsjGQCcpCdofGYbKX098ua4/lu7uGjjLol9UhHp0vGXUF2F\nHS756tGOA7Ma0HyJt8Pin7+wxqenXF0/Vmr1kcQ74nmRxgHgE1xu0fYqfX4F\n3dm2AZVkbeL5/8MPZQaCJ+8RmMCY/ZMEafrMz2x2g3vDd/00XC/51Mk56JTx\nkOxRWTPUvyS6TZf0rq1ABPXy6y/D1SRBjpspoieL80jwwv3XKqmFOEmB6YZ9\n2HS5\r\n=VDfg\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"89000bb9ab25137066e42dd669f8be945e1e8a07","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.0-beta.2","@apollosproject/server-core":"^1.4.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.4.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.0-beta.2_1588009042932_0.841500765204422","host":"s3://npm-registry-packages"}},"1.3.2":{"name":"@apollosproject/data-connector-rock","version":"1.3.2","_id":"@apollosproject/data-connector-rock@1.3.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"3a62343237f17cdb4ff4ed7ec2e31e5ea9605fbd","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.3.2.tgz","fileCount":72,"integrity":"sha512-otHViOMuxUepJN5rm4Tu7Shqa7OHv4wA0ZmWMhyD5/mLKSfgSMM0LVnWHwRnCVxa6sN7gEHfsxfHnUlPfUSQRA==","signatures":[{"sig":"MEUCIQDkdXBJJLbNtrFVH5DE9I4dwhb7ytAYny70iXIrwz3ovAIgK5nntZB47Sdtp6C4Ea8QqS3KGoWGAQt6frNqFsRTEgY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":941260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqGDgCRA9TVsSAnZWagAACCsP/1yiheW4jTP0SoFf5slE\nBMFXaSt91N5/N3xLMiA1sXpIermqjdBPoTd9wTcmioRFNtmvO98isiSA99eR\nnAU0crdx9m0QjTAJBvRNG/1OnWomqrK8aeeZfdl2yG2MHBukxWE6ARicGYIY\nHSJlmElrdlZ9w06ofCuJo4aGg+pGbti4v7sKTNABcdpCxYcng6PsF72aHKTi\nZQpwT6OdoU2nZhAnBv7QSSLU1SrlH8HZM52KqcVzh3728afp+hYN+RzILnQU\nbSxO0rZm6kx3ARxXsohCyWJKWDI9gEDIkNpPeC9wVD2gG+lJ2uFbpeDTxq7h\n86hQCQtlJs8tqcExRJdttkKI2juYE+WTlMV+cKPk1gUzxoEFSoaIVR+SCIQj\nIFnWEdEsB/TsT8j9ulvJeniVw/kP9s0raEeP1A61wJPFiAht5WSjKxlKHQfy\n0gRlVCaHlir9rLqIf9lizEXGHclbsT7TGz1hbrcwPg1ntXlEZaPH9XP7dzP2\n4ls7HCSmM+3P9MurX/BFS8Iq5JzSS6ylFyYDQVmxv4nFxNSQW7PQJLkjXLuv\nRr6lzv+vBWtcAyIRe1ZReVKEGl3M4hLvMsOVcvlK29q+ED4436wP3UJd0pCR\nDHDSL0QeUO2uqedCG6Dtj7vCnR4B2gX3esB2Nqj0rZvqxsPGXEoN3FDZSDBt\nbQGu\r\n=VH8e\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"6d0e0658dd8f36c2fb2c2ce32d72d13ea4b35018","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.3.2","@apollosproject/server-core":"^1.3.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.3.2","@apollosproject/apollo-server-env-mock":"^1.3.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.3.2_1588093152241_0.07253794619779219","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@apollosproject/data-connector-rock","version":"1.4.0","_id":"@apollosproject/data-connector-rock@1.4.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"3fdbfc5a8c188b5614b09e86f120118fe7a98b8f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.0.tgz","fileCount":72,"integrity":"sha512-BY8WebJFmk2/TR2mfgfrMXjNdO7jnUCuvOVp7aEBBnkk2SLhM93ZW0qwAau6c3LfgqU9YUvcopMqAmjU/Y3Ipw==","signatures":[{"sig":"MEUCIF3PTrP3VYzxWwk+sJuwZi7pzqzm2X35PCoyxuzbwdiPAiEAmn1sjxOw0Ks683PZfcV+nxsMcit7zy4376SrJq89pjg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1008744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesDYECRA9TVsSAnZWagAAQysP/RHbsnVhCM++/UDw7FzA\nIeT6dZJSUWzii5dggnjJfN+j764WmmTDCvCDZShlRJcV01Xo2iL6yVjGZtZp\n1vElAsnMxsBBDIxmrwHzonDs0Wy963IhD8c+ZvEurMcUia9kbcqwV9W9JVNe\nJcxhv4XB90IvOhu2XmuLJ9uob/oq14oy9LpLsCbdERy2SsAgXc3iQ1MfLxso\n+BDYbeEZiHQucMebcEJX0na7tuT4UiNfiOMQveYcZPo0tfCMFjABEAGun/aI\nHJMjo/PQQxnO4O/fGSge+z+cNJZrQfEPJOob3MNyV6oCcb/rQU2nKWudFdl/\nw5+sY4pou151yFQWCb29Enc0RsitHm1711C+ySgoN3dMwG04xonXoNnd6asM\na2cKYt9ky0WP2SjuTsVO/xdickwkU/pliX/kJJw/qfoOGU/3pa/ZXx0X4XbN\nyKCnNMqv11OR0aJBBWi68HOb35RB9ccFeXTYs/ltU9hRs7UpZYiFkkuDCzjq\nChRJLmyY0IRULgmF3kERgsdRRiP0lfUMI+EdDWT/2genc0ICIZ/vkUr+odsC\ntWYa7EW+BlgnuZYn2yVelo+aR5s6kcSty88L5FNb3//pDn8W3Z/IkGQkKDzv\n5N6+5lFA5juSk59AGr3dQFaWq+kCVeTfFEf1PeAEvMer+t9nDzcut+B5N7mG\nImee\r\n=2TaI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"292c3b704f368fd7e6508be7ec28bc9c589f4c66","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.0","@apollosproject/server-core":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.0","@apollosproject/apollo-server-env-mock":"^1.4.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.0_1588606467624_0.7054963353614705","host":"s3://npm-registry-packages"}},"1.4.1-alpha.3":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.3","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.3","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"30f08e8a4648cd7545c7fe11e139ea2fec238645","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.3.tgz","fileCount":141,"integrity":"sha512-pl36t4SZ3gmdGSVcIVAaxXIYFVGqghZ3SmGSsk2WBTvtxNjZRpPYJ44Zr6z0WjbT9vZn1hSGkKJckav1HF0IZA==","signatures":[{"sig":"MEUCIDvyI0XXZ59mgm5mYSSgzKRF61vnLRq0V+7j9K3r4zygAiEA4SbNMN4ZUpvSUTqCFQ9ezuKttT5QL+ag1vOBylze1/Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":833841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetE4tCRA9TVsSAnZWagAAXRAP/R7Vi3rCgedUJkj/pHIq\nGMpc3jtVGyFqY3PxB6VmkBL4B1nM/KOW8bN86qq0lbdmvl+1q2IzWPgqjlVA\ns5ZPFZDmGdb/bgjfffxviYS39KhPAoayG9XJ1S62dAjvahjekQusDEoBhDFD\nMPut9FevHW45AKsxaTszVLLQ20HiGdv2jxLxm/Oki7IKiHZRom5UbME4xTPd\n0i9MZCRMG0lEhTCP4QZGTTwmqykgVMIL8r9ua8uLdoo6DIlN5YKZ4G/3YqIr\nhD43bARA07nzIWa2b2R+MrGPHxupKC/jqkBIOqJ0NJk+WrqexyEbfoI3z4dk\nbFIE/JNbkgZwiO4U2WHJbQuXxGC1MiVKB96TkQijzWfh8R6EoY01M39k2tuV\n9MLPbmpTSUS4XQO1PwSoQEMrBnTxAdI5SSa64zeWvNU4d3F95SS1ucLsgKma\nbMVawPrOqb4JZohBXb1YQnxm+ClIZNZd4rDNKJ3HVPRoACR9yW7/wsJByRyV\np3SDHYwEDbAKMYisZPDht6BdRwpdtDL/mMBNLEe/sGemButh6sRGMD5jVrz6\nT7lN852dnhjBechvMykTJK2gz4eQmK/FCFyjkLQIzgghjK+BSFvUNI/zp2D2\nHoFbTilX8yF4MNnqsCsE0QTBWw96NHQHclJvfO5xEBqa77G80EwQk6htIsBq\nPnbf\r\n=A9Dl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"0151e368c6cc5f27c780d86c85934f6943f1ef38","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.0","@apollosproject/server-core":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.0","@apollosproject/apollo-server-env-mock":"^1.4.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.3_1588874796828_0.7212930021712343","host":"s3://npm-registry-packages"}},"1.4.1-alpha.7":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.7","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.7","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"4ec967ae3ae4d570a69fd7c612094ae2ef42de67","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.7.tgz","fileCount":141,"integrity":"sha512-egmt5OBbo6jXeKGjlcsE9ldNQdN26QPzlO6eUtp/Uw4fi79IMqRWGLQ1BkJVlfjeZwqvgOcty5v8RlPhUqxudw==","signatures":[{"sig":"MEYCIQCgu7Ms4+c1unII+Wi98f6NTStAiiyLv5twsOA0yVL0wAIhAJdheta9wNETyODwoCNwH2v4DYr4GbvHUjKPJf5uBHyd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":834384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetGnwCRA9TVsSAnZWagAARfIP/0PpZ48v6heZhWayr0dI\nN6PkXefmtkKFDBy7qBj506IQXZQ2hkTmtgz6fC4Fjvz8MThqyvQI9F+nDvUN\nKhsWzh9pX7mopT8goeGS7152b7fmfa5TTpcJpotqIDI30egcuza2vNoaFP1g\neJjZhi0Gd5/qm+zWU46GiWO29hQ++Jzb/tsuiN4+N7tQYRcuRhv4AP/0nexF\nRv9TF1sK2E9meLYb2qAlawuEQ4iUBCtBAKENR2RBqoBpbSU+7ycV/Lf+zwgc\n0qrsHfyIOqvmCzkR3wViRHdodCH0lhh0OxRRkTMZf5Y1DQSjkjkDre0g7npb\n9uaQAMJWsRIgdw0mjMsr5vKB4msPrIYdM5MV5gpG0cgxqFRGhu+DGtyW/4K3\nGBsocseztIFo9/UZ0XiaPkw4rWcXXXLCBuY0n4CiQJB6Sdl7Zf6PtHn01ZP4\ntnp/KUScE4cYJHQ/N7MO6+uxkj5fF2F3mY9TxiHBzDymnoGneE3AxwMbQgF9\nzLD9z0sTWJGsxUJKpFS76htq+D2+PUYPATHN53YP8y8VhaFcrVdHgq4my0cZ\nSvwLnUgsl4cHr7s9kXl0bofQxsUKLDZWCwVnRBYAq35FpcXh+cUGODj8ynne\njH10atiJOoOd0Luwe7AU2MRhvhSyAsgqzHY+lg3vS7Y7TuvirAaH6ZbkEf8k\n4efp\r\n=fBYe\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"abb4ab2952a82c5a1b8cd6b68954a08e8f7d4a37","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.0","@apollosproject/server-core":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.0","@apollosproject/apollo-server-env-mock":"^1.4.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.7_1588881904085_0.1908675877566426","host":"s3://npm-registry-packages"}},"1.4.1-alpha.10":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.10","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.10","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"30f867da05c3210888124c9eca15a6ecb3abaa66","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.10.tgz","fileCount":141,"integrity":"sha512-K7ppfcuunIGPsN8uEZAeb9IiUL2xa8ej0AVv6TOzBA6M431VNa1BJp158yIUB8uKTAXeAHbTqfJVdRxaYJ0AWg==","signatures":[{"sig":"MEUCIQCmmeM9F+73nDo5VCXebMH3q/DwnR/qf4dypaN7YKHbfAIgWJLW/+9WVhe2FI6qo1V9giTBIoUwkHe7FCMsAGQtwoo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":834419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeusqHCRA9TVsSAnZWagAAefMP/RWcorOHgrJ6YRqafYmw\nf7SGpVRFljOe0Q9u2rSmSbRw8itRG8IW0LHLpkOQDEU5U2JboifR6HfozFXb\nJMNOliDQ3RSga6czgnOliVu+SN6RavFBATi84pfbNwgGK0S1K5aeOohLw1ao\nWowZujgtrIobPOnnMEOgSNhJ3DNTyfSqpkWoA/Pw29QPEBCPAE4fJjm/K5r9\nhmGqVTQhDctFJkeDtKz4IEBwoj/FFBatfSDfiQz6dHUof3ddbAbgSbNiG8Vu\nqCWlH3X9wO2Em5J9MqSbAWhjW6ORmiQBBaYSBi7NwGbvXsyexlhCfcHCSp7h\nhM5XN2KiPjoY9r4V2XEqXsVRhJKUzQF4IicF5XyXlN4MEO5pXFGZifBEIE/9\nc33Dz4CwlX9zfnV7cget3MOOd/M7Y1uq5GOJqD7MQl1VaBIkg1ZQbxpihq7x\nXZ3xCoUfcahiiK2I6WdAxNlU5/4GPRMr8rw7DCWBRcD1/JDB2hyN/z6NjKa0\nStVwjKOloFeooh43d/Y0AP3VTrdA0xaPFtkz8ToAysjrT87KaeIOqtYi9iyA\neZDlzRaXsHdfjfynN71EGsxNHgORTx+x9EmQFlML/JCOCw2OaQgyZ4p3Z5+T\nEaSYpqR0WwnLbhmdGFVUAB1SdJFAMVVloDaVkKoLksDdNTfQIkQnVprAGI5j\nB26X\r\n=+d9t\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"2143843753ed3911390eccf5fe127c412e731eba","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.1-alpha.10+2143843","@apollosproject/server-core":"^1.4.1-alpha.10+2143843"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.0","@apollosproject/apollo-server-env-mock":"^1.4.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.10_1589299846989_0.04417873971992381","host":"s3://npm-registry-packages"}},"1.4.1":{"name":"@apollosproject/data-connector-rock","version":"1.4.1","_id":"@apollosproject/data-connector-rock@1.4.1","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"9410b4a99c4fd209fae6c010f74b3db6880d0376","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1.tgz","fileCount":141,"integrity":"sha512-qZtMdfmtU9z2tpfjv/F6jihoJ/RJD3BtSEA7wE6vJM6eRyby3vi8ygcx4ku7UcQxpvTY7o9OX+X1bwwBgyuSbA==","signatures":[{"sig":"MEUCICQP9D1YynP3F8R0VEF+NGYyV4l8tk1E8S7Tx8huWJ9jAiEAgSyPlVaCkMpEku9KFQ5uo7UzHvZCW780W/CyOU68CtI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":834368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1qBOCRA9TVsSAnZWagAAMnQP/2dCF2quNLXhFtQSiGOW\nD54udmPTGmfbnAXTY0ULNsn3juW6V7YIak2x/VxNiNsrwUaguM5iwgQykQAp\n0OqKgZR+EN5y9cnpc60rTdAVKp8ON6/crZ118bTLOIR6c/c5bI+kgvBld8qQ\n0Zby3VwbySsdxcbuemUApqwpJCLNBBDt44J46jbhYBvKGkWqtX0vi14mtEDM\nUijqb6BreDPk15jkVZranh7kH5lkm7iznkDspp4pUoEJof9W6+ixfP6m3Wwh\ntgosCLzJO78ZwC+dLTzZKODUahqBGk+vyyQZbGLY/Sk/eeDKg0z+bQmwqnuA\nPnGDFmRltZG7jGjvghPU/3Jnop/DsoEFUiOM9+hh6RM/Ys5AIHPWZmBzP8GW\nb/qOOKZT17kyOX6oG49cJ7l2XuQIRGluf4BoXxxtAn9Tq8oJZfPLfdNDnrX0\nCZ7tjhhXLmYj3Q3TDXGCbxXY0bW1wchZbwQ+M2VlcwlfAwUM03iw27V3KIoS\n8Zrq75Wr+wTcCOqHtF+JgVVigvJU86AsEN+A6xJGH+oTMZ0yJZ8KU+0tDCYp\nLf+Wc79se7nIZtjAiQZ6nJYObRzPn5rS90B0EIXq6vN3knu30p2HNdzZE4zH\nabzSBt94cRyqlOFXE3+turLf5JKZqEL3Y1SypMMBA0rpNmn29Ug7jx0QpTrh\nqWbB\r\n=xKe8\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"a9eb9a34c398eacba0983ac74dab332779a1d308","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.1","@apollosproject/server-core":"^1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.1","@apollosproject/apollo-server-env-mock":"^1.4.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1_1591124046399_0.9613475226349728","host":"s3://npm-registry-packages"}},"1.4.1-alpha.16":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.16","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.16","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"ba749bf8df6651c0bfe29ee7791cb81aa228a9d1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.16.tgz","fileCount":141,"integrity":"sha512-20u86rSH7k9oFcWApkQZaRWXrRAeRbr+/lTVZXNEr4CxiG1pJKTS0eZmOj9E/P49XF5yQaOH8L74Js293TfkAQ==","signatures":[{"sig":"MEUCIA0cPi9djswYItG7fIJf1N0u+J5IPAc+L1N+u+c14mG6AiEAsOhgVae1hpBJuZdK4s0rLIYNJW9SvKvvjVm0hz3Zgog=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":834453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1rVACRA9TVsSAnZWagAAu5MP/2tLvR0ITPNakicWsZFc\na4FeBzyjn2GsJG72/hK/0fBPiJqvya0k+mHm+PgLsWaqS9CKyg7yr5utZejD\n8gwoZnLR9HI/xm4zaRDvU/lVW4zFxfy2jsijH7Cs+PZiEYG8xOR5TeOg7duA\npU5p6gWNice2lx4EeYxbvvvAiWJqBTDSRxoA635LCF4y/sEzLT8I1UD0grRQ\nBJ5sWAw0TNAHsWhB+hLCgKqkKQSm6X9WBOool3z+byUIn2kUVMsTbVyRMD27\nk+AbVqwpZTOIu1vqR7WVJCJhzMj/HAubgoxTURNyHJuj5pGf3kYLfLKfRZ2i\nGXCOi8ney2HhTTT/7w9RsTG2inucfEvv4vUK71+C5RUwb1bTkiX4fa2Y6KzK\nIq3IfzJdv2xpGDs7f+v3aXGghEjsTKkwMdBDjRl8r7dKlX8htP/t0BmvflF/\nXB3eheVE5XtBwrE962orp9aNOo2ExE9z5QQuk2XQu36VXjZ7d83nkeB4NkoH\nZ2EeXzorJsIqVLuOiy7Shvj/ZE7cG7d2J+2vcE/0Q12/GLvSNwGCdBdeqa80\na9VLg2ljTW9v+gCnuLulAfWIYmSbWgJypUv4cnbY/A3YGmlqZ09cE1UIjO5F\nrgjMx5WRkL7gQMLTYhywWFm/IAQ1pr91MHPB+aE7a6aDcLbccM/wIIgAkS7c\nbnRh\r\n=IOwW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"b00ea24e997f68e501f0286312a7313b818ed161","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.1-alpha.16+b00ea24","@apollosproject/server-core":"^1.4.1-alpha.16+b00ea24"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.1-alpha.16+b00ea24","@apollosproject/apollo-server-env-mock":"^1.4.1-alpha.16+b00ea24"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.16_1591129407828_0.24428507643364816","host":"s3://npm-registry-packages"}},"1.4.2":{"name":"@apollosproject/data-connector-rock","version":"1.4.2","_id":"@apollosproject/data-connector-rock@1.4.2","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"88b0a8054bca10fc84c82a00583a562ff9a7015d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.2.tgz","fileCount":141,"integrity":"sha512-P6IQSzLV5aRPLlpS0dCcvfdO5W5VI3PLboN640FIDJvWxP+d6z8xCjymzAYG8aZewbScMNIBykrc7WBzftjfMg==","signatures":[{"sig":"MEQCIA+5ne9h/bG9q2lJWBl60fT7Wu8tTNRPkr4OHEDJxmxHAiBLFxOV4+1VDhqRHYMBM1w3XlPWT+GooHFdRm34MYGdQQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":834368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2mPtCRA9TVsSAnZWagAAimsQAKIsKBMqz0HZfWwYiE3i\n49zIXHbHQSaz+dZatbpXiQs5Tk1TXqx+aOJ7RQ+X9mmOWegslXo/E6EDkueN\nxqazDBD9QQin2H+AD7KJ8OfKbbBr0l5MAVDJhf4wRBmSb+9XHEGV32weDpjI\nnvyyaNDN/uFrIDuPj92LNRMY2maypiyWe3PtS4gMwwduNSSbDhJfY9W9jMap\no8TN2LGktXg9+QNx3xmmPWXsbrryPjIk8P1en1sztRAXHnLPC597Gv/y17Gc\n50L5eD3E8b2YMT/i74y8aVRHQ5ULr1YqQf6awQzEsvy0RvpYVVChzPLJwxbO\nszIBbD07SGuVZrVHCkau/HRFsXZevkj5T3eJeitr0ZAyiXJdc3ADOCSDyHDo\nDy3OhlkOtuAWiJt6yLHa2j6Wj5iwbFgi+kYFuVMrjMrCKDXsHNeQgM0LSpHx\nL6ayeNDApoxhr7ZBgMoiPM2TIDI7pt2yjcjPyRWV2xFCCCvmxH9IYPeQFMoU\nGCGn7D9UkNu60joEo0RFvMkGyaCU0h1+ledUcwY/EVUFx4gBVJOWHTOyGVnt\ngsa0Vi+BTClO/ELj4JS4CN27ZSjOgBXE6t8LHFy1VqRhTMhzEQFlJYNNugbG\nD+CLMiLRCIiNe0EUucgsq+xBSvJqWTTJ2N5VzY44K8S8zwPce0cp2smpXPG+\n6qc3\r\n=zLpA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"fe3a14f76cacc84ef214d81a6823fc3c1e398774","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.2","@apollosproject/server-core":"^1.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.2","@apollosproject/apollo-server-env-mock":"^1.4.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.2_1591370732387_0.023267509145207033","host":"s3://npm-registry-packages"}},"1.4.1-alpha.17":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.17","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.17","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"809087800505ba0692c1f3bfde5330d794853a23","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.17.tgz","fileCount":141,"integrity":"sha512-4jfcsKt9KlNHmC3HoYLgmTWzv5YK0Wpu1z+r+QIwuKeHDozPhK8HtgvPQ5Yrr6lqLjTiX9rjtcM4E7KTfVN4ow==","signatures":[{"sig":"MEUCIELx4gwatVNadAmz5CeYROUyfDTTW8RYNidOjZIuN4aQAiEAzOwljvaDhoFtkwuWHNtmop0PXOvsbj2rjKVrnJMc+/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":834402,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2mVACRA9TVsSAnZWagAA8isP/AxW7nE1aZo7nUQpiG5w\n8Yy7+gJpuLdA57uHFMD/AYNA5a7epKaRPuxx4p+l1/yf6w1SyGJ0ll0ab4pg\n0LhntkC3ZtgHDOkHsr67PvxtUSLE8FEVlXsSKexp8fFohksgTyjdvZRi3g1x\n8gcouz7oDfp+vjyNhbW970BNcY+dr4cJCpa+1riqL0F68yN/5+6AitDyF5Xr\nMsJ1QZ3StwRzQZsgzr+wbLOk5z6LTjAoqyfPOroyXGmMGbpAJ7X/rc26kgiT\nf3l9uLQja5LkNtAC4wCj3PPRsD9qK0q9uBE4ZDZA3FJwR+AvP8Vu30L0VAph\nQQqy+dbefiCWTtGUsj7jmKwF2KQWGPF0+10ftFELALhfnj8CPnYpq5yR+NuW\nMAP1J122QNTZx1axTIzKcD3GfPVTf753hfhrJPyNEcRoMwbrOD4Fpi4idpni\nPHy7lYlZ7bM6lFEjj9ss8yH7wu7MTWjYexov3ik9fsRp33ddGQuFHrMLA74S\nnrMSr4wN7KKCkRRgQf89OwZXF513g0QaRox4ZTElXcjHOaxMLF5wq2G9stpU\nh7voNw4iyGTbXVTxYePBdiEEeuQNlNFgNGIXw9dLPlbFRksJM0tg8buP16y3\nIZVlOYCAJLqPnvOEetuZYzFcPsqtN2R8Gpg9xZKxuR/SAFOLfkKyZB7DYz1T\n7qTi\r\n=yqm7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"27a8fad4a648c21c1f36b483c2a8b23ca309bdd3","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.1","@apollosproject/server-core":"^1.4.1-alpha.17+27a8fad"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.1","@apollosproject/apollo-server-env-mock":"^1.4.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.17_1591371072457_0.2707779950160851","host":"s3://npm-registry-packages"}},"1.4.1-alpha.22":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.22","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.22","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"bc03b9b7c0462048e3a86c1f0d93d804e9184ed5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.22.tgz","fileCount":149,"integrity":"sha512-Cvyr4Xjr3U5zSfvz8gUD6imChucsSzXnDshc3M7BETzLzLtTRwr9PJUbH9LRmtOMd38okmk/qvLE7cnL1nMcpQ==","signatures":[{"sig":"MEUCIQC5yWjJS4j40iXv4CvYRMSeTB8UW0494k/ciPSEyIGY7wIgTQI6LpYBmSfZqvhrMOQDVd3pRgHDbSaTwYbyFFQcMxI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":877079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3vilCRA9TVsSAnZWagAAHjEP/jzMlVPrBCbHYhl6tis0\nkWtH4v/vKhWjq2WJwR+e287Fu7Q0R+qDgFSmYWZOkwfmyVSZZgDpUyMd5dXF\nmuTOKcu3DJ0tk6K32qDJmKYvX66e+S/FwWJCzr7+siGBcW5o5hDIiNOJyPVz\nMOI2B8DpT/xSAcu9ipgzn1AVJhhidigNXPWQeWx3WkTLGOuVx3onIm6vSOaO\nr0VlanvOvLWGgqUqlI73+WYRhvbXKZtT3mqCf7S02y3ExABzU2TVdFcHmVEh\nhDdFJLtXRbm0EYDK6tQV1KgQ/3/LQkwjpsSJ7Vp+Gn7DlosupKs+K2RuaIo/\nFMF8DkMiGt/Eh1gfJG86GMBIiDY3pywwgGod7cCjvSzupiOsCncp9qiQ8t2k\n6AztFa0LLKPxMaYHjfJHHLzAySGbgoM/HD1tuHByP464olNo5wWoAXt1g0zu\nNnIrDvSM5BQ5VvzSgA/l/ShrS7JI6gMwXI2kq7tnhracntp2r+bF9BWOodYL\nSv7Ap2WQe4Mi+ERG7PBWgkvguWXkcdhZidS+qfnfQ+8o5VcYuHkJB54O4iCI\nl40B6thHxPW0bLcDZF2kutI1Gu5B6zgHq1TmRFiHpMj0kZqA0x0SZeqNP4sH\ng1O4vWOVkvRGsmy8L4Bp4OEh0UN0wjKgGnIvv66SHObUT5MgjV0qAr/2/eMR\nOkcK\r\n=CuDo\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"1e51418dbe9f053e219825644288c9635d19ce0f","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.1-alpha.22+1e51418","@apollosproject/server-core":"^1.4.1-alpha.22+1e51418"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.1","@apollosproject/apollo-server-env-mock":"^1.4.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.22_1591670949496_0.8808149213364187","host":"s3://npm-registry-packages"}},"1.4.1-alpha.24":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.24","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.24","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"6311af8d741289d17adc3ae9520f524e9aa4f93c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.24.tgz","fileCount":149,"integrity":"sha512-sqqXPaniKON/PhRyWoq+bQk/u2G+2MLP0vXjG3R0Wez8OsaKPGpWwV2cHOei0sEwAi5JJPRSHn/Mo+7fTGlRtw==","signatures":[{"sig":"MEQCIBF43IbxbRRu280cFiCX+UAWMT5akviA1r3pfwfMRasvAiBADMlcI7l7k0u7zS8EYIR/cGEVUNAm7FE2OxNnyb3EZg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":877113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4amsCRA9TVsSAnZWagAAZxYP/0jaKCfb363kyKWP0qIv\nQAkNdlor3vdnbaw8MxRTtrHGRN3xW1CvB/oO9zp2o6W+thPy+5t8xNah2uco\nQvAwAjGSD//bd9VS5215r1nci7K0Uboaz5P1fVI53VcBWM/b/OjVdvy4wsD4\ngisVj5FiL48Wb38R42ykQ4EukBIuh5mCoymltX3GyEpli+Evb/sa/DIYEZil\nHRLQQhIJWN2x/FRwhp49Y1RzBsUpDxtd+eTKAaZ2ywACtk5hzG3WrEFPv/8M\nfUm87Se2G/2/o+ixrP0mTDeN/dfA7g0141q1vLQcv8BZJOrssP7jpEJSWBpY\nuk1pz50yp2QAqnzZpXm7cigZU5MEWGZYh8+JMBav6FV/bEwUIQwPC0Ov4Ffs\nv0yEenBSZZb2CF8WPy+/8zgcjG65TlP7i3SK0neb6ZoyAoRb3dx1gBh0hHxH\nUn0z2wIRwtQ4Rtt5QX0kLSoyzHfp3bhjMxiZpiMxZ+ZEuOrbU1BKP4/sIeoP\nZj0gIjMcr84YMLS4GTCI2/D//uutbUUOJeyja1z7FMnjpBCmvLnwZEyS9wjF\n5UmT6+FMFD8oHzYJiC3nFeSfxl5VrJTm1y4taKkYWiPt7kwktaxotdXRh1K1\n6WnR8QIg/or3+pUxD4sJTiW7LIBam6vt2/a86kgS/2E9gsCuX3L7LyOEdAW5\niObr\r\n=EZDr\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"cfd9373748a59e517e052a4974d59a88ebbefb01","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.1-alpha.24+cfd9373","@apollosproject/server-core":"^1.4.1-alpha.24+cfd9373"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.1-alpha.24+cfd9373","@apollosproject/apollo-server-env-mock":"^1.4.1-alpha.24+cfd9373"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.24_1591847340434_0.9881430806763434","host":"s3://npm-registry-packages"}},"1.4.1-alpha.26":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.26","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.26","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"01ed3f1e5595cb5574730462a4601d07831fe85e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.26.tgz","fileCount":149,"integrity":"sha512-eUaFn30uns7+XtK5Fzj1EmBgoR2Izx7hJRPdEDoC4vV0wrvM5QNhpZ3li8vmn7/hLv6GhMVtUS+6z0XojAEtsw==","signatures":[{"sig":"MEUCIFHyG1kbkqhTI8fPnt+ocW5PYw/tR+kKpgq0iWwghywoAiEAzY6L2wYGliaLN1DJ0ZQXTmA657KHLpXDaavid8ZkFOg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":876698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6Rh8CRA9TVsSAnZWagAAUW0P/2zNtuUBBqDjejjXQp43\nrf9cakHRiY4J5HRYi/xiL/xAjqZ2JEKv0G0VDkPZONAzvbIQWLOYxFRqgoIj\nmEzl752S40W7bkUzbC51cCnQQy0kvlutBYT/7uS0tH9iQya/YwRU/ksFf3nG\nW2lFPM9Fp7FSlj7RVtxg8w+6BMYB1pNdZ+4d5upjbVatBmW6QOzxArbcw7TP\nijKZwQrVSPuMHPHykneuWZ73j44f+KLHFqjd/7LU3EEX6GMiykZgQ5Ygvmka\nA4zcVo1yZGceOp+z6LNdlgxweGXzS2BLkMIoT/pzxmcLNgTv3U4ElJ54xxd+\nIZ183C78EjL9dmchL0/w/YdB4NoeOAt0ZtPEQ9+kB6UBGIFxO2CLK05tEIbp\nZA8ZeRvyhMab3N1dYyp+rrpfNU/46oc/O8il+HIteKHWoNNwdwqIEpzzfpFP\nowdq/i04jol/wb9mYTl6QhtCMSG9J0BKtL1PrHvDfKDOJACa2Gt2aLcvOTDz\ng09XszidjS0f4ywKyIJCLmMMFUAXYTm/U88y4grECQhxUhA9/iTwTQb3w8tC\nnCXnZzAZUaL31JHRk+0qqglNeVRX4AeRwQcUcNiw0B6xADJb/JDADtu2sGBb\natgUFWD0BCdSyw5x1u0PZs9kpjOglZAiUgb5Uo5K0SvTg7qAWbVsSkKtX6ow\nGRWr\r\n=724U\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"f03d4888ce38811cf530b22ae3ed27c467b0ae0c","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.2","@apollosproject/server-core":"^1.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.2","@apollosproject/apollo-server-env-mock":"^1.4.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.26_1592334460174_0.42149844572387263","host":"s3://npm-registry-packages"}},"1.4.1-alpha.27":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.27","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.27","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"d0a060b36d968e4adda74e3d30f1df6ee1d08e0c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.27.tgz","fileCount":149,"integrity":"sha512-+mxykyJ89AynP+H+yZzOPgsMgt1/GGJdsp0ZKzMoKfd1b6W11nIknZt9PosivYN0M3a5EwVgTmZ8RfiCZ4tMTg==","signatures":[{"sig":"MEYCIQCYFBzxLuZEvOeLe1loB8tHM9ZnqNzD9OqGIPMVw/YxigIhALuFB/r8nSxdOs7Qo2eEe7ZVKw8rhd+CiaAiBuWwOmlE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":876732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6mLKCRA9TVsSAnZWagAApocP/jra6qYSPgHUrjWsMD+r\nmP6q3VOMOYsAaNxu2NSy4iapVu/oDUubFPeQAlIf+AoMiae6/XzLiTROgWGJ\n6TxQN2JVghLRDYqsBMpSdYNxID+XcR0aRPzNo6oMJqeZwupRo7h9/siPdrq/\nfszfI9TYRHdisrZS7Isdzqib8tfmWMpjD1dkatDd5Fc3Eg9F9x/jIVgtq8jd\nBC9Na8K+AcYG81x0kqFaUY7Zaf+Lu4dl0thgcmEH/IOi7mohj6HTXs8kaGsl\neIaNlIRWywTkx5xuuwPDP4lB4vsCw6RG9NDBYXwIgrk2cAy5+k6D+/y7wrAY\nzNsp9m5t9SDaxY0iteOAstYPcGgbdEQSgtGBYgVHtKQMZRh6GGc5I8a6jmwm\n4pmeoSRkmoHgYgqnFvJdv/1nX7UyzdFZjkZrq9lHJehLAG0t7KPObNWVJcI7\n4fsWd7dYXQOPBo4LXFTOxOfENZFZ+pS6gFF6fDQWClXBdT8ErOlxqQFejUIT\nxKjBSG76Hkv/Nv87pEFk7m9asfFk1o+qZe6Hbn5pNWuGtDybcqTLeeLiLPLz\nX196ajYy60v/2IgyJQC9SKJUqqwYlYWt3pyhYfToRJP4FhEL6aTLRYchN2/4\n7+uvrzHjQ6Oe1OtGTtvAGPWuO3PRasv+/mnjjB4pWkHwmAzUpfWKMKnx5HLL\n6xE9\r\n=hr0D\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"24023003eaa424d3fff59e3a007710dfa34c739c","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.1-alpha.27+2402300","@apollosproject/server-core":"^1.4.1-alpha.27+2402300"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.2","@apollosproject/apollo-server-env-mock":"^1.4.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.27_1592419017505_0.9932525195240687","host":"s3://npm-registry-packages"}},"1.4.1-alpha.28":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.28","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.28","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"96574f53d4193d60b1a17bda6f6ddf043977ef68","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.28.tgz","fileCount":149,"integrity":"sha512-j6wkU/bA7CXygL4r3jk3lfpsgclrax/exIz/qN7qrWKQGlMGCFaQ3ZpqfUk7SywRKF8ROTPKQIL6p7+W5lhjDA==","signatures":[{"sig":"MEYCIQDSLb1RojvVr8h9zqEBDj+AX3bBGOBZ53Z/WJzrgr1cmgIhAPmfgdbl6lCYxTSADPXeooM6CEsWDsy1M5x3q1GEeJzh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":877945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8M9GCRA9TVsSAnZWagAAVLUQAJE2qvUU6ch41tUsCmcK\nVmPiY26meWpKk8qpcgVelOgRRE09sQ/dWDnx0povo1hgkwaEuESH9SL82U0w\n6yujH6FA0TFz/jOYrcOEhnHg47Ectf3mAZoCYVXT+YUz55hNmIROKshb6akX\nLXaaLnv44cBSJeMk/x5RFimZx5qSgSVR5qbzh35oOrwNxszCeUPXV+kEyWW0\n++Aj39d4hBW0e9DQYig248cstEYxjkQZSmcNMxQA+qsDS1FqqKwEoSpR1Xrm\nzo0Nlm07mckPwrBbJVFSbYp/Hv/HRMrsOALahB0XvegmMGp3Cm/8Qw2qtL0M\nmySsJ69WFMoXR+s6euZml4qZAMPffe8rME7rh0nThH7UnsCeyDX1H2gvN+v4\nWnzbiMGSqTERDkXpiW9RBRQLmpg6pkV5io3/7WShYZw4noJRvOngoFzwnRwY\ngcMfAwEOaj1B6w5I1fgu2eyTStclvzU62jVjvmhMZoh7uc9PGkan+J4bm3n4\nvd5d3N4YNqChhnkh4W19wPKVgdcXolouI0dObPnLGM5o0sAoSoO450iRJh/v\n9Ei6ibumNTh/72uSefhasp6synAcQO9Y4ECqQw5CNJk4+QVcNbat/vKFj91N\nfn7jmb0TS+2IRjvHY1Cx+EzWlCVup3b3SqjL1Fmkxj+1gFNuhzsDqjl4QG7k\npOcB\r\n=qNL1\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"a2c24aee8f73dd6788e6da28a8ef0e7deb8c7481","scripts":{"lint":"eslint ./src --ext .js","test":"jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.1-alpha.28+a2c24ae","@apollosproject/server-core":"^1.4.1-alpha.28+a2c24ae"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.2","@apollosproject/apollo-server-env-mock":"^1.4.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.28_1592840006177_0.914885324083526","host":"s3://npm-registry-packages"}},"1.4.1-alpha.29":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.29","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.29","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"b492b193d8ab471501859738b6ee38c1c86c211f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.29.tgz","fileCount":149,"integrity":"sha512-tLRE07dJuePGD633lw1djPp/8R+riIBUpdumw1ZEOJsdrr9gpwwOWrUg0sN0foCDD3BM7yi08tNXFWUy1ZR4Mw==","signatures":[{"sig":"MEYCIQCJbWuLiPH4zgLZcmY+tUUrrgAskvO/ZozAfMUmX8tySQIhAId6Y9w6RzTLKQUmSWB+qKVO9ANTqrSSIMph05iKBFpO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":883457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8O65CRA9TVsSAnZWagAAIFsP/3iEWUbTTnp7cni7OITQ\nduK4c7xarhu5ACljUw/K/Yg7YcORK143KD2C7T/TOSkoJLTUVHB8+Y4VNNiN\nKemLt++EgEJs2yyXfQqFiD8EelR1s3kmciBYYsN9Wrw9jMCnT9zeEYNmJBmW\nIRkC/iQEHd/xMXEj4tB03rkHPpe7XvstLbazTfWOC+BV0iCRhdCfDfqHjCiL\nx89TJZ4VdLxjJcv2g+EHBNg0HSp4QtxfjmJmSjbaO0UarHpAc5vkgjgPcvG1\naqoSo+SlhTBq3a1ROEftwuabNFsiAHq8pDuQ+NjyjRsyp5lM4WKdTpolGI9k\nWUOHmfOfnWsJTnWxyn/wdRZQnkm+v9TjjrxXbmoKbf3KAfVKBa2M/segWo+z\n/be1YbMMIZL3fcpqhVhMgyhuBj835YVJugd1lX4rjHuWhNk11ASKiUj/DiLN\n/h1FwKoLjuCfAVgame/2oRmVarKcBsTwwfKj+HMvVVK/cVcgJDn8WBFKAlYp\n6kipiRerJGgRdxyPhhMXeM/wTxhYZHVgGB4++EAJ0niZRaznKkB/NGwtM0J3\nfHKWKmsIdMr+RAfMDupjuYfS9GJ0mGBy2yT0014/fadRXszGvHJO4mkwq0lS\ncUaVDPWMN9dfltlROG7AjL1VNdHvRZYc2K/q1Iej0lajI7RpyHPnbRKOBCY3\nLEP6\r\n=AHZN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"96e475aed7a2fc352789172e119ebb849b3787af","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.1-alpha.29+96e475a","@apollosproject/server-core":"^1.4.1-alpha.29+96e475a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.2","@apollosproject/apollo-server-env-mock":"^1.4.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.29_1592848057161_0.6324297756996824","host":"s3://npm-registry-packages"}},"1.4.3":{"name":"@apollosproject/data-connector-rock","version":"1.4.3","_id":"@apollosproject/data-connector-rock@1.4.3","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"08a974ab557a8e37cf1db5be21c8e849437658b1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.3.tgz","fileCount":149,"integrity":"sha512-PQxpnD85Fl/CXps22J72W9GYnEdQxkkqzbJ3KJtG+HSZXdSrfrHoLiP23p73Lh4Xj/TWMxQ/W4MR70IkUQsQmg==","signatures":[{"sig":"MEYCIQDNybq2LFYbZQWn0wUE+OJlTqqBlAA8JB5Wk7GnA/8aNgIhAORlLNmSuSBM2WfqIQja1qiR9PW2rMZKhBc823WzBxR4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":889522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8RvYCRA9TVsSAnZWagAA2oYP/juns590+WxFw0Kf6PE+\nsH649XyvAdryADQgEK/Yewd6WkCslt+yZe1toaMC1xZ05/KX5b6s07csW1dr\nSAWz8mwWmhVSiNfr2Nfg0jj215oFGqlDo+Q2M4TWT3bwjruPmbc+FBrvnSJ3\nmZDFgyt5XIB0sOQW+tfye4xnibTJQiwxkT9rt8IWHI1PM8ScoSlHT7OEn+VB\ndHDMWYfw3jF9x1Etts02TnUzl42KwyeS9iR9zK32cB2qqGShn5oDm1Y4nkze\nTYyJrEClnM19lIupHuO+yTN3P8K7v+oQeJ/WPQ2m2IWLvYQBncOb9l2oA6w0\ncptpMJuhK3pWhmlbC1L083jBJsGSwkKoKWxMW4752xT0DuSofijEL0x3GYH6\nvDHU4Izr6q4hWV+4i6V/GEJ3GOIzzxv+6c1bmteYSLMhccRfqDkTHuU/Owmj\ngcFyO1f84uIxswWMYnHv2F7B31Zo8KEFOpL6XJYbjVdSi0cUDlV7QFb2rNeF\n/dpjWbv06Ux2kwd+t/sK79mA+HsBghcrnJOIzqcVwO1tqOPpvido/46b4mN1\ndOQrvcs5ugXqFWDYlYg6UPfDFcYfT52hxbhyq/TQSBzNWoJGesHcWThuoym9\nm79Lh0qYJAJqtpTeL2VpE9IGoVNws41RmneMIQtvCgxCajODn8Mr+cNA9Cjw\nVJR2\r\n=w13P\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"bdf561285dd7286e054009d20ca7066200e7567e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.3","@apollosproject/server-core":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.3","@apollosproject/apollo-server-env-mock":"^1.4.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.3_1592859607955_0.5055570681804866","host":"s3://npm-registry-packages"}},"1.4.1-alpha.30":{"name":"@apollosproject/data-connector-rock","version":"1.4.1-alpha.30","_id":"@apollosproject/data-connector-rock@1.4.1-alpha.30","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"4802a22af40547cb4e9bb1d2e9ae0f63aaaca149","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.1-alpha.30.tgz","fileCount":149,"integrity":"sha512-5JhIFM1tUysWANm92EfqCw4pX5UpmxMF3VZ2yUIMmRKIDQOjyZPU66sFrV8gr+nEx0X1VIB27FXEUf/ytgCGEQ==","signatures":[{"sig":"MEQCIHVFXE0EpjzPQLeRZE7EKTFWTEMXEwcI8e+kj0L9oo6hAiB1xrUPpRI4xQ4Li/3nWlOzQ1GIQlWu+Bj6vOf2W1ze/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":889573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8SBKCRA9TVsSAnZWagAAZCcQAIpbtAav48AxrFZeikdB\n/cfNOgw006G17B8M8DNVD7GtxYOJqCIFTsmj/HrSsYiUG09p9L4mzmCh0cAZ\nUkFF/GAplzYYBdhXQfBhxoWbgSwHac0HF6wC8iPfCxlplQa0fkhLRltGsk03\nnUpeTxckp/BUZQcGIwU/F2mwX0AzZyOqYQCPa3JwpcCPaysdD4zEnF7dojqT\nAADRH5dFwchG3MWu80FO9/C7hMb5R41/I4KTuUNo++USvnM1KtNmMMothhsl\n5C11x4dj0LiU7pDpEj28F7PbrL3joPdNKcmsWIECkYhw1HpoJ2N2lZBykMId\nyXF5e599nCPRQrovmq59lieVvpoYsOwvYuL3g0o+I6OYZCeFcK9FdhM4dXJO\nLmvR5gcoozYBDgr48U4Mkg1ythpWQfS9PW3UKIfFG2WT5ylM46DFTwHUA0HQ\nEmNjJcu7blw1HWdugJGaeZffSodI7582mGv88hMC8y3dLSWalM4qBnujJPXf\n9Qr26uLAhmHfhcfP5WAT/eAsxcxHvQHxpBGR1AkGJGzBYc9cESR1YiIfPeYY\naeiRk+kdPi+bkixGVZeF2gqKDJhz8cw2sE5K9Wfv1JISh5lMi/QJkPX8Yunn\nZEB6R9/uEoHUsn4qXv536bu2oBBW/UGnfDqmkE3wYTOAC1O4jOZfoO+35SDu\nFMJP\r\n=B44C\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"6f49b4dbd95243a08f351742b36c4d9372438607","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.1-alpha.30+6f49b4d","@apollosproject/server-core":"^1.4.1-alpha.30+6f49b4d"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.2","@apollosproject/apollo-server-env-mock":"^1.4.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.1-alpha.30_1592860745669_0.40923985348228675","host":"s3://npm-registry-packages"}},"1.4.4-alpha.0":{"name":"@apollosproject/data-connector-rock","version":"1.4.4-alpha.0","_id":"@apollosproject/data-connector-rock@1.4.4-alpha.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"ae3d80a631c688a85c867745fba9cc7b61a4a3ce","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.4-alpha.0.tgz","fileCount":149,"integrity":"sha512-YSP40hMNf2zx8pxzLK96+RUFjWS6zl/xPEWUSEegaoFpz6O07b/Q7N013/YuqIHxmviAAHd4HMw/dQyGVYzwPA==","signatures":[{"sig":"MEUCIDNrXI4bMDy20AjNoqExzQYdSygvrNVHR9OE6Lns1YXLAiEAs1Up15pXzmE04PNwylDiIgBBEARRSEGgJPPXqkbIfDc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":889554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8lFxCRA9TVsSAnZWagAAvOYP/A0aI2n2la6hmh4E4YYL\n/wOPYlSWdoaqEHt7VllJQ3BtD2XN5sHECP20mjfbANa4xiNvKsHOcvSrljAC\nO01gss4sBQq2QWunBQF+o35Nmpbv6irBXloq4TobrBTX1vuNFYvydywXNp7n\np997/retzi2+6Ve0XDjlLk8CyVEdLmSQ/T8oDq3bTGPSAVCHuVLcsWd1OkYR\n+7RIfxSi5H8J5iG25H7VkrvwclpgYmGMgVznsI23cYwpNOuNQ8exslUXjAov\nE/U03W8daHHL2Uihig9wHmvad0woD2+kqRTkv+qeeLtUr940PuHWdtuehU8L\ny8IoTMfzQeQY7MDiZ5ckEQwwV1XC2CjdFpcfliwkCjkO6Eh45kdne1e8WPzB\n39eeRiAETwO8CESwM75L3qmrBqbVPmNNi3Y2SW9HlSVuiog+MraTNpqMhEeE\nd2YnN5U1/4LW0E792PmyhO7ePPtCQC7H05Z0wO6oLnp/iJ6bt4H9z5AJPhP7\nXk0yAB2oMSRlBtxw2HcqF4KvkVE6fDpmpyPg6Njf9UhnyA5sLVD4laDfLRW4\nG7g2E4L9/ikNcESQo/oXawFDpTrOfzF9nH+jD6iINDBginayUhG2mXCuuIzN\nzBh14RuJlJw3guou/ehKvG+TARXee8BPzD3HCafVhx4tKsVpU+wLskBeUvoA\nHQp/\r\n=Bvf7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"c742b40d42881d2be1d61b923a0e25294dc5c09f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.3","@apollosproject/server-core":"^1.4.4-alpha.0+c742b40"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.3","@apollosproject/apollo-server-env-mock":"^1.4.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.4-alpha.0_1592938865411_0.8576330738917477","host":"s3://npm-registry-packages"}},"1.4.4-alpha.6":{"name":"@apollosproject/data-connector-rock","version":"1.4.4-alpha.6","_id":"@apollosproject/data-connector-rock@1.4.4-alpha.6","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"80e74af32ca2538c6fc0ed0dd8c6403cf8f57169","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.4-alpha.6.tgz","fileCount":149,"integrity":"sha512-vSTvi23DEvg3wMZSJ8dT/XMwq0YhkGFC+HENNwFdDmrw0oswS9M4UDK7cFFP+yIUdfCmbUDwVCV8jr+Fl+PqYQ==","signatures":[{"sig":"MEQCIGapjazQAUUxY+AZh8htBDQ5k20G6qb7IZV78SX3e0CXAiBOJSDK3P6qD+8i1nO8Ngv/7d47sHa7pVqekEwC3TJSAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":890452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBUURCRA9TVsSAnZWagAARQoP/jQSBj27uF2kOU6Bag3Q\nWcHPUOI/swoVWUj1yjEwSDTP864KoKnkjnpXD4p/XK5Z625PX/1qkwWtfKFX\nO/Q+K0b5sBVG7HiCsDwbGMtAKnpm+tMgBie0Xm6N3RWwayx5r0PX6iDvL2bH\nG1K8FDrYIR/Y/6DMh+NB4bHprin6n5Xo/LpfPv7Te7nLX/ppHdDft/kTwK4g\n6Q2nAzcA4hJ0ZQHzHZ2zjwBw44g6uYdGXeisZi4XPklmnbDBXNm+wAbxTxl9\nCBWRWmkSxfkaosRdeUrOW4+iNJ/MuTaojXwcVuEln40rUWmqTECRTbbfhxrR\niC67s7LwBgCyYK3cAhwXv64zvgIFXgvtJQ6TyCe+wJ5jaBpYGw6C4kYIKM3W\npVYix4cWGD7tlJHdXWpbAgxa8FYFA+YvYzGeeClermu/CTOhLLWR7pQC26/I\nrhzEJ5r2jXJazfajDDICkOJjV3Oug/3dKffsQ0xG84qX1YX6hdgYoROJ+VJ4\nzeUE47E/9XKNWKUsDcVRA4YDQwDC0AD7p14rDKSAAKED4bqdokw+/H1ralcO\nlI1FdzxzvIp07nGXdky3q1LlnZk430khUwK2hWElETaasAJjfOW2s35GaGOb\nUTWdRc9iO5tTLBGFkXHo/mVtETL5c21P2JoyQqr7/vfb8czL5zjwokplHDlH\nIOAf\r\n=Txme\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"dc1077c9a45ac4e606c4084f25dbead184b48185","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.3","@apollosproject/server-core":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.3","@apollosproject/apollo-server-env-mock":"^1.4.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.4-alpha.6_1594180880614_0.3106427711589286","host":"s3://npm-registry-packages"}},"1.4.4-alpha.8":{"name":"@apollosproject/data-connector-rock","version":"1.4.4-alpha.8","_id":"@apollosproject/data-connector-rock@1.4.4-alpha.8","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"0d61e13300a86832a44f2114d14590407a48a5c3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.4-alpha.8.tgz","fileCount":151,"integrity":"sha512-CyFDylKoeGE4yEcq8zlw/U9zxWmnlmIcXtGfErsSfMRS6LsC1ihFUi5hOsGTOOITHpuQHfmav942OU4d+Rv8Xg==","signatures":[{"sig":"MEYCIQD4bbuogtNcAakqD0Je3KZTekM0qzXWdU917dYtXuQbfQIhAJbndZulK1FTK+mpq8jazRiD6chX6pwY1QsMbhlF65sg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":897792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGKHKCRA9TVsSAnZWagAA7BUP/A4A02v1F3VYWI+Ri+uf\niHgjXcY4E6RSB8hgAXglI9SX0sK8a68OEwxISGluCapFSY7EUd9XTbFBjM37\nBVUIYC/vS1oOCpq7aYDqqQUxWbpQSiH3B7Sgu9UASet8PMGUu0wRGCXJMd5T\nsagrpAMcORGOjgR88sQiws9Bmp/sjhobSyHhwPVa4KLEE8eUZff3Mbpk5M0I\n6Ol675zeQ2nWiYy22ASaPVvcMaBUqKsMggXE0DJezfEE0NmZvQyAGNmaXv7Q\nF0GjfxHi4dyvplVFEHxe9zSZ9zcDb5hair5Vbz2t/v38hds2j8N3xOoCK8Zq\n8aM66LRbzsG8kTvdhxnHFSxX/8PHF6SPUJ2lQdZLB4+nnMswpmRFge031FQw\nX8pq5bxE3Drw1ytJiT9ibg3aWMWPtyR3VDBDK9LcDF7Hf2IEudRPzrQMZaFF\nl5FljVoBsITH438TRGlXKGrwt0NOYMAJ61Qrk3ZEsBwl1ymRSTQC0sJM+0En\ni++Mo8FZx2xF/EVV3Nppkmokj7H9E7qWJ3y1KrkjeBjh/fNms+HTR0VqUjlD\nUQXFUUkEvohyljWfVMIzrqbt5ENKBTMP0KexceH8J3vJRyM2kv0ryZQeURFG\nCJRK0xNOu9HLE+KssnIZzo0y4CdJAmC1lNUWZpGHFBHf2gqvdMDPH9nq1ijC\nUhiG\r\n=rbV3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"b1636a25ecf30ae59c762b697d169492c698a645","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.4-alpha.8+b1636a2","@apollosproject/server-core":"^1.4.4-alpha.8+b1636a2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.3","@apollosproject/apollo-server-env-mock":"^1.4.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.4-alpha.8_1595449801622_0.35704848520587196","host":"s3://npm-registry-packages"}},"1.4.4-alpha.11":{"name":"@apollosproject/data-connector-rock","version":"1.4.4-alpha.11","_id":"@apollosproject/data-connector-rock@1.4.4-alpha.11","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"09d848df381e7b789fae3a0222cabd89a371a78e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.4-alpha.11.tgz","fileCount":151,"integrity":"sha512-/+6kgHZ7P9DuHKsZmoQxCD+0M+OJHHk1ACBxs5MpBZggUIS/NV2QdkTG/sqPPoJKAOIchHfjeuF/JYyq/bCM+A==","signatures":[{"sig":"MEUCIGUlrDx7sPxTE5/0k2FKLeYotF3ImSgudZXm/YA+j028AiEA6JLtDiWd5Vw1tXXgMDtdcV9QOLE4aOgVp+/hegI15WA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":897829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGZIZCRA9TVsSAnZWagAA4LYQAKQriKVouzJXyoxCQCHh\nwHZ3iE3NT2VeFtJcGlUarH81+N0uexVR07tf258fa15m332Z/sKs6OsIQYpq\n9VcO718AYqM6FOeY+zxB+ZDBUel4m3t0DuvMqE88mAs9Ct7ZV91+K5XUKDj1\ntIAuCJbL7/SaEHIBAba0+hLRFKSbfYwZoJLHqPOs5E9MK8pnVjiwD+6qT9S+\nsAau8foOehzrYXXVm5gQqeNtq/mcliy4/uDmBfe4VBr6gvJAvMV/nVSwJgjh\nvdonT0r7+QtaydQ++yDOTqnWONDcNodkBxMvjbgqbJ9iX8dKBmfg0V8vSVhM\n4ArzZQRVHucD2uo5GOWl+w0H4FZsBf7Ha5S8rWXY2f1tOZgbBshKkV9Je7C6\no30JnYnT7rcyBz9rnwr0mOig4/IJKOE3RNBxsA/MfUuBwDPt8kcY8zuh+fKr\ntIHojs7uJSvz31/f4oUse4p6cTz6+/U/hsYQ02RZk169LwpIUDIy6Iei+dvC\niXOXe39tbfZAPiGt2ReYpQjb22eYHhgsCI5jcBiyf+ala+gqv8M2xjBBRkgo\nimQ6bFa3tE0dt/md23H6VSQQcGVxYyW2Jpb+xAc7NSU8yd1oP9sHGbhV3Cq3\nnMq+b6o8wO638tmeLArarQLygeXPQl5hfZrihkoxO+u092TWlrEcS57jyOj1\nTgAm\r\n=AErL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"fad044aacd6eb3330cfc5e69751b51ac8380fc05","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.3","@apollosproject/server-core":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.3","@apollosproject/apollo-server-env-mock":"^1.4.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.4-alpha.11_1595511321123_0.9969512503350473","host":"s3://npm-registry-packages"}},"1.4.4-alpha.18":{"name":"@apollosproject/data-connector-rock","version":"1.4.4-alpha.18","_id":"@apollosproject/data-connector-rock@1.4.4-alpha.18","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"7ce57f6ceca66a742929aa00cf8a2f3f29db1013","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.4-alpha.18.tgz","fileCount":151,"integrity":"sha512-nUvSxB/Hk6HNkYEABu8hWXe7rmXEbKSRttO7pQDtZz8T5+6zQ9wR8M5Tq0N7IWyYfmEECpcOP7xpAJ0SOp4wrA==","signatures":[{"sig":"MEUCIQDg8DxmPfm+FDgwLHgz93qH3o0T3yK8oLmFBaW7B/fuYwIgKmmhehd+NyHFbiis23ooeQysDf8z3KYH6WjVEO55YlM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":911074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIcaBCRA9TVsSAnZWagAAzfcP/R03gWMUk2lPYDatY66u\nxe2JwKDQZsQDLwYn4HQQHFaC19Gl69duCmdwT094dr0k1lnSBpkPTOrs3vLB\nai/AAdPgi/fjJeiQv3jcOcM2O4bA7d/WXpsZqkE2129mAEzGg8du3LeyYZlx\nPushHZlRlv2d8bRYNrKaIM3WTVZ5FTcsbtir5zKDo6lF7mso61LSNtRJC/1s\nBT2AYiCvnf5EpZBQwDG62eqGNFNiJuHYrQDPWzT72K7LywnoR23Pnb6kb2O2\nZZ5XvXZuNTmlLqtLUq9ElhKUtjg43/PjPkoSDPd+m0LSJA9ISQUVC8aTgmtR\ngvpay2L5kyMHtv04mGo+3SzDnzoGIvfBSCcAR5xsniE4knIp8GD0PBVX0s/p\nmJ2XH2iixfY8JCa1gdwiSX21niW9j62oZr+d+3vtLz+rywr7Sk7KRULwqt8P\n4ncbwDDzHOe0dkL/63If2r2CQ/spNsJGeYKoMohXz9AmC19qlYJEc2TGTy91\nIxLhkn0reK1eDCXWKWbH41dQedD9RzicpN1NOvqjbD7zxIQW7hqvrFcLANUz\nAW328muF16VkrJUg+EgD1mRHD1Nd/XMl0Lqh/d5abRNDfslvzJtVFDeA3yic\nbAKcyDgVXfB2sXWyVvlabiHJAAB6UzcNFtFWm4gkI0E451SKodAmiAS1DCph\nvPx0\r\n=pLnA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"992f21581e7e83313490d50d64c057475dbe15a4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.3","@apollosproject/server-core":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.3","@apollosproject/apollo-server-env-mock":"^1.4.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.4-alpha.18_1596049025176_0.7098968468581897","host":"s3://npm-registry-packages"}},"1.4.4-alpha.19":{"name":"@apollosproject/data-connector-rock","version":"1.4.4-alpha.19","_id":"@apollosproject/data-connector-rock@1.4.4-alpha.19","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"71dbea410bc987b59faa4f2af6b35663637d8f73","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.4-alpha.19.tgz","fileCount":151,"integrity":"sha512-0nUGRQArlTkBg9y+g7gCaYAMa6QjeJb0oA7aZ9ZvgBBug4YDLytihMDe7ltUpvNvZwdzzUknL9YPI85r6EwCnA==","signatures":[{"sig":"MEYCIQCGOMl4j5xrm6fyPIs4Pc8bGyk6T/gcd/5RatF7wydaxQIhAPbzh1DvW6HEQ9eex5vJLoNDUJNLBSijORvzIj+1W4C7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":914940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIyigCRA9TVsSAnZWagAA0QIP/0WElLqlmCIoGQXHKBow\nAR/SUpV1X4qqzEnZREIUgSrAJUWpCi+KRI1VABe15U0vYWxTI1Yu1a27U3Tv\nCXYb34Y6CbBFVeOHsA5RYFsTKhdyoHpx7Z2yDBXlOMcGVu3r/qLswIttIfsh\nai5U+mzbV712gQZPEUhSHF9fCfjSadtCMzoAKUvoFCpaCG5cm+4Yv+9+DNAB\nEB/o8c34Hd2QuOae+NPFjnXgM+CrW/AxcgGygl5ImuZXVK6Q9K/9ZaHC/92F\nkZxtJ1+2xE1pg8KWIjvXy/t3mjg0kxI0TXylD8cj+Fb1Hamg4AIWkH6PeZ9j\nlJraw2OX/7QMOgI/4usnvnnlxU4Q8rENqwqOLPYJN2ItaR50PvsoO0c6z9sf\nZw0slde1sYAsW5cj948irCAzPd4MRT2K61OXkFWjA2jYoc+r7llLDaSEFytP\n4IQKNSR8xp6yN4VyEiy49CnHJx0C20mhU/3OIVhC35VZwOmvSzwnE62m9YPN\n7unWaiWo3T6r77Li8+SCtfgLLUSh1aIoE06cLvBK4kJRU/9MeNOdGtYCAY3B\nv2gRDbOvsGuSCasQ/LLi/PQFOhSvTl4uNlLovdvj0gU9XmfRpb1Er/dpj4zk\nqGqFHvYiP6H/6UFhmtUUtx+DvdBdx/semjq/8zWd99eso9uFiIm/olsddpYQ\nf7Ln\r\n=HtKA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"7a6b0715f9b5fb93446d8b108aa03d47e4033135","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.3","@apollosproject/server-core":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.3","@apollosproject/apollo-server-env-mock":"^1.4.4-alpha.19+7a6b071"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.4-alpha.19_1596139680327_0.36675774559281105","host":"s3://npm-registry-packages"}},"1.4.4-alpha.25":{"name":"@apollosproject/data-connector-rock","version":"1.4.4-alpha.25","_id":"@apollosproject/data-connector-rock@1.4.4-alpha.25","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"d99b8680c930fbc8eb121b825dc4d418a6e4ef5d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.4-alpha.25.tgz","fileCount":151,"integrity":"sha512-/1As8oxZvQh1sugewgGroggJQNmBFIV96xhPNu407XHyMz9KYQsQoq62QAaGqiWwMCNXkvR8bvY5J0a35OWfRA==","signatures":[{"sig":"MEUCID2KEuTUs1LVAmF6C98qGGKyYlbngLGoYuM6V1EsVON6AiEA6P0LmV8/TNUv+T9lPhy4YdlHgtVzOh89KWxj9JH+Tuc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":921649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJDr/CRA9TVsSAnZWagAATKgP/1OaGNTKaSyZJYM8R/Py\nSs0Z1DbsiPPVamn35Gazm0bnFhhbB55yqM+8+dL4geNtngVdqGTVuEj8134M\n+/FFiAoqScwHFDHb1fcYxhNveZxD3DJv5SaHieKYt56gpxE7u4yCUqga9gXC\njU24jgYmlQCOzMcG6PSYg5j+Pf5KgzEFQyXzKB7PykgmikZEa5h0DiFHi0Zn\nc8hsQ52w7AS2QXJ6urj6ahHxjktcqEhqRW1klDwIsgl+jB74CUIa/Ho3+Qn5\ndO4pq0IoSlLSLepkA/byO3Bhk1fpF5BmhB1CLN4GWOjTzG+vG9pSFOmMt0NR\ncHiwu/p3BN0Nzx3v77lcNI66pOyFVJ9JOrLUHmbezUqJKSDFfKMTsVsRR9vM\nNJRZJI4GLbacMoE7eTDzg59gr/hu/gqqjuc/wCtz6li23lfb1/fBRBZuGLvk\nfjP/4HQTErNX609CySs6qjjo9MltvsXXIFIJQbOoy6EoW8xnHeZ33W4LzncL\niYkDsaoDKn3Idz0Lw4qsbBihEyNikref+Lo4o9kLGhV3LHjCItaJgjQIc08a\nQuorgIdL9sNJegqCYMyG1/RbrlA0J7a90MYA0CDxV500mJGBPo2+4QdGZnE7\nwTJkbKJvzLFTZCRYc/fX8OHrNgX3Z6/ZpGVFIPybC/zvtNYNLVraoIS3Qk2D\neRWh\r\n=hqB/\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"06ed09752c5b2970d0ecf468b67ede292b93663c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.3","@apollosproject/server-core":"^1.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.3","@apollosproject/apollo-server-env-mock":"^1.4.4-alpha.25+06ed097"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.4-alpha.25_1596209918769_0.7261056848052907","host":"s3://npm-registry-packages"}},"1.5.0-beta.0":{"name":"@apollosproject/data-connector-rock","version":"1.5.0-beta.0","_id":"@apollosproject/data-connector-rock@1.5.0-beta.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"ee3ee9b077854a6856428b909b4cef66fb186aed","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.5.0-beta.0.tgz","fileCount":151,"integrity":"sha512-jdFfJqJrXIN+O3/f0lf752hyV7oi4fVVp5aqJekRl7xkq0/ArQ0LySk8qKwd8yp9QL0VcQcFydM+bkZovX9bwg==","signatures":[{"sig":"MEUCIQCR1wgc+IlZ9g9Z2d4d/njJRYBydiPNIyXm+YnHCVme4wIgWjIGA/7qtPEsl5SmzX3sNukwSulodfBvFoc1CBJpJoI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":921650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKCR9CRA9TVsSAnZWagAAetcP/3k3mSXcTPyCbpYI/7Rl\n8BWayOquVpQ6SvD+zxvopWGzLqlKDOUsAtZmlCmz37Ue3czEcTIgCED7/yQm\nOvJXiXkhFQ9oVaMMrsxdg3ce6LBirx26LQt8FCgZN8+TaATTB4doiLhs61zY\nBo9VTMeexKF+eg8brgEoQvTwca6JvFSLCSvvG6dGpKqUP8jayhzNEzeHGkEZ\nF5g88Kzrr45/LMc++RF6ckbnZdENyOZeayXt64dT1r26n/gYr6vxnggOt22c\nV9a0Vuilu2X+Xw0ubNk5gTiB7XJPKuTAyvSrcMEFOyqgn6bMFz4y9lkmUUuw\n6SQ+wh0EGHdNpccm/uUAXl2ixR5BdWEoHYY1xz6r+o0D419k4SVxIM+mdN+R\nsgzBZwP94v0VrPm9W4Oap7OClh7IoQGZ6Y+4CgXYSZU/JERS0nB/1Qsmr8en\nhbDzlAAM3JX0unhmMKLDIwB4OVbQYplG/TuKjU8art5cS7L/+2qkcRRk4CQ8\n+0IMlWUtlCGw2zLAmyYASrsMsMUSUXF4usLi61h0cAvo1Hr3uGwGzkoE5drW\nHCu7mti4ngI9SCOu/1uxF/8EwuYDq3jttYX42sXyq80RQ/WoBzY7BnZG1af5\nGcV+CTM63LX6yoh8T8qDHtFbdkVTLPYtRx399CWYM7zXKHIKUemH5689Vn5m\ni9Cq\r\n=vjTQ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"2e17a4083318659c99c961cc3e6151077c77d1e1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.21.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.21.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.5.0-beta.0","@apollosproject/server-core":"^1.5.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.5.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.5.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.5.0-beta.0_1596466301357_0.20575740119611208","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@apollosproject/data-connector-rock","version":"1.5.0","_id":"@apollosproject/data-connector-rock@1.5.0","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"324d7be4fe9659a6916695828ab6755b14904b2d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.5.0.tgz","fileCount":151,"integrity":"sha512-X94a5Io49r8dFHqCfsg3aaMELlDwSjjHv/1huhVtxjQQvOLwIgvM1j3FS7ORccx7oeDzrb0MeElzI6+3Zn1crA==","signatures":[{"sig":"MEUCIFoR8fmqyUkfNfChvBx0pu+h8AHQk4jHSk2rYIUHwzYCAiEAtCbX49GCI69PveRO/CsLI565yjtu9kS/nS4exvhRpDY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":921615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPBc0CRA9TVsSAnZWagAA8PQP/3yJmAB8CjXNa4xGO38S\noHCNmQ8wfn3NIbhhW8Ff58fXrMt2//Da33CgqLi01CqDFbQ+glyZPv9dv01t\nM4hw2AOIPE69pBECnyOsJSNOnG6R/6IHhiFrqQ9axyQIupbeh2BdIbpRA08E\nD+lPEOWcgyX2X2/+YnP1YDxh95pKCzvo1tNHTCz8gsM6wPRWXJd7O1W4LA4a\nnFbCYK81iLwVSAb7pRMSWennE/xW2/RvKq8XsTzQpM9dUUtcwIeeP3DzC3/x\nZpVmiAPPW12e1naEutxRKoT87VASvIy5tVFDR439sG3oX8J1SjnWiAdHxTOQ\nXQrjmmiYpIfpmlSKQm0LoJinde5P9mMLGmdeFiAMWHNnPVRGDBRB/37Yzg5A\nCjEpAxD80wwDXzA4Vv0L8WSkhR7o63mEWAz0cbSKJU+B1YvMKQq+RaiBKL5w\neseADU+MOql5hBbWN1HYED/TLHSaf7gDpcWppQ7N7ApKqw9ofDOQ6xdOQag9\ncjLgC7qE2oBxO7JvLmHUCwuvTTrowpHs9LOPHuKLGMVfTAMNrhlolSlhOaDe\nmfP1dZq+gSIE0jdloKilCBxjypD3/VGdvnJZGlknWxwpUWe3MT7CNqIwOcts\nI8yzqDfodoZHTNCwtwjMHKfHncK0E8HspD1mMIeweh2LR7Y/Jy5eKzJILCro\n1E4J\r\n=R2dU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"1b15ae5ba0fad601321b62084101b3728ba2fd1a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.21.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.21.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.5.0","@apollosproject/server-core":"^1.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.5.0","@apollosproject/apollo-server-env-mock":"^1.5.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.5.0_1597773620256_0.786955709444227","host":"s3://npm-registry-packages"}},"1.4.4-alpha.35":{"name":"@apollosproject/data-connector-rock","version":"1.4.4-alpha.35","_id":"@apollosproject/data-connector-rock@1.4.4-alpha.35","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"24f716642e7e5c46637752e312c8596974904f04","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.4-alpha.35.tgz","fileCount":151,"integrity":"sha512-SAa4o6hrPQq08LoicLmkLLXkTTrzKH0CW22GbqhIoEEEFXDP4NLY/Vmnn9xdvmgIkRLd1L4lw4QLzYk2a64XPA==","signatures":[{"sig":"MEUCIQDMt3/m4vd5fDZZ3QoWh0iKI9NVrLnFDsNXSqMXxyhLYQIgNDmkIYM474GcAkv8CzIVn342RigVqE/xyDZ/1DaupYc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":921700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPCqaCRA9TVsSAnZWagAA7JkP/R50rfxxA0O66G/j63Hk\nhbQ8NvMfoe5a/coe2ak15fbUuy8UfyKTDDY4gX4ROyx3FPtZFJQNK3VEe00L\nV6GLc34nqNT2ZVjBPmq7GC3p0P9zk0vH36HvPaayMKokRjof03vntJb/xVpU\nlFXrEfoVZjCaahoqb/DMqjhfMu5mWhA/SF5TVfGJyCUCTvCGU8OvpjrKj78F\ny4ZE9yHCV09Sqck14a9UAkli0Rp7MwmIaM+klP+g9Wkp6hggk6/kLxwczxb9\nEyqpvPTWN7bQw40gUb7d8r9NWIxsBuluUAWIeIGEfQzgys3TuPHsluZSqDiN\nJnnvmzNhIJvmx6EdmOYy/lNgSQAZQh7cgVme4ye4+CLRQHcTJ+zO6J2Tbip5\nU87dMt9LgqTQ75Q3dES4s2m0y8yI0IlSMueJHEgmh0t2B6QpEYavEBZH2n4K\nUe7QmVfrdJUQ7XSKPOALLzdOE/I/e6K8382/xXgtRnficCwndHaRZsRDXwHK\nRqs5RMULcnFL886wkPO0HK94UIFRoUj/IHGjvSpn1o1IHoIljsaP+9GK1KYP\nLb+iEGp4GEuO9QhVrQhVKMWXzeJx1Fnb/pc0RdCKC6NS4GzcxptajAPP5uWI\nKetseBq+VRE/tgyNcmicggE51w120EUdc7krKsg4+fCyC37RQKE2sMXpW7ow\nZmgU\r\n=zCxe\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"4c9bb1ab683b52530b3a11af194c8cd09d977fe4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.4.4-alpha.35+4c9bb1a","@apollosproject/server-core":"^1.4.4-alpha.35+4c9bb1a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.4.4-alpha.35+4c9bb1a","@apollosproject/apollo-server-env-mock":"^1.4.4-alpha.35+4c9bb1a"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.4-alpha.35_1597778585950_0.11261397694708952","host":"s3://npm-registry-packages"}},"1.4.4-alpha.37":{"name":"@apollosproject/data-connector-rock","version":"1.4.4-alpha.37","_id":"@apollosproject/data-connector-rock@1.4.4-alpha.37","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/ApollosProject/apollos-prototype#readme","dist":{"shasum":"6f1d41d5ce08658c9ba92722d583a28a20bd338e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.4.4-alpha.37.tgz","fileCount":151,"integrity":"sha512-6K1frc5wh/brRYCmuWaK5mMLhQr6I5RtmuvOJOmouTmjN2EkwYawdhNeQWlrmjPZGSrS8dZ8FNQkXhOOiTomvw==","signatures":[{"sig":"MEUCIQDcE1DJGu0pcSDz1IP4KNllYtGgb/o/JyZDSdtbuGW38AIgZX4R7OmJT156L4hnhaWn4sFOptjIhbLC3cCKUe/ViVw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":921632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPELmCRA9TVsSAnZWagAAMnsQAJ99xQsHilIWu0PI53Yj\nP9F3KOxhr3TGXXaP1xnc17O3XuljqT2AH83ncT8lmdK3GXS8G9SCxg8zuS94\nDqDMJUC403qCpJU4ocC9Os5KXo2hCYAKPI66RNxr5xuHpYofTIacpNaHaA2e\nQq6d6LsvEslJ4rkfnSPZq7OftJnweyqyFttRsVvB8cxLxxC8pVFQrfJoOapk\nrNFdos05k4MyiuOosXXFCnKcjIeM0vSSWVAkuOqGGC9XIeozzXzx4aNdGV3F\nCZrHNR2TOUiw0k61wmwtnooif3/8UdQ+OFK9/igo3Uq2KbIg821b7huDkwW8\nF/HI/7ecI8Rq1EX+DH35dGpC/HqyNfjoK70dUUzlSze0FDQ6wj4r1Ydm8wQf\nf2/3iJachuDjrkc6T+ngEAJ+3g02Z936tNDTB2jiUCVqI/hiyeu/h7+npBhs\nDf6m+Iw6XcCT8SskUGD+XSMhKpjoZKWLUpMCZ7PtmoSVSS622daKTx/HiDd1\n7lddF7ihme0DxyeEefc1J1NJ2Ca+9kkMR+n8FWFY96BfQEMcLAacgMbPcmRm\n0JZ3ED3r/Ce+jz/9oxdqdHr0+LmJ9WINej0cQTX5Rdny8P1ou24m3s3O2KZV\nk89tu9wiAyp+DDyaqOkq54ncVEzfEhIilWIX7CZZ76aviSBomyhoHXfXXk88\nu1U2\r\n=s0BO\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"e285890e40dc49cb0c250f73bd926cd69f4164ef","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.5.0","@apollosproject/server-core":"^1.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.5.0","@apollosproject/apollo-server-env-mock":"^1.5.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.4.4-alpha.37_1597784805985_0.3631175478603379","host":"s3://npm-registry-packages"}},"1.5.1-alpha.3":{"name":"@apollosproject/data-connector-rock","version":"1.5.1-alpha.3","_id":"@apollosproject/data-connector-rock@1.5.1-alpha.3","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"315128d9b61005e81114ddd20eef6cf4ab7f1a61","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.5.1-alpha.3.tgz","fileCount":151,"integrity":"sha512-8TbF57fdHgsvrxXMTX4C9NulMcMaZYSMmrpVaX51bsFULNGZeCcNqDN3Bth6QxGj4gLhZkbJz7OJHHEIRk9/8Q==","signatures":[{"sig":"MEUCIH8lBE+fs/s//K4TZ+zS8odS94MRbrHRkVR/Yi+kLoArAiEA20Mnus10KW0PP/pots5GwTycdhbG0U7e+eSek+bgGuc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":921550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRnn0CRA9TVsSAnZWagAAwK0P/j/LN7w29Y3XSxyvNTS3\ncQPLMB7DpfEsIWqOnsm2oGlucPrZCddvHouGlVLgfFiGmeGH0OsooHQ8UYmX\niknasM0X4ow3X/ysDYmoWevXGjxJONizKLa5frG7S5t4FeSAtZeqiiPwfkUN\n9aRh/ygJ+Lh0F2szphEwuddzitOyJDdj8w0QFJf3HJSqXzyGGUDfZmUMe/c5\nGbY1S+jjcn+lswjeYYZk7FX+KUzdfVM2sE/TxkqNVw1kCrUkdTdvvB/qbREA\nP0SCUq6eoJSS0ff5yVEaUwzKKzXNFiDVKHDhK8oMYKqxfUPcRUg5agakHLj2\n7T+aYt0iJcA4SBIIyRBIeGSDWMbOq725uIN+PJEd1wVzEreMIIuaTuqOhiAv\nXG3mVBAHhLOWHgolkhqK2SFOuYANS0qb4FGAzA5HW64UA6oviBE9hdhvGLeD\nEzgGJsgjyb7U9B/IpQN+izwK5081oNhjamJru6W81yJHblC3I2NbyX++CXKa\narGoN7+yPYGnTYZaOb2Z7M2NjDxNxA3RFEzOFw3KVEXNIRP2lJAinjyx/Vmu\nGxvw3Fqx6DcBDpUaKWEzpuB2nQ3f14eAGFrvaiBL7ZW1crEcSNyhFW2mWzLm\nIMUGHZ6Nj0D+ecnWnkF2A1NVPsxVwZCLDSq9e8VGy4X5f2qgzQ59FtKtEO5i\n+7hL\r\n=6NB3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"d1b06d113b03d225238724a3287d20f97e5c7870","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.5.0","@apollosproject/server-core":"^1.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.5.0","@apollosproject/apollo-server-env-mock":"^1.5.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.5.1-alpha.3_1598454259953_0.6554025337820915","host":"s3://npm-registry-packages"}},"1.5.1-alpha.5":{"name":"@apollosproject/data-connector-rock","version":"1.5.1-alpha.5","_id":"@apollosproject/data-connector-rock@1.5.1-alpha.5","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"af664c3fe2f9778c3732a430ac93be0834f4fc22","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.5.1-alpha.5.tgz","fileCount":151,"integrity":"sha512-Jo8RwlL18qudfsZ3ZZnIB9gNzhkLKa3V6IngsFRh+vEqxBXTtcFSx0UxtT+LqcDHyL/hQAKu56UEkF70iIYTVw==","signatures":[{"sig":"MEUCIB24w8zYqfb+SQ/247eXkbrzBJKrMrh2WIMuVmbMGZDDAiEArRAN6AuIMtSJWXz//Z0fYQBAaDtGCc8uA6vMzBh8tn4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":921581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTXBRCRA9TVsSAnZWagAApkYP/1Wfn44SAYg0F6yU/iGT\n1AaACYEiLbiffkqCCXwGkPIz+WJZLFoq6p+s+Lcfx9BEsyZG4MigXDyZNcsH\nT6T/Lb8G3TUyuQ0Otg+mgO64lWSAGUs7MaXUSokvDXdtcvJlth5ZpGW4HtWN\n7V1GFGIwUE098IBfCrp/oJsqR9VnOgW5jnrdKkxzOcegApcygdyMNA6qKMY1\nP3vaSGd7ppJ0c030gZLQgrs+zFb/VCGCjEvMH8ldQhb2TgvUaR0poibx71xA\nR0i7TiaUaSWBWS+EMMcX4UgeqGKbWXg/Zc9hxXhzn/XInJ83QgD8Rp7qHaB0\nVsAoifDKJd6zGhgvOA0gLWk8IX1PYfGPftDYJ5HNRB9LxtffXKAUJxOBZ6dd\nELrzmB3vT0y9MwSWqMxlWEvZjYRSpz9IgIvzWElcGlryVJp+6ilB/6clZ9iX\nvjP2ax379OpPVbSIr/tZUvwjk6KyCKNfuLO85KhPaRszgdKmSE9HpaWV9MF5\ntdCuzciFffXjVVzZdWZ5Lpdfkb2LEbbkmnN+odfJsj9zbl90o+p6l/pVdkcB\niFzdJjj422K6/6Eny+/WcM1fVzA66nYXjDZHOFNeAZtXazi5LKj/+mBCvK0J\nFk/M7pc67ezdFdwas5lPfc/ow8k/puajdC6Wi8ugiderWokYqDvIsSLfkJPo\nN6/g\r\n=euQi\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"054015522fc512db77d0b0e01ff7754a73c16fe3","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.5.1-alpha.5+0540155","@apollosproject/server-core":"^1.5.1-alpha.5+0540155"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.5.0","@apollosproject/apollo-server-env-mock":"^1.5.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.5.1-alpha.5_1598910545471_0.6710436263811836","host":"s3://npm-registry-packages"}},"1.5.1-alpha.6":{"name":"@apollosproject/data-connector-rock","version":"1.5.1-alpha.6","_id":"@apollosproject/data-connector-rock@1.5.1-alpha.6","maintainers":[{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"66e519d052cd0cf04acd823bc3d6a805e5992234","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.5.1-alpha.6.tgz","fileCount":151,"integrity":"sha512-vdY8OzsqudX41tPN+ovTOzTbNuIn9lzdJU8e+tTHbUfyl6boDIXe4LoUYMl2A19NKjDCmIBdsjTwsIP0ilGLtA==","signatures":[{"sig":"MEQCIFoAOLBWN7kr6xJC7NRmOqjpuf4oy8clFmI/99z3hB9NAiAuCUa38G8BJ+AOdsf3zMxaKva1xkSSi+54Qf3Ii5lx+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":921581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUUZoCRA9TVsSAnZWagAA4xoP/2OC9gnJxdDIFj2tDKDV\nkzfXiba4gKvoieNZz2sMg/ZwB0Tb2NViDelXZ3wpf8AO+pKzFq4TglWzJIwX\nlCDuJm2Kw5Ct4kpWtbm5R8+VRsv7Jjp2TkVAFSO9om1FGDxtwmBEil+8/vES\npE8aGz8PfOOAqpfhnIC2f16tQq/qm3Ad+zJiQsnNdNncUYD2IG2340ya0IXf\nbaysLtdS590sXDH4sl+Ao6QzqzKWaKCxxbIa9nc8Vy5JVx3chHOZGbne7nWX\nNCEISIG6dZ7fhonxZAWOokUyre2u3zrOj5ZSqXf8M1LPDEoNY3zdEmKuf/eB\nkPWwoF6XWrLze0uvHi6u0GsdwrhzmFFJvqjuPU4HVSyy3NgShkbB2JqYBDlP\nb45HrIfIPaJ4zOxyoz1SO3T9gWkHVre8RLSnd89yzZtruSwFISdQZ/dDwEqP\nL/h4I91xynpPDLh6eBtqR28Jwl3aV/Q6RQZa8U9xWh39Y672jRRH4TRMkO29\nI23wSw0IIcFMQeLXKOqqmp1nLozGhVnV4FUzSBimxT0Gctm/ibb74lArdm0V\nWOHrUg/QsEmmOpg76C6pfWHQI8IMd7C9ZTwQDD2jz++ASmvN6+OwYR2EXhjW\n092VfJn1Y8EduIfL4LNLG1bSKSg7yKRE7RvBqRuPJc49Hw848/X0/fHCV4kJ\nr7tz\r\n=IoD7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"449dda0f58c3cd9be5a3b3c493af2cecc0715318","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.5.1-alpha.6+449dda0","@apollosproject/server-core":"^1.5.1-alpha.6+449dda0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.5.0","@apollosproject/apollo-server-env-mock":"^1.5.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.5.1-alpha.6_1599161960127_0.6104396976998143","host":"s3://npm-registry-packages"}},"1.5.1-alpha.31":{"name":"@apollosproject/data-connector-rock","version":"1.5.1-alpha.31","_id":"@apollosproject/data-connector-rock@1.5.1-alpha.31","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1da34c062a32ac93bcc3015f4c672759ab925c58","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.5.1-alpha.31.tgz","fileCount":151,"integrity":"sha512-/U7BHMRa+8LX5J7TZOhPY/dikGHVDOBOk8z9rDRyd4dsv/BgRWIlSgPJZ0ywItO61KJuJ7BHGMZvN28ETLEfgA==","signatures":[{"sig":"MEYCIQC7kYj1Gkm5QmpxjiyDIn8/cGWpLlayCXm4W5liXkoDawIhAIqYlsYyOVTB/sE9C/2KqbixJ4wpRe11soOf8eG3gLcZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":921623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfY3cKCRA9TVsSAnZWagAAdcEP/01gdNSjHJV9xdl9KUUe\nEUCwE8GFUY9zGcoeashv4uax7mIMQwF7CvV958j6Dzrzto1+nADBrs8spSAM\n8c5BNhjdrO6rQRoVkPFV4c22X6oIjIKjBB9GsTwjz3CRS89HmP1HGSBG0yk0\nY+4frXSqncgsDpYqracBQtH59ZyAP+UT+Ae4SgTjqrZ5kcmUbpT1tl0eBDcR\nF6fQVUvTLkW5ytt1YWpZCMq2gKkLC1TLYerwXwfc1x2uOgeNXAJFxwJ86Xwv\neGQq/YKBBFOsZ/N64JvgcEpC/3BOvXFYRuDFCW/hxdhUsRaB8Az7cx3EvGcw\n3BtvnN7dxC0jYeBrmfDpZmqcavJGii3euQJUEL6OFKFPiGV2SIr8kOtAzn0z\nXG2RrRhH/3ySKWklB63POyqRrf+hNAcbd14aoGM6cq91j/hb6OlTg6PuAj1/\n08+9XQ9ycjc8L3EZvEphrhfhbOL4FdtXPhxRrF2tb3n8HOYO3VGxvDh7zjbM\nCeqpRExSHnfGC9wxPVIy//fCWAf3MdGKShANYmfGaBsGVHtXuR7ZNP8/ZgxR\nA/JM4eYHURmbfcxlx4RGEbF/5nm9U44XRH3TWB8P+7ypV6vgc6jC/rTVy95X\n5LGAVhgbCDORa/2QvFgIHFqXWIwStvTni01Yc+OUqo8cavp6YDa15ho3dmFr\nI0Mb\r\n=vCNl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"8af55092e3d61d66fb7423a5b5b6d6a2ece9bcb8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.5.1-alpha.31+8af55092","@apollosproject/server-core":"^1.5.1-alpha.31+8af55092"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.5.1-alpha.31+8af55092","@apollosproject/apollo-server-env-mock":"^1.5.1-alpha.31+8af55092"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.5.1-alpha.31_1600354057744_0.707824597142922","host":"s3://npm-registry-packages"}},"1.5.1-alpha.35":{"name":"@apollosproject/data-connector-rock","version":"1.5.1-alpha.35","_id":"@apollosproject/data-connector-rock@1.5.1-alpha.35","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b62e595ed51b94423cd776d5f12a34a60384c7b3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.5.1-alpha.35.tgz","fileCount":151,"integrity":"sha512-DyxYK2TiscVWDuiVvwsxGvQwAVoya3OA0Ao3coWm+Z+DOERGstFak2Gn+DsazGgTN4Fq+dqQ2zxD7oHI7bTP4Q==","signatures":[{"sig":"MEUCIQDU2O/ZuCuH4QhlMdUd2OMBqJhB0zC5PzGg+vSXuUrfrgIgXkbR1eyjd7j87as0iwJQZX9DfTbc4ggQNk7LLaYcRT0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":923853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZNUzCRA9TVsSAnZWagAA/p0QAKIh9EAEzCjpvVqQ/6UD\nYCX4sKYSwQ2onsC85wm62hhIB4VJI2o70KJqptR5wj6BFtwCO5gXkNsNplBd\nTXmr1kOwkU0Jxc8ncvFtwAdvOUEf8P2JEWYwad/nZJq2+QDXf/ZzzhwT/b+F\nLXNHdQELzfi5adTxGESVPhOy+Btxbm7vTl7iWE4Ngz36SdjyAgnEVx5rsxXN\nm7agDHsPxyfVGlBBalqVPMPPvo1RS5CFOPmnhnytFUCj4Rvnr95Aw4wwcaxT\nRA3MX6ZYDYzHd1ndgSmeE8RW3VZerC2QUzy8lnqNX1znSn9W8P2p+FGPgJIg\nJoPo3VW2XBlMS4vR1bt9zsJq/n3CNON7SdEUeT7AIdWQBs/CjlPuBhq6uyDy\ncle9iMjcf9YG9KA3v9xOKiaz8hwmk1mlVmY2Sew2dA/wtbMHy2FKxyEd3MTm\nXAZDcsl2LDvpE0afKW+ikuAobTf04Ad4V7Ly02ta6QNJmmfoT9SXGx+MjINj\nJFm4B1l35qPansslrVvyP2alLRrLrDZvMKO1iNcznUgzOo1XZ36IMr2lC3e1\nuCOEXdNbSs04ObTMRQvy4NomFM+3HmUs3K8ZhtOK1PRdJHDVF1Q83BMXE4ze\nApqBNm7N7ab6dwkLNX/h1AuGgW77/QLYbWq07Tvni+BNKM1VJFlTk8wED+WV\np0hL\r\n=/OwS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"e44a5b74c11610c38b34e80ef3800dbe26441424","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.5.1-alpha.35+e44a5b74","@apollosproject/server-core":"^1.5.1-alpha.35+e44a5b74"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.5.0","@apollosproject/apollo-server-env-mock":"^1.5.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.5.1-alpha.35_1600443699122_0.7775377035963533","host":"s3://npm-registry-packages"}},"1.5.1-alpha.39":{"name":"@apollosproject/data-connector-rock","version":"1.5.1-alpha.39","_id":"@apollosproject/data-connector-rock@1.5.1-alpha.39","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e17a8227c48b10f5ad98d29899a29a720f595eb8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.5.1-alpha.39.tgz","fileCount":151,"integrity":"sha512-g7d11O3zJ3fcfvq/CHLjayvHPrGrwYuKUBS5ztrWN0yn7yLxYJEY3G8hPRRVtLTmlYroQjrLCTBG5lUd5hhzWA==","signatures":[{"sig":"MEUCIQCJEb7eMHe/PBNS7Aoq4KDRnPB48MV2m5KOf+YDsqeecwIgMAn+CSJepA1cfZHwIHTNcXc1LXiqz9yyUxudSxkATVA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":923835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaNdcCRA9TVsSAnZWagAAsZIP/2AGnKcmL9lWkZWeOq/0\nSchBvITEUbzQKpWr3vSKwMwIyn31V6a4IGVxbJBkzx2LB6HiyMXC/LO3PF/N\nzL936vpxDNQn4jsMDV5M3gzql9jQMtmFIQ0YceVWnDlUIQffYfNTfZUz4AmX\nnAxxifI+nM19Rx+2/zqttqwZW1bHctFYKLhUaFkQpOxATpg/T13pXEEEMGv3\n1ZjSF3LDTD34pBlzReffLkSOsqQ7FngzRMCyVUNya6BaBhiAJSdRbNny8jLQ\nN/QMavBCYQOXoMN3lPWRAk54vasBV/jWtUOBCwqXfSNHF9+4QDui1wkj0YPq\nXVZtrvCVXTYBqEUxdgQt/js1QunaCkfT7UUDaPi/3MWSCoiHjw7xPiCmVBmK\nq6rBB1bww2/AgNqA6slhnYGwhwdhly9cEr0gzgFTO5SHJi4GQ6Xa1ltAMgNT\nbF/nCddbUXk54/tENKjJYuqcSiyyxQ+TOEKcVw1c4ko7FQOiF+kLmdlLNNPU\nlOgCrwJOiVYx4ovnhCRxyzaVEtWTjUslbkgfsbzpWkcQ3kKOZtyixaxoF5mq\n8tV/mI/8+gLMpsnTdWOuUSlzJu3t7PMmWPiO7380Ek6ECnU4C8zoU7VogUyu\nYD+XqKdMoevJXgYP2hxQAqYnvER4ccFOhQmNCnrdeCRPWjhqpATshNaOmLcC\nov6n\r\n=U8NO\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"61df96266e04a52c1abbd082e3990f2510c3b116","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.5.0","@apollosproject/server-core":"^1.5.1-alpha.39+61df9626"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.5.0","@apollosproject/apollo-server-env-mock":"^1.5.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.5.1-alpha.39_1600706396465_0.46720040596757695","host":"s3://npm-registry-packages"}},"1.6.0-beta.0":{"name":"@apollosproject/data-connector-rock","version":"1.6.0-beta.0","_id":"@apollosproject/data-connector-rock@1.6.0-beta.0","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"60b2142de3711b74b4bf7c09c6c1a030d4190464","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.0-beta.0.tgz","fileCount":152,"integrity":"sha512-GHahFsP2O3eF/2+kwGCaqsNyPPBt+ZKQC4VqLxLmtNkD6t05tITAGQD4YpaFVoi5OiqgPfTaUJylxBmjhchHLA==","signatures":[{"sig":"MEUCIBtRtdYnb5OXkGJ1mgNJ3w0jJpwL+qLTbL7eltWe+UxvAiEA2kvLtVet+F0lN4p1LKrPd4foNWdbmebhhCurLKdHZfU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":924541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaSZLCRA9TVsSAnZWagAAY3UP/1LeV1f65gXQGyxRRvQj\nBgVxzurvuXvPe357H6xgvSxJ/TAgQTdGieWCvrKD3zEYyb/HTFDUixIxsl3I\ncxRzfJ0/rw0LhMRbmemn26rupeqEkkj2wYNZaxKtQy94Zco2R/D3Gdnp/NIs\nqSLLFAFKditvrBbNA7+f5YHhKZxED74YyaJmGLTQaFwx/L0PZGK2rIIwp16V\nOOQpTunXttIycjR6SwJyYEscdw0gDeQEUoPLeSwb1+gKd6I3BM3oZOtNxccX\nZ7yi22NJ0UXIEg/LUsPrHcu8+ggSyVf+i67MHOjyljZcbmQVsoceFsmBpaMb\nuwwxJAzwZLO8nJH8rhCMUKKVTMW0it1FzIpz+OciDHDgGWDaNP7n/mUGjH09\nAm3GGkvQgdmqrRqqCOWsuzyO3tntII74Vkx9HNjpbFzXLnRoAh7VhrqIR12/\nUVyy7RvpDdvcE8pU/9zQF1Pz0tuZ4KeVVLgX6dveEkwafV9cXgpK9JTl79X+\nbI8nxImpJIvuFNl9XmCkcOMr8dIA414H0xItznpcml3vIL5V8y+Yuq2tirHk\nBYShzhiORDo/KsOSgcBbFIoP4jLcEThYDkmdktT80ELXsdxF7gBWYCyJbKVt\nzWOugGAy1yDaAYxHCfmcFcKySZllIRBLxFoA+P6gBM3FZDxAwXEXxJ4FZER+\nxeED\r\n=P7Kn\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"d1bbe6ba5e5061eeb417e481c46e490e567a5f92","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.0-beta.0","@apollosproject/server-core":"^1.6.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.6.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.0-beta.0_1600726603169_0.46830135059574696","host":"s3://npm-registry-packages"}},"1.6.0-alpha.0":{"name":"@apollosproject/data-connector-rock","version":"1.6.0-alpha.0","_id":"@apollosproject/data-connector-rock@1.6.0-alpha.0","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3c6084a163c9b19b0fa12ce12baf873e92b484cb","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.0-alpha.0.tgz","fileCount":152,"integrity":"sha512-NOnGtDs6edJ5qIVgBSgNzgZ0JI7xUqZCy7BCUfNjgJO6MJ2K1+xq3J55cRaMP3fEmDaev+LRRceig2DCjUdV5g==","signatures":[{"sig":"MEYCIQDPuTrUAaC2BOH1ZQpPiu6PhBWDOX6+ZbeFQORC198F3QIhALJqSFfPQV1GLoRcOCVbgjTzxg3nSrojbPC9pXm63Z6w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":924561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfafbHCRA9TVsSAnZWagAAP8AP/02xXgsPP1axmiwimxBI\nO4N06amGhOi6+JgPDhNTE4NTufHl+uXFDiBmLd8iyTriETTCEDiugpw69rLb\nPCUIOXcglYPWJcaTsOMDEeMyfu7EtoWt+w5BJiJNV4Z6aSBswkjz9GbAcwr0\n/7jgZiDeafYxdxGnF85arARAH/dvqWzeV3vSWUunFNe+NBRjxL01OYqCDUyw\nsxAtMzBbAe+n8ijeLpjzN12njv8HOI8EVW+R+WTX3q0bH7zdVJXgkae+lQk0\n7cLNLbeE3pW6m75cJQOwOVKFXkt//fkMGIm5S+CdjlWvMabIbYgaZreUHSi0\nNFw+9fNE8xxT+IvWHi1MsmaYyQ0G4BdyMNiuQLeYGXmfNJyd7ca36gXJuMPM\nC3CqmmOZkDySCZTwcO0/N6KhT5GWD5MSOYEWPKBX7qYMG+uG9nPViyxNWl9T\ncpN7SjEyGOeIWfAkGfPezto7yRUL1M3XzDoavAUcfeMYGEHylA1WlkgtpRRT\naURcsy2jIPWL2jGWlOqrBvHCGcWPT785N0IfvnfuMcqaklylUVAkxoCwa2Tk\nUfwOxSWdAN8Bbyb8Ol63TQVTPETkNnMds1KMZTc/3FTwLV9TC6pzYM4lvsG0\njdv7YdiPQOqmppyAtTw1jLHLq/D0SJvZ03PysdQE9l2rUgS9S877JnBxNhOy\nIKK/\r\n=OtSV\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"bc669b4e53f0197d7d8823903b1a0ea29e47147c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.0-beta.0","@apollosproject/server-core":"^1.6.0-alpha.0+bc669b4e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.6.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.0-alpha.0_1600779974928_0.13137487858711072","host":"s3://npm-registry-packages"}},"1.6.0-alpha.9":{"name":"@apollosproject/data-connector-rock","version":"1.6.0-alpha.9","_id":"@apollosproject/data-connector-rock@1.6.0-alpha.9","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d22487c3828cc027d4d58689377697f536d07c0f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.0-alpha.9.tgz","fileCount":152,"integrity":"sha512-4qmfLhQGmLhY+wyp3tZFU0B/ndt0jES7F2G9Nr54jm+tF1toK/lhO/QKntZho7K0UdtnJrMVTuYtyJyWZYhR/A==","signatures":[{"sig":"MEUCIQDIqiGY6dXRudoFQSsqc+j/vtnZWUgo2d4EG6gRUoeLuwIgQ+qNAm5nc+erfgasNMkCb9H7TjNGRmGQZM0TGYxH07I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":925824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfchLaCRA9TVsSAnZWagAAOoQP/1sWTB+LR9v4vi9LkGJa\nCi5RZtp34wyL6x6FkKBKNAzRxfFcK+7j+jgiIS/aOIRohZMVJIJCxgYcbfUH\no/r929Xzxcmk60FI6zAtABVOLeTA7GFiXMA6jgDNtlo8DITyxR9j9KwlmYjJ\nZhF6gxHKGtqCSMB/Wqp5Ht/owEMJmrZUqFrj6IvvTs4/8WYEgqMfxl+Olx/3\n2wNPOyQiv9mq/A7a2qKb65/VaDXsv6dFXlsEixtvjWE/APn+KOs7lxxBa/hO\nTEXvFFn83NXspC/ZLZFJ+neJRZyAWioZSY3qNS0DVMzLbka6q2AWtBiIXtaS\nyzxGpEB4RKeZm4Y6fetnw0EKPXQ0iXQaKXmQsOzFTwrYxg8ajZ4OOz1wNShb\n6Wc2URZXC9PzesbnGWCzuwkH0yHn8KyVIpZDig/21pI4tRy+/ZR2XdMvSSao\nNpQNHl/pJiLgKCQWO+TnMCRt+ErwZk9wKzA3KC7PvF4CP8yAmc42XaaUkWnj\n2ey+3TDBxCpCIVjW/L+QC1HyOJJ9VsClRY355E/HR2DyQmGM5zEoPb5MYWeT\n/cXF9v2Z9wHMvcAaQCWYOgHv2LBftQSBKq7wGnkbIUdBFWoZW5IKfQqYp286\nJ0q/uZnPkDiUjWCpEgVyEm81Iu5zfyV25UpPduyfMWHaF8lRrr1eSTUKKLml\n4E9L\r\n=gRcM\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"1a75c173078e5a9967a1d11c7d83cce5aadbb3cc","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.0-beta.0","@apollosproject/server-core":"^1.6.0-alpha.9+1a75c173"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.6.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.0-alpha.9_1601311449836_0.8991828971377356","host":"s3://npm-registry-packages"}},"1.6.0-alpha.11":{"name":"@apollosproject/data-connector-rock","version":"1.6.0-alpha.11","_id":"@apollosproject/data-connector-rock@1.6.0-alpha.11","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6bde2a85bafd865e4087238fa6228d5455b3f2ee","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.0-alpha.11.tgz","fileCount":152,"integrity":"sha512-ilHTFB3NsPu+FzMYZDR+NyI229e7pomkpxb3qYIa14TaogO5MKO6HHHk62a1YTS5h/sF72SCJlUw7mVHaB97Gw==","signatures":[{"sig":"MEUCIQDCmnE7q898TzIZSWG/8lAobNXMdTdlf7sMvCvM41s7IQIgSrlboqQeIAa7DwPDzhdlzyneLl+8LYjUNMrNOKGUvoE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfc0wgCRA9TVsSAnZWagAAwiIP/2W+tz2E3ccdKT/jj0yb\n3Y59bvGDmKB07ReVz+RwNVhhMKH+A8PQPCJ2y63RMLNAPh3tN4QSdecsgJXa\n/A8+EHxGITwqix+aM9z2zsqeEin1idTi5lUgUmNMXaSotpgBAbY8uAYqYrbF\npc1C1HM4f09gSVcft0CQe8zxyMmWBT85KDxPuJ9M/uwbErSMyAnez8besGzg\nKDBbi/h0BWc9hU7Glbc14qSyb1T7v1HACbq8F8rOa6rEAx8loCCP3vbrnGmf\nrUEW+7bHHRUiofmscgmSxfiBtSQXTd9a63VczCe52ooe0OKaTO7DAZD5H5p2\nEaWk7YZWY8zNG5uqSL/mczAOtfX/SG8FUsnr9F1oxeXS78Uvc6lEUETl5wzI\nqRAfSJZNHfgfcHjqYfrbqBH0X+vrJBf2zjnXrFdjdQCVWX68DvVbUYdD7Xsl\n9sduDG7friQ8JQ8lrAOuVQlqV9rxBrx8uh71e99jf+RNbBNh3JwVML0JPOMR\nW6GPj2U9Dr40OZMUkA2QIwLsJbl3O7LjKkw8VLQbTwELXp5pisqHnkao2rl+\nht+VLF/+O2BqKxBXL+r2MaYCPks2RuNN/uU9Vo2318X68K35O9r6xbZgLGDW\nktRp2GCs4Odkwa0EdkjrTkRf6nCy+WjcZMuqXwA30R3rET1r/SnA/rbk73PF\nRLWW\r\n=+Eva\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"8e65c2b83e58c31dd58588f4e0dc683b6d7e3cdf","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.0-beta.0","@apollosproject/server-core":"^1.6.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.6.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.0-alpha.11_1601391647782_0.3284539878756889","host":"s3://npm-registry-packages"}},"1.6.0-beta.1":{"name":"@apollosproject/data-connector-rock","version":"1.6.0-beta.1","_id":"@apollosproject/data-connector-rock@1.6.0-beta.1","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"188917533eb2c508d641f1326dde512cacd196cf","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.0-beta.1.tgz","fileCount":152,"integrity":"sha512-josX4oRH+7ADTJGS7oRU2XlSFH+fL3ZLZQ1wffjkCf6V2MQtvCHzIv4QYorTL/Zbljty8TRu4nbh7ID7/fH2ew==","signatures":[{"sig":"MEQCIBkbq6SOeY/63eCpxL2YziMo7+RC9XgaX1Hdv+aD+xvAAiB5LnwcJvS98pQZhM5unE91hSUiVWILWy5CTa85X4vhmA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":933831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdJT3CRA9TVsSAnZWagAAyJgQAJQw/D1x90Uw5Cy9hIky\nNEJi5i8kajdXKT6TDqR7Ry4uFQKK4MJvIhY3lqIZHCdO60cqSWewWrwlUmJ7\nXiIR4dFtC0iWSsqYmr/KXidp8wwc30B24sKe3t6qRTGgpC25TlgZR/fiShPG\nl21sW4angu1mtbZfUKsJI306yRuxxWem0H0XyO7+JOVkezTkn/upCfMQ4F+d\nTA0ngHTNRb8QplbdEunfaTyIIaF+GhDr0w+PkZWGkk4RdyBsGfqAoENQjZNF\n1Ds1DLOyUDg1JL0eiepjU1js0WylVxVCDxcjxyWC4lRj03yGKTfGBaezFf9G\nsBTzVTF4KsGZdhUZ/W3YlAH5csObfOfj1QA5rmUSPGze5n1C4589aMNT0EOn\nGQxTtIVE9ha0BG1brnhqT/uIHEdp09PhaDg09KrbZKXKUIzhm1tdzK4KTicY\nGj6P1MvRP8UAwQsgqVGp8WzethCjwzLHx+s8gW9Faxcjs4WsD73vQFMTs/zV\nrjANp3q0nx/oUhUDVL9ENnEfmwmUD4P12YFVC62tDFfTBAwuCGRNhUCRymY8\n5Is29v2eNGxRHkcgrglpWN+3saZwzlnWaCx6w6p3oxSRmnw/Z4rtvEnqvs5k\n06J2zdOKFXcDtAsHFnxC6Tyc81/D6hID9MMkC3f5ENnPdL6NjrykfOb7AO0Z\nGzjV\r\n=aoaf\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"9cd96e792ceabfe2c908cf8e920911442f52d1e5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.0-beta.0","@apollosproject/server-core":"^1.6.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.6.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.0-beta.1_1601475830940_0.5598426400267387","host":"s3://npm-registry-packages"}},"1.6.0-alpha.6":{"name":"@apollosproject/data-connector-rock","version":"1.6.0-alpha.6","_id":"@apollosproject/data-connector-rock@1.6.0-alpha.6","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8b54f497419934c22fc97f790789b82fc2930393","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.0-alpha.6.tgz","fileCount":152,"integrity":"sha512-B9NFflvG0xZp4sdVXOwiD4/jslbk4q5ttBJhAzRjTyheY/KHvopPjsMA2p4OATi7XGcv2tq7IK98SvyPBP0oyA==","signatures":[{"sig":"MEQCIA/s8wB/pdGUU3mWBL0iV/95foL21sb291jfWzhTo12TAiBxDCiQq59EjjceEL/XyW/PR/5Rw7J9BIq4pFCrX4eovQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":936234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgKTpCRA9TVsSAnZWagAAMdEP/04K1INA6ujAK6zyVF3U\nUZNBbSMZUKALn3ZqcnMdWxErxzbrC0uDGmOh14830nZYpC+DVi1lhTDvQP3S\nwhksfuc6VMNUuh1s87BE8C4i6xupPWcLfCDfH+YbD3sZRjnzn5xPrzNdouzK\nQafL7498OzJZ2M3fYDM/RwrsjPAWTgWiHJrPudSdtczn6oEAupz3YWBIVnvG\nXyuL2DpwT0UjhHq0qdONOsie2tS4DGHN9TvP3bV7ugw/z1ucUX929uPH9nUU\nBGmnJ3EPnJnxslgzseq/5WzhzXMiLXLxffPU4D6zf95iodHjEVociHXwRf4/\nlfCpTuFgWqFe7UICAY6YAA8xwKasaxN1go5A01Awb0rOQaExFDGGrSqW4oh+\nN0fPxS7vOKhx7g4GMrhXflzInRtdsa5m+Okak1K+Dwk4mkKNZG+xcQ3F133o\n4CDFYq+oiwrgst0RUR4jxOKxaG/4M9Q0N5Pyz462xfqcjBp19+ah1dmGe2M1\nd691bpTR9Lp21IE74RN84rKRTfPv+ywLZVTLvoh9omV/dLyH5zv4mS/Vs37O\nWQfhNHSqhr/VL26HPaByMlBBLK3I9ffSmDe/xsdFutxby2ja+psp+S4bDKX/\nTpk3VyPuy9ACreBnpQSKmeHYLqvC/U07b2Triro51aCnmNGYAz98s1wqM5fy\nmsEu\r\n=fmRk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"5a3dc66e716da93bc9b0eb87064aabc8458720fa","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.0-beta.0","@apollosproject/server-core":"^1.6.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.6.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.0-alpha.6_1602266345386_0.7557457156531784","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@apollosproject/data-connector-rock","version":"1.6.0","_id":"@apollosproject/data-connector-rock@1.6.0","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"985bc470381e1c38495db47b84c616be22f1a45e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.0.tgz","fileCount":152,"integrity":"sha512-LUBHAnolsDtVMhKfhb0/2zJe2VNe2w6Z0hAGJ91TkdTcBbTm/Ow0FsnOG/PJIWXgPhPkHyS+bAqCnxlj1EOtlA==","signatures":[{"sig":"MEUCIQCS2VuT0IXrOW0WoReSoZzMaTPhF63EpD5+zpAGSN/gCwIgSCah7B3UEaUu0e6kZ2cY/tEE3Kk5NYfI+T0PmacXUqw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":936502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgKjCCRA9TVsSAnZWagAAMNsQAJL3x8nTgqhQ3AfGXjB7\n9YUa+kEVoUH+VTlfmrJmOi+JcdC08Of+cDUYcKmsgVwNF34QnJgAWbukbxAc\nODDmGJbnqdmJ2CO2MRXWfmRWrXzRbPUnMI4Jf0Jhm/4AXH6Oh152FVYm5y5i\nhMOTIJ0r3YKsF7DyCLmOj+fHGO13DkelJ7ojYtd/AaMym/ROGuH2VkzPUHso\nSetZKhgcR5L0w7yy7m/DBbDPf+V2UMZPCZOsil6JGMxDpDdvNv0Di9p48MnA\nHQdY0gexeLxl7hSxsIumsXGo0/Dym4egrclGziG3XioKXPPH/F1Hd9Djc74c\nwnBi2lu3HZQgeq79euZ7DERjwaXWOx6xJIQlfOs3l/UgxJXYfDziXF7cGd0F\nEej+M9deuUKJDNLZKlcC7aRVhotREex1D6h9s56OWfiiRvvxPUmsNF378Ihe\ng5vpcXUGuTz85tQ4N886ISO+SF5egWywuURI6xnKHdKEKLRWMQrzvSL+2Q3t\nos3CqfzchWcHf2CvXoE3TLH6SztEjuI9ax0a/p0AmNtmBA/Y2MOp9UAWhWFG\nP6ORdT8e3iCWgc3riO4FYMJ6QG8HwEcGI5ziiAbuMVA0TBtY/EHjRrF6S4kF\naIfGKSXdUeVin1z1nktlOpbXawv3Dji8qgsJlwYmma4DRb6a53hYZigVwvuF\ncMex\r\n=sxYx\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"5a90c9a943df6c5d1864f4c84ae2ecf04d233503","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.0","@apollosproject/server-core":"^1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0","@apollosproject/apollo-server-env-mock":"^1.6.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.0_1602267330476_0.046136744763116466","host":"s3://npm-registry-packages"}},"1.6.1-alpha.1":{"name":"@apollosproject/data-connector-rock","version":"1.6.1-alpha.1","_id":"@apollosproject/data-connector-rock@1.6.1-alpha.1","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d4f7a5b815a32124b33dccdcbfea9b71b14b1731","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.1-alpha.1.tgz","fileCount":152,"integrity":"sha512-E3z8lCqxNApgSvSFnZ2nsKEsgIEmjk5pzCQv4R2/7T6NtfjfrnqX3bwjAUC6JUwYCPYTc2zXcOxzcWqfMgVYng==","signatures":[{"sig":"MEUCIQDZ3M3noS63ushug5TN+Ngjsi5k0ORBoqudRlhaeL0mGgIgPYEk+Jp+PnUnbTPK+/sOq1gLSjdlD67gutVLkjWX4N4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":936553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhLpmCRA9TVsSAnZWagAAIQsQAKLPSC1P6HF/MMHe61hS\n+OP05/znG4eSgw6cem+wkN0esi/TXeajoTGDnA1CWl3xMPzc626CK2X8Dsql\nGgUyadVjIHgwwnBlhoVTsQ+VddWgqRwHNFEAOwnkXN0iv7wNQh5Wo7eZVXo2\nkf5EH5mtyfPSIgaZqk6QocDES5EcgRUur+sw0IhK7qKxXmd1oU4CXA0gnU8Q\ncZaDbm0jWlvl3pEWSUPUKXtl31bLvfzBToHCOXY+z/k6qXrXz8sNED/rOJB1\nY+f2oo54jDHzSnVW/jiXJjNSq+spzABNxhnLjd1A2+jtG2sy1IPIupb3ac3U\n4aqKQyzc1hckfwXPitSWpH7lfDjwDAt70fXwPZ0c/j9fCvVjhJWYUw7yp6HE\nQ46x7QetjNKgfCXO93WP2L6UOwSF4731wkWtgOWcmDsplWk1r/SngEQHU9/m\nBQC9y8N6hpL1Z/hvwakx/++27j0Yy8lRTtdm/irvvwM29uxi6ORl4IfHvH3y\nl402M9DaWVZwF7vYM7l3Qtl+MuCg6Eprf8ZXunQRN4mwvO0w8es5/V9CReOI\nyj3k/e4tHbDGu4JMCL3qngclqnBBvETt0IaK4YV+SDbPIaP1LHTFGwXiykwX\nBMQjIqab2Zhqt0E/uD6EJc58meFh2NpKNWoAS6FHLuUAiexYqm9Vy3jpz5zN\nRBy0\r\n=R7Zq\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"2c016cb328673496f6a38324094df9769d06b3e5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.1-alpha.1+2c016cb3","@apollosproject/server-core":"^1.6.1-alpha.1+2c016cb3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0","@apollosproject/apollo-server-env-mock":"^1.6.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.1-alpha.1_1602533989979_0.6822620660679148","host":"s3://npm-registry-packages"}},"1.6.1-alpha.3":{"name":"@apollosproject/data-connector-rock","version":"1.6.1-alpha.3","_id":"@apollosproject/data-connector-rock@1.6.1-alpha.3","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7020aecb5ec56b3885e0d3355cf219a96d6eb4c6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.1-alpha.3.tgz","fileCount":154,"integrity":"sha512-45UIyeruf/6gWHjZ1ZepyIJZWJyXmGMkIyjb8/6DeYcnDBa2G24jpb+WgZj5bzIf8hf8RNNtYzbhxq+z90aG6A==","signatures":[{"sig":"MEUCIEgQHnPUoJ/u2539Mofjre/YVRnajfs31omef29rUq2CAiEArRj4ph3z1GHyrWSUBDJZWgukq2vxQjSRUpeFSwi2NFw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":943497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhfVXCRA9TVsSAnZWagAAATYQAJW1FoFnd5S/D9cIxCsT\nkwSmb+Fh39uvanCvE/7mLJ67TloKQ/vbVNW3s88Xqn0e4uxan0JSj5OnAiPW\n0jo86KN4TbYgDClxsASbvKbO5REmT4a5tIJZ5IsOYjehBWkR6CYevHQFqQud\npPbZVe3FEoAc/ga6pmuIjRhmV5og0P0zF1cxCuoG6+6Bs6RyavYfgLdEOqm5\nkLvxmHeNmNOW4E8wdyEZXyeQmY+Iw8BlfQyAdHZNu0kPjEAmZtRL/QQTFkTi\njhg3n/bT8QwjdNvyKcnweuuU4VfEUbLtKBDcYOW23wYhqnZdEqn2mM4ezp+L\nOcQf78QcNoAA66sg5GcnBOxGxHeBugYmwEcUStjzHh09n3lRRMzk4sZJgleJ\nwPg7PxXY3Ct7TVeChQBook/qsezycfY8SHopCHZzHZ8WACzXqj+6jqI6NUF+\nT8toFsxRdxKs/wBUEgJiAFYLWPfwksSSk+Sy2KETYOshxRUI2x/cvmSbs2aH\nEqryZc+86CKclud6y1H95xTQraoHEiptoHud+2MggvwnVJ7TKWCMYeB86wAh\nmDOBXZo26RM67jkKEUMYSDPVHAj0K3KhDfgj9tl9zrgoE81yHeR4NUfkDwQd\nJGUdGMOYlf7ffsdFgpdG/lgqi1aOP02SyYcxGYqFtwuIeXfuGIsdDikeIYe7\ntCLE\r\n=D3DM\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"7b4fcf91501d5a8dc46b8fb397136cabc38bc834","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.1-alpha.3+7b4fcf91","@apollosproject/server-core":"^1.6.1-alpha.3+7b4fcf91"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0","@apollosproject/apollo-server-env-mock":"^1.6.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.1-alpha.3_1602614614814_0.3804712001629762","host":"s3://npm-registry-packages"}},"1.6.1-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"1.6.1-alpha.4","_id":"@apollosproject/data-connector-rock@1.6.1-alpha.4","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e3090aa0f3ac0c5e0288597b5e8a1cc639100743","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.1-alpha.4.tgz","fileCount":156,"integrity":"sha512-m4eSKYAvOpLEwSp4rZjGFyRVV7IIDdapOHT4n8VbNJD7VwPZmP3BeAvbxom3Hk42JhhkOu46zvkqHZmB5tDYgQ==","signatures":[{"sig":"MEYCIQDGQ/G0Mp0Q2BFK853vHbiaPZ3stjpz8HYC7Tqx8RNeuwIhAO+ajojcuH+mHeDpeHs9vfSd2cSWGweBKTG5eYxCWkon","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":952741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhvzJCRA9TVsSAnZWagAA7f0P/iEmwwigwiULtDJOHF3v\n5HcUvNGMkKW/h0s87odNZ9rSlLa1cCfZiiwJtXkG/ZDLHFE/ldv78RP/UMpO\nBfT2noo5YKhx3BfvRC0Lygd1INCOeUisuWsnp+wRS6CGuFTnSAIqIAFJ3aH9\n42mf3hGnds7leOjUvBC6TsAGvxDjn/8quooSRlRECktytDkA9KwpVfHnPQl4\nZEaXVPsm0rBF+v4ym1goLDJ9pADBCJARj4vRPaHQioEr/Xsgjh4oiHgWYyRV\nXEn8qJUvxfoWdiEJ/LSxXGZ7w/jxSpfc4XynxR/LZqJkuoSDe3yJ6BrDxUfp\nC+YPsK1LvBqMWNkGNQBsxi1S5BcowGQmNfLtTHSewRK2yBbWNaMgYi5FfrfB\nc0zL5oUn0n6hjyswtZWN+iNGJlJTODwnj401ScFpF9dJucfFC3phSjCI+Qvl\nTojXMLXxBghKJMk8TyAF31Cf390iUYOJaigQyruleJLyBN8D9rf+EunwUAwX\nxjSfPjVT5bhWDVaVZOzkjnXpYH7KdjHmtCfYebGTtE7vOnb7UC1ebWiChPFV\n3IsExTK/BMWh1Xw+EQctyHSEvAI/3QwzdMN/a5hdM5GhFzACo5cV7EO4IU6L\nWJNez4edRSBi4Am3dRqmPQJP/fCYmg0GEMEsfR6CjxC+2+0CGX9hHfm7FV5e\nP/+6\r\n=Vf21\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"dc6131938721f0fbe4a70f8b3b25d9c0792e79a8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.0","@apollosproject/server-core":"^1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0","@apollosproject/apollo-server-env-mock":"^1.6.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.1-alpha.4_1602682057190_0.9010360134380495","host":"s3://npm-registry-packages"}},"1.6.1-alpha.8":{"name":"@apollosproject/data-connector-rock","version":"1.6.1-alpha.8","_id":"@apollosproject/data-connector-rock@1.6.1-alpha.8","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8bfb20e60a118ee18f8fefac7056369bfca8c64b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.1-alpha.8.tgz","fileCount":156,"integrity":"sha512-ha3cIxVdvxavXXdR9D6PyHbN57xOyrjlokkUh6wmDpSNPQwx/SgfEHgg/3P9cPS5bEkUfC4nf/7D7n2/e1509g==","signatures":[{"sig":"MEUCIBR87/9nJVr5npvB4bnJzjYEib1Q2ariyqRfh5aQnTpyAiEA8+txdmRqdraNl2QFOCfCjadLEujINnqudT/xLAoowMQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":954900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiIptCRA9TVsSAnZWagAAeK4P/0gKi3lMjyW8gUSb4S2n\nSz+Yt9hjcE7S1Xr8FQh9TFA25tP4V1Nkny208R6jc8q+XHJY2yEVZCe8b74j\nldo2PWdMQVBPQ9eJNutXsoetN+zfwexmYHFRbFdVzDSykgxSLQPOweWzpOfc\npCUhrtMXi8CQVJtg/a1wGmktiOeOUvzuKUcgOlVbsodjm9+2fScRLILEgvCm\n3KanMmNUbzRxAdTpmESPwW1ffqd9dw3ygOLPWmBAo9hgmag7EIqVWFWAzYkZ\n+h2WPWWXL2NHH7NqKu7T6mx8wvjDX1oIuulCWtRYnTwwJI3WH4UfM21rXMoa\nYD+dYmunRohlQj+wkeKR+DhSV1iDtRF3sPFN0sMG7RINhZrTOX8M796gDP+g\nJgLZRscGZkxGHqdR1tkGnyQ69ckxibod+mOwAgsv1jC37BgATMBYnQST5YTE\nHmRg1/6BSk3Q6W83zawBDWnIBIFLzwWeZRlIsedObytvoXczBfuBOsemcqWK\nz7OTJ1NFDmHVN71lpEer3ITR1R2IkebMC3jKRUmxhwSHx2C78fTplVbDw76m\n0t0sI2kJbs2xULHKLh0xmyYKMN+N6vQeNC9UPekfLueIOtEzc6lKMSifP3Vh\n0Q9deIT2FnvUyeDTUVammH+Ff9Y8NFu4g1d9cfyAdMve9OGysJWHaKoD4pph\nNpH4\r\n=MEFE\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"3cda15ef6d22249a5fe94ed1397595488b34a221","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.0","@apollosproject/server-core":"^1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0","@apollosproject/apollo-server-env-mock":"^1.6.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.1-alpha.8_1602783852616_0.6401714519677109","host":"s3://npm-registry-packages"}},"1.6.1-alpha.9":{"name":"@apollosproject/data-connector-rock","version":"1.6.1-alpha.9","_id":"@apollosproject/data-connector-rock@1.6.1-alpha.9","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"da422b819f0555c4a4b35a5583141a10a1a8e9ef","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.1-alpha.9.tgz","fileCount":156,"integrity":"sha512-5mGWKAURIpP3mGkxXXACrkVvsfCMKYyt5NacyRMK0DfP3IpcUFXjEaSOyZIomfYI0unc15rXnpPtOXZQxvpvIA==","signatures":[{"sig":"MEQCIEhKhMZ/lNzi+1WtE0ssSuoxZMZke1KcHdC5ZouwbRRUAiAKDfm8bQPgEGIAtH7nkHHgW9LUfeNUEmMF2GGmPfkSWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":956156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiJeTCRA9TVsSAnZWagAAAsgP/2TV0jjB6yfhwBfxvwN3\nApsDsnoW+FulIDA/Uzz+aQACOmTUlmyuPUIAzjCy82J6bI9oke5SM7F2mYe6\n7C5XcTWeKVy/UJVPGbG+duB8xA1154L5dMMDSMej02F3kztDIkjc7Jyr7r3W\nZmkmhBePbLKgSDt9WVhB/f+8p/eA1lQyHpND121rxVRYJxsngPxwapIGiv00\njoaq8AZD7ah9qIkL4zddaeaT+atMK4Ukm854DsdrDLYwb4ps+g7iLaGr6EUA\nF4gN3AIZDGfG9uabLQ5qit5dvYK8kJmwZzKLI+0YTIQDFFxs5K+iv/1CyEyE\nPLTWUlv9e7siGMXbbfEt3YUCJdtDVNeVZjBF+TXZ1sUITt5G6kdfy/G29FPO\nB4PqbTMTuhD8Obd5y4c6bSv8BrkpfT4qxvGvjjDAIMuRycmgrEP0RO0mEbio\nbyTuhqNDCnqLb6ojEkM3rJyAOFWeSszMVJFWD5cuKJO1Enr0Y27v30zYJojM\ndnPgJkyZqH5sWD+3z/E5cvtIea/vMtFpt6bDkhmvxnZ6UJoTya3ixD5Ndq5s\n5hqZUZp5/UbNQXGakuLBc3wOvCXTW2VhWSdb0r9QGSfX8RDR7lfHWR66pBHN\ncQjzVNxKqRA1sUtABDQkKtEii5/axK2dQmaZ7DaGkPgdozzT1tss4ZdAXPJC\nj+/y\r\n=2DgV\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"cb22a8e8abd5a0bbe986cf2328a32f3a83721ceb","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.1-alpha.9+cb22a8e8","@apollosproject/server-core":"^1.6.1-alpha.9+cb22a8e8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0","@apollosproject/apollo-server-env-mock":"^1.6.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.1-alpha.9_1602787218729_0.2515455259732806","host":"s3://npm-registry-packages"}},"1.6.1-alpha.14":{"name":"@apollosproject/data-connector-rock","version":"1.6.1-alpha.14","_id":"@apollosproject/data-connector-rock@1.6.1-alpha.14","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9c933e868a4650a2b8d999a2465b3be84217b012","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.1-alpha.14.tgz","fileCount":158,"integrity":"sha512-uWcGr0S+at1C6/0f5vUdRYYnu+SQECyqZ/i1a5f0FsaXgROV5mvtgFCyBUTNRuVRsrBiYUFB3Yh8CqnI6J3MeQ==","signatures":[{"sig":"MEUCIQDVxE5rBRBVV152GUpHSx7eiJLVAST9KtymP2LBCX+qlQIgODkGkQiLc0z8GLP11Cvkl1mJ9wTVpXJjGctuiGwYz5I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":952211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjfSACRA9TVsSAnZWagAALOIP/jiQHQTzoBS26FSphItP\n/Z3KQXfomXnMtNEk2Xx/s9TIczXHNmhe2gm6FjsrCPeVN21gPgo/XYl/I14X\n0wX5xa4dudfogQ2bD8RDsX2tkPbczMvnsNYGGpYzD25T7+zQmzl0ICH8/+Dk\nH+WuTJnh09HAeAWmmkFxtN9KvvVyv0Ttb4perqaEZ/x+QI5gRA93bqCsT0Hi\nJRKaPB09Tg9ymlAKssjIYCupHaCT26WnyMD0st6ARbKqU+HtckzXNC88p4c5\nLajQ2X+If/1CBXrGIDsbBamVSbMzGm/XkS24N7E5YBQd60XhKK/j4ojesoOn\nPwLZ4X1SZgNsQgn52hsCDVL4mRkkY+NyWvsiZP8WSmQoGH2+uferdYY55J0f\nnAQCBFOzGVPRepVsV4rLcYpGNxBVTlk8O0EvXjL8sVcznNGwdM2oNu81lnKE\nzfAaWf26IDt4zSKiQ9Ih3V9D1VoGPPhr1I4wvJqHqGuEHRXrBjPl3ERTI8O5\ngSjnt8SJA6U3vyw0M4lNzcww+B4rhzKgZu8PXGwhjGQWXJHsTi7b2M+QROWU\n3EFlC/Twf3sg53GXiLDGNbq23uWPj3c6wgT8ufwHytxQ4IRvYywKTMIekYkI\nbLkm+oXH4XRDUjKdKAlHK8DvmseHl7ZH/+OzG//2d6Su9FdXD72QChi3bgCX\nrsiX\r\n=QN8s\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"ca5ee973b6ffd5b2c024845aaa7a56a3a1ca672d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.0","@apollosproject/server-core":"^1.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.0","@apollosproject/apollo-server-env-mock":"^1.6.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.1-alpha.14_1603138687954_0.6505934466259686","host":"s3://npm-registry-packages"}},"1.7.0-beta.0":{"name":"@apollosproject/data-connector-rock","version":"1.7.0-beta.0","_id":"@apollosproject/data-connector-rock@1.7.0-beta.0","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"84c3ed964b985ca4cc8cd493c19f3b1fac0a6c70","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0-beta.0.tgz","fileCount":158,"integrity":"sha512-kTPVvb4ms5eMMDYs+93GXPk+gZ7guN/DwksgCiRutq7LrXLfGSa8IDPNJScV9+09+w41W1azQVhc4ZpNHpZmvw==","signatures":[{"sig":"MEQCIE8DQfZ04QyFb1e1SRQibHknf92IyzexqNXNYnOvo0fkAiBbe+Krlwjuf+WrWEEdJBIIdYx1BNoP0EY/WXXpSqO1Rg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":952887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjfqXCRA9TVsSAnZWagAA5PgQAKQsbmnEtVm9BWgygk4O\n3fqs4PadIilN2KpMU+XTLQaHXTftGe+1z4PoiOJQ7XKTxtaOfIxveVWtOId4\nC43ErNOdue/Nka/9WtjvIaXaEc8sZsOFRdwUX4EJTwB09HL4Lu3TCnF+FwZ+\nlLaRQ1bHj171vyEcuMLI4TOpOnJFvaVx+Nh9wlpobEeMEIm3JSDpsxYvCQCr\ntKTgcJNQZiiDKp9aq7+5eMtN6PQZV/VUGXimj2K7Nzk6rUDkLMyCgJcJFXlq\n5wMxr3LpCaAcrw/grPdMZaKDJcPtZk6vDdA5rqzGDgWkYO/4L38MOFuGb/Kv\nJyqIJ3hsBTwmH5Xln1KVwKgUgoQ0/VRgHm2AX4uoTah+f79tzTXqdfQP/ni/\nFeuDfJQXX5CFwnS/hBU21hz7tdF8uM1je5YgZvZRrJrCU4JqCkRf0OlCG+6+\nZZPl/Bfhx0wJmY5izejQ0E3rzGGEslkQeCni7e9ItYs2sAZf5k3LgiN89qnY\nehYDuCBaMQNERhkHyTdd//amcmh5rxOwh0Fvn8Cs+3Eq6lBNz8Chi/5D6ybw\nLVn6U5smOnV6bqxOR1tK5Hd0h7XCM4hr+BoLVhJzAxz/AbF6tP4T6vuHEa22\n0hkfdjIp5CuhixATy19XWLk2P86wwYYB1RC/Lc09h6xcj1s8t1TSLBG7Rdfi\n2EDW\r\n=XdFX\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"9e9fdf046c869ca6af09e708d932955349eee608","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0-beta.0","@apollosproject/server-core":"^1.7.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0-beta.0_1603140246629_0.32816070712918366","host":"s3://npm-registry-packages"}},"1.6.1-alpha.18":{"name":"@apollosproject/data-connector-rock","version":"1.6.1-alpha.18","_id":"@apollosproject/data-connector-rock@1.6.1-alpha.18","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3f3278c7fe2fe674321545b37238a250d2e3efb8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.1-alpha.18.tgz","fileCount":158,"integrity":"sha512-zE4qL30YyvuFGn3P5q35QLyyZlnfmA45B4CBO4u+H2/1dJxlFAcB8RVXvhQbkQqbLzOIvC0b/Trt6HkVtyiR/g==","signatures":[{"sig":"MEQCIHYfUE2eN9Z4lnBK5aUyAK42+FkbJHnnWIWwe7ou6UPDAiBeU+yXMOm+vsFmxKQEZt8NaBjRoFadskK3l3S1hK0i/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":952942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjfvCCRA9TVsSAnZWagAA8wAP/Rx6EzNgiZGMCjTMY58x\nIDQcO6kOoCwzDSfz86LFQwPlktu6B+OiVBSD562rpR7fg2oQ0jf6F7BbxpoH\n8Z12cwOUUd2CLqCYYLvNvL7EU/3KrvBHeQMnYfGi7RTA7gsS0UNiYxz8cfJX\nZnTfuFMoXeYg5dhlx87qcmTjgMEOeDQEp8219ALKbh1wsssM0Lp2G4tL86eT\n+y3osFqHVTxkI20t3dVfqJWmnFEQJfh3wAJVlPvTjxHvaqqDK6q+GX5fVMF4\nci+PAjcWnd+l92FZLdlJrzTnivJ0msB07ih6tFTtqJh3MQt3cOq4YfDOQd5Y\nb6UZwI8GnRVCPctRRY07Qzg+leNX1cVv6EQgbnuBRMVrZXyUmh/TozZ+xN8p\nsqF3yXskdMy0fHrdlJMSWcjgaqHZbYwn/PIwVRNbN4Jd10m4IgUiUWFtUuzp\nVdyNqTykJCEwEBruwhQv/wrtpDWw51CAlYwwONbaetDgDiLIheu+I2m8iGRI\nDbUMe4//Va6XoNkxazq1NOr3xum0tFae5DNg8vS1soRNpmF3Ahv82jJSJNAX\nZXf7eOYYbdlw6Bgp2HV2ECVAI4c30LGeJ4+XVf3hrZ4o1OgyEs7A5YY/tow6\nzYH1nZQIRXup5lzbk2bj8ElXKsrApepNIUabyXFpfqt4fqXMNGfah0YMgSCX\n96ql\r\n=REsX\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"9e9fdf046c869ca6af09e708d932955349eee608","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.1-alpha.18+9e9fdf04","@apollosproject/server-core":"^1.6.1-alpha.18+9e9fdf04"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.6.1-alpha.18+9e9fdf04","@apollosproject/apollo-server-env-mock":"^1.6.1-alpha.18+9e9fdf04"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.1-alpha.18_1603140545903_0.8832111452844835","host":"s3://npm-registry-packages"}},"1.6.1-alpha.19":{"name":"@apollosproject/data-connector-rock","version":"1.6.1-alpha.19","_id":"@apollosproject/data-connector-rock@1.6.1-alpha.19","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9eb150db72d46778724d262cdd0c853b2d879893","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.6.1-alpha.19.tgz","fileCount":158,"integrity":"sha512-nPbzjNZHr9VWL0sp20xVA5qm5ONRgX4/kyn7MJsArDw+rztdOt3GEQUAD2Tl3ceRsJTjUo/ecUfzZUxfXDAFjg==","signatures":[{"sig":"MEYCIQDuIQJvm9wZpMpiSQK9qK+IbFJVKEg6Sjmw8vCyPHfYRwIhALd/UvG/T9MBCnCRHvMZ2zr8Juw4zxxh+rsKgEpmScTZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":957653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjxx/CRA9TVsSAnZWagAAW9YP/3bPiv6ZLpqcgnAJd9ym\nyWQzerK+CauS7noUueOIMRO7u/uLkGygFHDd23A/QIoeLZRVutPaUGOEhBWU\nB/F4u3FdHITeI/F4qO1keleIyVjFWJo0vPnuGzEFXTTgnCTbiJBPX+ccrFCE\nPej7GUkrhjDIdi0Rm0PVhkMirmfZlsvCeXaQIMaDktBSZ+chMhkkJdzcsgY5\n5jqoqfd7LbwzsTBGq6UjB6KDP2OL06HFhshTs9tpD9qH6HiU752pcSj99QJN\n+VovA93UlxvCpCooEQSHOdmcBt4qKOwjWPbIDSBjkz7AhB4v9WaLzx7HLDaX\n9Vy+xek4aVuxKLnBxIg46ghGGXSn0og8TJshHrKR8VemBmyN6Ksl4fbFgba4\nxWAPwV77gfZaNI70g6Ngs8SUnw0i3ekuh7nEZc5poLbefVJ8QOe8XQ3qRPM8\nUoEDVFYtr6TZxBU4cxALlzFUM09xpIDmHM3hCk28O5LfLIhUSv/3W14K5Hg6\nxj0m3T+71RhYKcFCWKDvDRqcIk4aRCCdSJB4M1YNvJUgwd2wDgDA0RT9n3qf\nb7pU4x3PLir0T8EPyitfgtBYkT4zgZrUBlP8GhFGIpqDq/cl4QEDVpoCrswl\nCkLYYAjHDacw/RrcRhEAUiE3/+/wM9xdlqNfB3N/CJq94VJMoEV4rZYjNFBe\n9DCV\r\n=pMsc\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"cce584925371dbf7c1de8f04c35dd2c45de61449","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.6.1-alpha.19+cce58492","@apollosproject/server-core":"^1.6.1-alpha.19+cce58492"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.6.1-alpha.19_1603214462718_0.2392592360506296","host":"s3://npm-registry-packages"}},"1.7.0-beta.1":{"name":"@apollosproject/data-connector-rock","version":"1.7.0-beta.1","_id":"@apollosproject/data-connector-rock@1.7.0-beta.1","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6a2ce30c4632f79cd6cdf7718793374da0a84b19","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0-beta.1.tgz","fileCount":158,"integrity":"sha512-haxMWjpKiTmWQXIUqtp1hun4UgHou7t1EV7Ttz6ZtrsV91Ok7apJDx95yjOUWDl7pAHOtZA2vT+/3GChmL6Igw==","signatures":[{"sig":"MEUCIQCvGj8tZfaZsvNaTtCmO/t0tZBHJrFP4Rs64EzCeulneAIgdiHjEvecFjSXPCO8IoXVkgY87xaUPHzao1n6I1Tw3Hs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":957923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkuSOCRA9TVsSAnZWagAA4wkQAIEUqfynJH3++LGiYTHM\nEiOH3hiu9TIjCPNiSGQYUTsFlfRUJgHz5wJbPpNjqLdl726f69jDIX0JjiUB\nNOyk8Ej5keJiuyv2jBdJsTonZ3Six6rBSvODikOd7FCyMVgJt+vBkSSIPOgK\nr8kEu+3IoCSS0mQGIOPNAKX9enUQ+ALKoMy/GjeSD9a0U7CDZQ65TAxWhgyu\nOwh7iqcimgnYwDDqtRgIwMOspqx9jJES7as8YKUwKGlxVPMDUnyweavNLKdj\n9llRdUYZ2yUYaqRRYhBEg0bhQv71svq1vBBIXdP3ck90sAVRkCFBpSXU/AMu\nf1zm/4OrEvyYroys5o3ek2SnsuzyyfdmGgy9ec7Sfw5Wd1tKJ/jArMQzftPm\nvuUgRp04mIr7M/f71HBKfM8SuJ9SLn7wA6rQ5QoAh7e54MTJuyQuxu2F5MMj\nf35z9xt8Y7hP8UjFSXlfnn2kKlMNkd+TXlpGRcKFcLXcyCaF3AZv3Sj1QpNZ\ntkYHyTO5c9mqLhSfTpF3LbwSh7yBXSVhLZNzSZmmyhmEKedVlMIFfxiG1ziO\nzLY4H3QxQHTKkOlExVdR5qERAh0oCFTUkbTT/Kv1vCB8XO1PR91lujinnS5z\nmlaYGTmG2oEzf0HMBl1ZiwB2CohgDv47ddyAyIHqieU8CNhDGH5StcyYnYrG\n+UWV\r\n=OWbo\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"5c37bd540d9ee72dfa8d07f90a377a97bd4a6ac6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0-beta.1","@apollosproject/server-core":"^1.7.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0-beta.1_1603462285585_0.22507357812206874","host":"s3://npm-registry-packages"}},"1.7.0-alpha.2":{"name":"@apollosproject/data-connector-rock","version":"1.7.0-alpha.2","_id":"@apollosproject/data-connector-rock@1.7.0-alpha.2","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"33dcd1e523e69084f860fa28180ae2f9eb9df5b0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0-alpha.2.tgz","fileCount":158,"integrity":"sha512-Ui3wk0qjHBCHWAVe1ioNWGUttbPwzD5P+joc6qQZ1n9f75QoiIsGJg/mLzh42C9SnpszFtXPIpg5o4W3jlSFJA==","signatures":[{"sig":"MEYCIQD8j7u019EXcg+QvKrhXHfKhxbd7u/uz+HCgl1ieDdhOwIhAI2pEM1QMb/QtOvIu55J+opnQ5J+dHKB3TpOGHp6KqYY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":958022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfluZkCRA9TVsSAnZWagAALYMP/j8AnabGniXI1GlufiVt\np2GmMJgCosW115IH5Mag8L4Fh92vUHKcLNUWNk71oV4B2maZuatiteXYMFPj\nMyZKXsFeysapE21S+evLzZBXr6hjgN1gF6SWL96+RiHatjbI51Tk/oHmIofg\nOfMO+lLJrPleO8tgMpVsHVcgX+0p7f0RU3BmIyjsq1x3hGSibVvlMiosHSIP\nrOIqKcNPmfwovbobrLO7LT3v9NvtAQCDKGqA9W1NW5IRWiHWvj93fpfDWvLD\nFGKbRdGFsQWKHu8ZFoEASOfIplmX7fjJ4Q37ZnhvbJohpY0LrM8p/WYBt1j3\nQsOnWEsqlO7ubtyQSDr4rxRVVFZOKyMSlAMjCCvjoZy5ZKCDi8VHM347Nl1e\ntWlNMQNhy6iyRgdvOGuBI18XqdwneA/RyTvhDPn/KtomHG4/Ym5EObeIY4lJ\nBg5b2uu1osmmpI2YjxxEXVgxZrsyxL266Wyar/Y+7UJbC4p34cOPDc+QfQRI\nU1v7404ELEDBxnfc1CywZrIGYvYvJJQ06pJ0paj2LRdNK4K1vAwobznNG3at\nqPE/6dKf053MR8Oc21ajiF4ij9x61GnWTQQjOO3ciARLznWkOw85MDi/XN69\nH2xcnZZjnPtneOvbtgtRjwR8npVp4dBPowni0ckBvvLJ1pOA7ILrLZAWj+kH\nNChs\r\n=v1Mf\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"337680a78528b463117c21701f3d69949fef3c7d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0-beta.1","@apollosproject/server-core":"^1.7.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0-alpha.2_1603724900132_0.9220753089212741","host":"s3://npm-registry-packages"}},"1.7.0-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"1.7.0-alpha.4","_id":"@apollosproject/data-connector-rock@1.7.0-alpha.4","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a3c28b3a30b3aa529a4235d558faf7112e0ea5e3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0-alpha.4.tgz","fileCount":158,"integrity":"sha512-7BFUK1iuBjF3zkghAOkVq7+leQ1A1GdhBwHVpN1y84APKv8yCt0UnNmzwsZj14PJgYIkNkAWvs3ZjaEwy1Y4oA==","signatures":[{"sig":"MEQCIGRKRw0L1gmGh2vS2DpEFibaHB3L/lrRIlPTkc2/Bm/mAiAnkfJKcn9n2GY7pMKm7uhl8ADd1kjdCqQP1CBiBPwjug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":959619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflyyZCRA9TVsSAnZWagAAI54P/Ry7+E+7jUSKmndsSGLx\nBB0VhlCDsJQh3/XTOB2lOcb29v668/Zs1W6AZP7i1tFXoQTe4p0hmkc07Pnq\n9CK/FkfKbjxgZ7o2zCe1L8n9g9XtFV4C+NSSx670AVqlSoYDJ1ubjrBUgp9q\ny+1IvHWvQGXzCiia19KkmKfi6b/0TyuqgqgxMynLTmYVfWWV5AfR17ZzVZd5\n5nRrPPd6RbgFRpySEoJdl0nXkvpf+jFuy5l6NGlzT7O7ZKKEs70ZtWZwqu8v\nouJ/9ZPWrdNibGeQxr92qqSJ9XPN/2ybk5dYmsaAPVbOK9aaUCdAVE6rmRjR\nOWwIJUS+KAFODdnKXhHWkw/i38GxyncoIlMnT8Y4hqioTzne/JXD5Vkwio7K\nhysYUtthZ3dGd38I7Fxldz93DABjUiwJpvD2IZUMarjR8K2UAo0h06Nlh6yy\nb46Vr0byx3pLg9f7K4xahAgcS/o6sTl3IqBnFT/IJkVts/ldzvjwVBIsf5xO\nunvdNkOvpmQj7NUINq5GRpM+ktY9H7M38THGDXkz0+55LPvCwBPw0CH4BlH5\nXthfi/yDvOsp2n/MZZmcR8Gs/v1BqiepRHFDQCKRvyhOiuHacGB7HpfJJbP5\ng7+LrT8LdtsqUDeBH4g5scHnT1Rm2voo1dWRZU8PxMEnUHNfPWVox8eSFKzp\n2ZSM\r\n=d2Uo\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"1d9cfd76649c9ab6f05604e6567102c26e7c36c7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0-alpha.4+1d9cfd76","@apollosproject/server-core":"^1.7.0-alpha.4+1d9cfd76"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.1","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0-alpha.4_1603742873277_0.5966495731097874","host":"s3://npm-registry-packages"}},"1.7.0-beta.2":{"name":"@apollosproject/data-connector-rock","version":"1.7.0-beta.2","_id":"@apollosproject/data-connector-rock@1.7.0-beta.2","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5dfda1fa2775ff6f63b0ce8aad90e36f27cc15f1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0-beta.2.tgz","fileCount":158,"integrity":"sha512-1iCMQqW/M3FVTQ9wOHk8P/EK7Puy33yUkorhizCFo63Dl/2CSH9AsnXDlRbP/h5neY/ZwHnXE0nwKOOnGgVeNg==","signatures":[{"sig":"MEUCIFJ91PONvJictxPs48Ah2UffgcYgBo4NIOhIHjBfwdKFAiEAm8LIQdplRX2ODLQbyGtigqnzWhyFh4T4lDGUnKGb3FY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":960107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmCK9CRA9TVsSAnZWagAABiMP/RXse2qFIbBoeG4Pw8au\nqxTNf5WhgHcnh91wg9T+44tjjZtju6uAYtTOB6wzH9+UvgagKb8eu0OHenCn\nGDNkpChdA47r8VJvDVtin5dflkDhekI406YbIraNGggW2YXy7i1U/QHfyIxJ\nxaww0Fb6+XoiwpUOAOIeHRulJGRDkvH8nDOGrEBTCqhXx0qfPqQliSyrGXLg\n+Sydes95sueftNf9a4viCq+ta8QSXryRjON5R4LfmbbmTFxzEGCPwXo8iZTt\n335eDFSHyl4d4BAxD+0rDq4HEh+z+ZKNHPb/O3TkoTRj66ezAAQbjswd3kut\n/j567WNFnWAp2cUOhKWiuvsexcyxRiXzFkzp8/iZhahsXBvnPFUCTYfUg7hQ\nvkpB9gduiKegVCoG87OfkGWi6M/F/oWXZJvL+i7QgcykYAEU9DBj2U4Tvpk1\nb8L/HpH5LppV0D0wxW/8dD00MVUKwOXvij3nHdvVHU1jhpIQCuc+8mJiwSeH\nnq7Yv8awUHwqL3OZ2xeegwFGN6TjLP9wiHWaCbvfFcdeXBpBFoAXSQRBlN3B\nWo8Z2ouPMdKus940lZZ4axcJoptalliO5Pl6lHfjBEnBS8wG8ND2JUjADXom\naNZ9u/s1yeZeYhG+y/wvq1Yu/zRFzgd7PtFO+HJONYg88la1ukwe5Hb6XIPE\nPOQq\r\n=/KVz\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"a05cbecc245689cfd35b48e3ee777a605ac5c03e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0-beta.2","@apollosproject/server-core":"^1.7.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0-beta.2_1603805885295_0.17220068077777428","host":"s3://npm-registry-packages"}},"2.0.0-alpha.2":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.2","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.2","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"bb74ec53317523f994c4a05d5a5f8cc02b12a03f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.2.tgz","fileCount":158,"integrity":"sha512-6V1plH27/rIOwSgk68KXo7jsfSTSI2MbWKMaBhF0PxZoJHQ7p21nXzmU0bDnkS/wASQKhpSPr/LdU+GtuULFTA==","signatures":[{"sig":"MEUCIEwr15KsZRPiBcZ5E2OJaX8umj39lvCz/I+K+XH0nVhTAiEAn46MYrrS7kkUu5flEFJY7NbgRpBXB6W8CBH8tG8hy8o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":960157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmX8ICRA9TVsSAnZWagAAolQP/jg6ec9yKWlob/siyfjB\nImsgqc7/dirf+eItMDXkNPFq/4FGLwS7oALs6f/Hhppk6afl+afYArioHTrX\n+s619Y87NbsrHGoHJ5v1tZMsD12Sh4zFFUhglT4OMJVzJrJbGTkcbCRt0sLi\nUanrGaU8KBnhvHF1RxrtppxjE2S5R2lRcJLqVKAmvpOcEAZb1LxUiNKE+iCF\nczv+ik78qW/NzDJDmjxK9yrPQR03PuUc05ktT+XEqnH/wSg/2Pp4pthjXz/W\nN7ggxBv3tB0IrQ6//kB/1RjmRO3fwJ+aSkG3y6bvwnJwJVuIeyFI6Mw2FcBR\nWhpG8aT+ubLu+ZJCLTjeNhjr5MFdug95raBeh8p1JP6S0mSLlGu7+vpSf1GH\nAmj43qmO5BawUGNWWIVqtCEa4KWiGCnns6NVs9FGGwFYtZM6klXiVAG36UYK\n4mBfQYkURuF6VmfkmdpsmjTM4/jQoYHCC9cKGJhQWiqygVHtVIaAn+uS32K5\nanksS9IBd3E0r/SA4cKCgKSoSMdN8hHG5NvxvyPC8yGttMlne66OiB1x3Ruf\nRkQpMwJKT+ZkYjnK/4HuyIxKfjPLtyez8FTb9kbHPloYb0rjMBTjYb15W2WQ\nehu2Oj/5ok6/Eo/vyb9qBylucpYSgbiaN1Bb65BHbiQrnf75rUBiR0EzY053\nYxJo\r\n=Uqsz\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"a2054794aba47031f8f4082d064b9125fdc91dfc","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.2+a2054794","@apollosproject/server-core":"^2.0.0-alpha.2+a2054794"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.2+a2054794","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.2+a2054794"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.2_1603895047937_0.4804439731680914","host":"s3://npm-registry-packages"}},"1.7.0-alpha.5":{"name":"@apollosproject/data-connector-rock","version":"1.7.0-alpha.5","_id":"@apollosproject/data-connector-rock@1.7.0-alpha.5","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e77395d6ca5c09a09ce05e233df9927964088020","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0-alpha.5.tgz","fileCount":158,"integrity":"sha512-7pcCJzK6fMI+HY433q/iTbwOl0GG07GwE6Xio0WKmy9mb7/dEFEbaO8yLyVBOZD/6D7CRj4jUb0lcKa8bmSG2A==","signatures":[{"sig":"MEUCID59WKatpLCm+/fzcMHt49m9sUNBkgp1HwwpDF089V6DAiEAo6HCsciJU+dObxmBZNCDiNJApEcfGig7ZSvu5wX1Axs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":960277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfort5CRA9TVsSAnZWagAAFbwP/0jTpIEzi8tinTLLP+nY\nw7ZgyqeRxBpi/MHv9TbJMXNyV/L0GAaT/A7zNK8hrgVl7Na3WikEzDhHFRyX\n8WYhsmq+y573zfShdy6HjpvZudvIZxlZVGRt9vIcg2IGf2W6USKleGODzAnl\nI9kE7TBZn1oUdEUV2jluQXu7A7SLUIhV8zGpCYj+2O3axp6/EyrJKe7mPGQr\nn6qtB0rL+TfGrNHOI+auUTsegLTBAy6IADmB+1JvcmjGQSDem93gN1X2jy2F\ncLEf7EI+ou4XxbTiKwbCEtRTBZVcsJZw/6OX8vPYU97mz46P6fIvULIMPvku\nmk5HmhEGISWrwMGYOvntZpZXFFvjfOsnSCexilDVpfjzvEgtjtS+7KS5g4xl\nNtdHcGRfBPF4yTaRXpDgR66xaVaiQxUOSPRljRK7L+lPuetejfEi9K6Cg4zq\njS5k0MAfF9mJBXeVIEBuh3i8ZAKMoKUkwR+dQaBNHaNeCMChdVIeB5ZOIl/s\nHsDbozA3olfrEcAI6v7cxJ78nz4zqJCdhZAQe932jumj/bTrnpOp0790i31r\nYI61jns50ABv7CEO1CvpDO425u0cmBrhBXVgUQWO/Q4zOw6kqHRSbYNrY4fJ\ndovOIT0s0H5bCfX3Ibzk23ApMp9Rl/7x2gfvkEoY9WvAl1G2SeggkhLZnm2y\nZD0b\r\n=xGWd\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"927ee9819e02519a65afc24c69115d2e7a1effa9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0-beta.2","@apollosproject/server-core":"^1.7.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0-alpha.5_1604500344966_0.0015220166752563102","host":"s3://npm-registry-packages"}},"1.7.0-alpha.6":{"name":"@apollosproject/data-connector-rock","version":"1.7.0-alpha.6","_id":"@apollosproject/data-connector-rock@1.7.0-alpha.6","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1a5c808c655cd97e4313803d4270b84b39fa80bb","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0-alpha.6.tgz","fileCount":158,"integrity":"sha512-oZmKIQ93X3JmtiPiGzSg2WKFaAS3I1SeKcAs94dqmtxvK0PdrbZI//RQGHFO855o3CElXA9uXQwSDIH1UOybsQ==","signatures":[{"sig":"MEYCIQCGIAcDDxLAZbBybrJH/etXMnQ1IKgSjt1RLQjI+/CuQwIhAPH0fs0bmDtG/AnqX5QkC4Ioe4KyvrJedYCL6hX/fMlV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":963893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfotelCRA9TVsSAnZWagAAYeEP/3KYYEiesMaoZ76iw2zQ\nu2xWwcBMNAt+TTPuQYYtvVffbzSMy3e7AyqbJQ7RziCvpKtuzLVuNVNX52GG\nvfZNzY1r9FPT+68OP0OSM60Sdd6M9EgJ3hQvotkcqSriPAee10JNLPQvuhbE\n5BSXfkPzk8WLIS/J1Uwz4eX1ymM2YZTLXdNVY5nXMGjrl9q7aXFAoJ2xbqwX\nXMrJxyIKynruKai+7GAQFNuzI+r8UR8pYOmTbAtcH4VqiLQuuydwwEYSmItK\ngJ5x7ukFQaDU/qB8Sl+jY8P+mtiAuUxek+As1xz7PdZynOfD5b9RGHbOLT/n\n6vJZvlUys4vaXRreeESyf4CZ0rIoxbm3Zlou50D2Fm03TXb1dwGmrQEu7T24\nyPxQkz7vKqWpBsU+kPHwOU4wIdrq1+VtumXe/DhXXJmYd+/RJuhDoZSqF8Dk\nb3XpqILcJVO5Dj/HEa0Ut7391bzmkUWehqOC8L2V8rrsVMDLamp3GqWxKATS\n6Dt2G1NwxUmzNZUTlP77C/TmCUG3HCx0qJVQWq0QA1IQhjPSy3vMp6+HFyPM\niWbexq4+6GgIYSPdiUlfxrRGocXz4kUANzPSXZgjwVIZdstwc36aJFxIG7N9\nIPE8Ri7prp4aEWwAplsR6pkhm1VXNCG6djeqOrz4wuarFKN3g6um2OGizrR4\nLi6D\r\n=dQTk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"4742450c4ce9dd2088845c0ecc78c1a8d2a93321","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0-beta.2","@apollosproject/server-core":"^1.7.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0-alpha.6_1604507556507_0.28631773986869247","host":"s3://npm-registry-packages"}},"2.0.0-alpha.3":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.3","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.3","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"00cd34315bf7a0b9f618b619fd9136134eb051f3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.3.tgz","fileCount":158,"integrity":"sha512-XRJ2Biklbz4efk8jzgVuvZe1S0yuEATaqv9AFqJNNfnd6wdfF8N0g5d7Ync9rFADGBONah5roEcD57n3GEkHSg==","signatures":[{"sig":"MEUCIQD2DCAEMgsZnItSSS114m/6K7AsDZ+0nVpHuPChPx0yOQIgeZIjUlnALAC/clgfnp3LxzffaT3jZgQuKifOtkAO9QQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":960157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpVLFCRA9TVsSAnZWagAAaAAP/1earCEE4j1ajNeNKWO1\nDQlnz3QhXeSCCGJ5LkBKSZSQbZha4ePhQFYiaQM/OZW0203FdS9OHxCfTe6q\nQgiB/Z+VHILpGI6sGDNqamHoZ0uvJiwBvDSYjXe8W9MaZmrCDx6uXhV/F9XU\n7nxlEBcQx6xlT/3qA3CIV3Q/y4b+gr9IHdNYRHHktD3Ni5IOZrXQ8No7c2A1\nSQebNK9tLDmDSus/iE0TG3I8+YfL9uQ3TXe1tqPQtf2F3ZOn21l6wBnyofl1\nADEo9nIwDoU8AiQR04RAtRnVdnvHB3b5W29I3pNgmigyY4mBkrsS2YRVCR2j\nxvjZskiPHDcwDVhwuMn82wHNA7Ukdbf83PLwd+ShYxk40Tn3NueiUHdopi/u\nEZFxzxX/bTt+WnAIKJz+y/2xHPZ+qAa6yNyTdr4NfmEv2yfrBLM+5LOKz2yC\nQIy8lE9AazoQgJMjXIKm3PGlBkWMDDGqsiqS2sPMnBNcaO7lP/PS/qPe/rHW\niIZFE9khcS572XkUQZ3ZwVA+St0fgXz1GqEdNpLkbRKuHqkZhHtQhXndwJFd\nQ3/BKrcF48V9Sb6KHFWBBn+BAJECPr77olVtb6o4NHgqFNXhdoNdgF1CSvAR\nDcKXRv2PLhQeogmGEkrfz7e5T5GjceYmPSdbdk0fxGFuDhxEwsFJdnPo2QNy\nYamS\r\n=thh2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"619a134c2b59d1b2224637bc63cbae5cf9b87033","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.3+619a134c","@apollosproject/server-core":"^2.0.0-alpha.3+619a134c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.3+619a134c","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.3+619a134c"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.3_1604670148968_0.04101989080391344","host":"s3://npm-registry-packages"}},"1.7.0-alpha.7":{"name":"@apollosproject/data-connector-rock","version":"1.7.0-alpha.7","_id":"@apollosproject/data-connector-rock@1.7.0-alpha.7","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a34d6247e80311967bf3052c354bf306f457a798","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0-alpha.7.tgz","fileCount":158,"integrity":"sha512-DnjGRnoY8uu3YqAwaE64RO8KRfJ19J6fuUBBKjMvdwrMcSudhO7Wjd8zE5eIlBmaySsedbBg2IV58aZCC+Vv+g==","signatures":[{"sig":"MEUCIQCGKTlLtagv5tto5l2lK+3T7JiRQYcsci8WIfDsiPQfegIgdV5PBXbiA7NJ0T147o4Lj+9sofLrCQWaaIgbxjM6xK4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":972128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpVuiCRA9TVsSAnZWagAAjP0P/01bwaatdp6GDUBbqtFc\n8g9gjRCJqByaoxu8fzieUDNryRWnbluKDUAAUOfDkCVMJbyFLsJgooPHaayr\n/hV6IkdXaeyCA8ZPX8jdwcnM7fxi6F/uw5Y4oEEXRffLT+/PjWM9qQkEpJqh\nUWpXJfuTz4STfDg93/TH4aBYVTPHxYVYTVjZgOiLn2A4RC/YLVFGXB+RKf4J\nXvomQBJCpkqmsFTtXw5ZCiKKu9D+yVnN2j78INgyuyUIbWzZpdjY7/mwgT+P\nzpfxn2Q2vX3cUFH2wg/d+BCYQdssN+XXARbLcL++4TsippHrXnMcjuHsuMF1\nm5rzwbmYhOzzPu97Y9HXL1Vwz1Khc2yD8FxM7EFc79AkRYkM+lSvLiLC+R8D\n/PTtGR5eG8A7wXh+YzjiFuxyxMbDr7cdN1KuNnuxCCj8FrQp9yL5YUDGGICL\n/DVZTRwHEGH5pRW2HQi9rBK4En6LzBJmBlbqTYfFJns+dj8Seu8oiRk3sHFM\nQjc0Kab4ZdbxRVUSfqQyMjw0HDJ2k3DWhZq29pjx2/iLDsJQ+8QWgpkzFkPN\nIvv4jR8y1R6IT8VJcvW3DtYEic/u615GkE7FFa4ppfl9TYfRMa2O1nvD8IE6\ntqvFMG25iOiOWBbU/ra9lcZt6vx/ISKE9eE+AtssXQIiG3HcCP/S/IVGkMUD\n6uLg\r\n=A2BZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"671cbc4634b0552024553e1fca2561c4db8ef7f5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0-beta.2","@apollosproject/server-core":"^1.7.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.2","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0-alpha.7_1604672417946_0.8627801945293192","host":"s3://npm-registry-packages"}},"1.7.0-beta.3":{"name":"@apollosproject/data-connector-rock","version":"1.7.0-beta.3","_id":"@apollosproject/data-connector-rock@1.7.0-beta.3","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5454919fe6fd0c4bee34d3f794e1eb12237f3838","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0-beta.3.tgz","fileCount":158,"integrity":"sha512-onYEQxzmp+ypQLgAiK6GO70Pgt4DI7AUqZRfr6Oxm457kR+LFQO3a7Y0XxVAxfMU5+aSp4r+ygfQfbTJ+Yfq+g==","signatures":[{"sig":"MEYCIQDD7MDsPCfrV8zWJUITNdc1ZUz230XhnLqqXn/untzD+gIhAPZjHEywKxZoXW9gOYEWmec1KeD35k3JfqkTnAb78dCF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":972812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqUlNCRA9TVsSAnZWagAAKv4QAJI1vpWhVH3aEm4zPlLl\nRzQV0r9GmM/LwhY3dQEok/dC0EGjz2nYsrMG5/2uhrChjesFN7DWtGMiDWeI\nI8DUpFAIXAYvxsL101Ts8qnv1ORwjJfNWTLStA6XoAAGQQer8Qzgup9zenO9\nZg9EMcJ+nzTER61qxbac36wo+irYepEwvXrUfqR/oQuZzjv2rNAvgG3Kgiry\nY664iFIxYAjjDipQ2/ogYUKTBhhRUIfzlFHorg9NzCq93d8OVwW0oyUvoBoH\njR5HozfdLn6BrdQfQu29jFhJJZzAWUHFkGDhYXw+3paCZgs7lCoi36gANOqO\no9eTGTgJcvzh0jsusmGYjaAZ9YkxBmwBJViAg51/EK9G9OvX1xegAlKpyMx9\nrREFQukHaDC+wt6xq/T224Y23px7gw+xM4VqknbW38CnJR4zSMPDfR1zX8ne\nf74ADRbOh8cnE+o5DSv9L6ZczKp5kVBo8KP21gTwuvSlBBYnX7DyjIFCWxfp\n4eGQP0qqZWLE4mgZdrm3u1uBgBcc7wSD2wRIvcTt9/2J9i83aRslc4cnDDkn\n9BFFoXbXageNj+w16fI+jFe2avFqrN/F5RNEbFEIyTlJbnJ/BNsZcq9dXyab\npasI8dGpG1/6Ew4JwOg0nT96L34Hzj0dVPNT5pO97kRZN4WS0eobycr8TROT\nsGiH\r\n=rYPY\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"59eec95a59056f8a05b6595c8e0364ed1c134302","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0-beta.3","@apollosproject/server-core":"^1.7.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0-beta.3_1604929868763_0.8010105908308738","host":"s3://npm-registry-packages"}},"1.7.0-alpha.1":{"name":"@apollosproject/data-connector-rock","version":"1.7.0-alpha.1","_id":"@apollosproject/data-connector-rock@1.7.0-alpha.1","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"66818a0e650dc12ed54c1dd9bf4f3a9eda0cb4d6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0-alpha.1.tgz","fileCount":158,"integrity":"sha512-9CHEjiS+MQA9eslKH1SvEsx0EdpNOiwqPsriGk8EFfE1Tgzn6FwMQcLTvQ15tjvPd8TSukRWIuDxe9yeYEzEeQ==","signatures":[{"sig":"MEQCIHc9b82o3yX/IF6S/QTNLvlyGrLSQ14j3pEdznemVAqsAiBeBxl4kN02UJjiVAAHkHF27O3h1vqZPgR0GmhONfCSxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":972832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfstRhCRA9TVsSAnZWagAAo9wP/ils8IicYcYJfA78Joou\nBXDkJu27wDHv4beZOqq7xMEz2spytYP8n4u37uF5M4nys7QI7MpDx5EsXLaR\nJARSym/1NowP2PEndHfv6Tno9kLywNdwQwc9gSUYEWbK0ZngQ2zy27F5PcVS\nyA7xo/NZWWEJqV4Myq2sKFH8HCoPqCE9YD9mHrApCeedNgRY2PNQmnp18RBU\nH3grdQvFiR8/JpqHDxQ1K2iEHIjCBZ3+799yPZeudtc2AjsXNvIjQgSUQvHh\n/f9xEzGlhQ1HJK7DXFmsRdigRtsTNn9iVI/WxCc8uUcVQMmgPXaW8kToRVP1\nACkz1tS3O+IrQHhd7RnR2QRYSJF6Bba4ATastxWIe7C6m09SNLkznMypoTq4\n/5jEEIHpPcYD+OFrZCPlwx+2+gQSYA0gZ6rTR4bcp8A0zp1nU+fcD0G5pENz\n5vZ0yyhGq/B0klyPNVOYkiXG4JXM28NEsDRHjhh3E9M9XsvQQfx/zyqgA0Op\nCHjAG+mUTlN8cwrWJIURqrHOIptDPGOxdoKdVEDTY3exaoKZIruwVlcDVEd3\ndz1ui8kBLKE4HbtuBJU2y1mKMDSZFRGqwDUO6cpMgUUbfLoqeSGQ/xASES9U\nDPsFH54owETE1vM6/SzIPdF36Uudtcu2VZ91r2f1rBfPrJMLmsh0UTinKXt0\ntXzf\r\n=Fz0l\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"7dee94f64ff5fa594dea9ae3356d7f326c0ac94b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0-beta.3","@apollosproject/server-core":"^1.7.0-alpha.1+7dee94f6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0-beta.3","@apollosproject/apollo-server-env-mock":"^1.7.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0-alpha.1_1605555297300_0.805961503179599","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@apollosproject/data-connector-rock","version":"1.7.0","_id":"@apollosproject/data-connector-rock@1.7.0","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2db8b2e6ef85e161d2da98a5e4194fe2abe1f7ca","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.0.tgz","fileCount":158,"integrity":"sha512-7awG0dsSUPOQz49v7QtLc9kO6ukKWAtAtcPfRhadAD39ose5rlJHKQvMHgEqTVO69NBY42KjrUCMs6g9x6zRGQ==","signatures":[{"sig":"MEYCIQCsMOVfUcWrIQDpOhguReC+ShXyK/qG8d+SYqQaPJxhqwIhANQjE4UPF9lxVrdOaQABmi669cQnRbjVMb12tRFt9RXw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":972961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftXpiCRA9TVsSAnZWagAApIQP/jNbNGi6/sI63686HdLW\nQJFa7/KygiWYLJSSBytH3peLBRHXUV88BcFbfCh31ovjwniNNPf9yFAkTHaA\n4+yFqvTSTigjHnmDqe8hjEOFcnYXeerA7rzyrSBvOjJyt9r9ZpcDprIuSsCc\ngrOgD61yLI90u/6kdiVxUCPyi4BdVaCNh93M8RyIo93RNJTY1sXuo2VRrLyQ\nLeJSFuhvWKAv37vDzAhP55/M26qVkkH3GGFMqyUmRbUG9hPpbVcen5E5xxDB\noqcKaRj6ktmwiVT9mjSVIu0BRe/3StDc9PdwKfSxwmDD/YaO92ZoUw8cX6oQ\nhCRCr3KuzmkrO0oJE5EFqyTG0E2yMHM3Q2hLUL3I505ZccTl2eeqa0GQE0TD\nSqChs2MTbhvc8V2u50MyTguh9nunJwyF4u+41sJUxvVZRTGtHxx3+uf6QSR7\n5X92OzNwHix6WonnG1x3853gEqnWLkRUCoHqgh/SSOm9GOrLSMbjsqgJOVNp\nHCbzvnZfN48Lg0xtNtluRQUBcHKw9vMH7qUeKsvSoLbTjUewaKxAhxXHBWtf\nUi3KBNd3pkOUxOudg0DxbGRsCshclCt5yGU3vE8CrItiufZqpFupTG+tnCar\nKWJh6us/TzOJ2pxWXHEzbnJFu+zZg1EiGWL2qts9dROevtkXb0MPIAIzIJcd\n1sZG\r\n=UkuQ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"24048b50f87b3885da72032dfba510fe53c1841e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v15.2.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"15.2.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0","@apollosproject/server-core":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0","@apollosproject/apollo-server-env-mock":"^1.7.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.0_1605728866141_0.5419229182705803","host":"s3://npm-registry-packages"}},"2.0.0-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.4","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.4","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a8e6dd6ce385d4228f89878b6659edc5324076b1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.4.tgz","fileCount":158,"integrity":"sha512-Rh5Aac03xT/9c+ql2fSO4x7XeRckbeA8jFYfktlwkxNym24Hx88DIIhgZQe+1YybFtCp10uKTWaDz4CAr5CHQw==","signatures":[{"sig":"MEYCIQCcBDEYQuAPWJp31ENsG2mycgss1Pi+SgLu0+f/w5NgrQIhAOfNWqXGHmJQhfuFs+ktlJUV8DqX7mrLzvrHV2qZ0OqK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":973046,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfu++MCRA9TVsSAnZWagAA/+kQAJuggALDbZDL6pIbBB5X\nYm/RzLUzCrqoicewOVWLySEDmfsxgKPVWesK7+ql7IQZEAfFmdea929Xgwdz\nBXTnXXHdn+IL7l6tc6jPpAQ2UlLBIya5FIExQXbNEgZH2yhPQVTfLhs1uo5U\nD0T8YYRMlTqIDOFsL7YaGfIJKEP1m4Vy47apoRnHfgLAv6liS/WWIJC0O4xS\nZO5bKa39dHRYyC8oJfZVWp7BaZ30++LFdTQmXRZvZkQVj9Y/Ac9XgRIZyLeH\nXIRNaUBR9wQTt4dbKay4hqcPy9WvMf5AvwTONzL29zJJHx0oJafo34R6vjnr\n3+5AmuYHGWJSG1M9YgDCgptTqxn1tukPRLpx3ZLG9cGixJlaguLxOyiwAogR\nrLGhodjwYfTUkTyNW8pnr0LU7Q2JzVOxrgGYQsZtdDZojv6Y8+9q0GWMvjCV\nYr+psEU6LgpYusfk1osVIqq1MerICrDeHSBOpJ2D0KTamyPJ61oDMIOuTkDx\nGQkBAs4Ce++6qGcNXIYpFOBeKoDQtfgKGDvixPwTJkOba52Wx/RaIP6w7zSZ\numE7hgpEbdl4T1ahewSytzjobsp4VxACUYHifQyayzee3jxW90nWs9++28rq\nh7A7Op/uHPk2Yrxqo7PuxcUUlSYabQXPXiCbE1O7tD5j2eb15FkE6KAAkMQ8\nVj8N\r\n=KT1M\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"754f09de69a5bbcf70ff5da79b95084d777f1873","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.4+754f09de","@apollosproject/server-core":"^2.0.0-alpha.4+754f09de"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.4+754f09de","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.4+754f09de"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.4_1606152075542_0.9923076994108393","host":"s3://npm-registry-packages"}},"2.0.0-alpha.5":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.5","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.5","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1b44a8812171415135c95442ce3b41f11a806d93","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.5.tgz","fileCount":158,"integrity":"sha512-YqRj2HL4MkyhXkOYk+EP3UFaMGPBKxhLb5V0ExysZeZciFSCoMf4W0KtlMgkvZ24KTX351uw6ssDHk2+d5+B7w==","signatures":[{"sig":"MEYCIQDJfKXdyH5si5vOBPxXVWzmgs3iFhLEWaapPTMDbGcAjwIhALQA9W4olgyohBafeq+xbsSYryq0h80wbO8r6vWOFO6P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":981891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvA56CRA9TVsSAnZWagAAKGIP/31EEq5wLtKgcLV3aYxA\nWmfUQ6sasAP6X+rRVs+OCrhLsDEEYhPUvNv3Bq9ShaQuLUCV27Xk1HSkvVI+\nu9xwz9IwyAjEr0kG+nRpaWCbutYOR55CcKyKmbi82PbUA2GDnBUFz7bEW/Q4\nvtl4UCTVQa2yksG/KZo2gAw9aDB99KUtfbzFj724bDMCfwa+Zq35RFSlhrUw\nI9HqfZnIc9cMOscW1t5XlnyQgwMMd7ju7SWiFsQTU2ENkYZA2wx35EJZOMKV\nveEflI24g7SwfEvZSI1z3z/qfAITwj0gxLLmzvAmhIoFZN2bn12gcl/0BO5f\nDE7CLZePXbHb0jzjmCcVMm0bqSv2UjJ+6B/qv/K2QTxhYY51MWpSxzUZPVAq\nPL2BvNR7v7AGqNUUtVejFUBQlUl+BhoJEyauNDm7e+LBlTDdfE1UlHush5UG\nXHzwSBYOki/QugR8bxkAnesMihbSWSnoLY8vIkswu8peJr1gqiAPeeJu8uQn\nG0MBb640zuDPN5v84VeKeOnDW6493mjy7QQ2VDw7j22ARWBPZwQaYvtEC8x5\nxdgcHlOZA7e0E7tE9N0EcvCd3ybeDYFOS1XDxLAWEW0GhUVveF2wzL90wdWp\nBrvRRC3Fcr2si8qNMRdxGA8T/qQoqimab12ndPRh9/3Af0YazzeWPlBzBHGL\nuaPi\r\n=xfcr\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"151217215ba71cd4e4dc1a9e3b266d22a64608fd","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.5+15121721","@apollosproject/server-core":"^2.0.0-alpha.5+15121721"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.5+15121721","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.5+15121721"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.5_1606159994257_0.9057027340396875","host":"s3://npm-registry-packages"}},"2.0.0-alpha.6":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.6","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.6","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e64b2f2a96dabf30537103a546ffab3ee6d92a5b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.6.tgz","fileCount":158,"integrity":"sha512-ggva8dQVVPU2TtE0cZWiC0gQCUD9ywrAg3Y1XpydZENrklHyKmTzQHzaWM/0o8Ebwo49pLjM1XXWkwRUAOsyrA==","signatures":[{"sig":"MEUCIQCs3hVJe79U3aV2GqZvS2qQveX1QAyse70741cIjQHfVAIgQbQ+lREOszNHzaGrFll6M2JTnfmwEjWaXqhU/KsHn94=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":981576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvoGjCRA9TVsSAnZWagAAw90P/j6LRg0ov5Q0Zx4gP8N6\nI9cc3ciqCCa8JO3yAZSd4QkS6f6864GVbMHWW/dsAmeJjnnR/w9lnfO1gqYh\nh9+CtnFaEJEmClB6XSzoEXz76M+6SD8xEtjO6XhyshwjU4741Y6RsjYcUBwo\n4fBTL/X1ZkqOxlsczW374ZmIr4scERQn9sFceCElIJ0SOJHsl4YzNuMM8L5U\nwn9YsD6wGe1rMo8PA1aHNUEcAjhlJsDDz4lF9m8+vzGvysVAImMq3mBT6KXA\nnXy4PifmCOnQEoa+jryISiViIRwbitfCbJQm1MkHFlBZ3fRTwVQsuTZjLWOg\nE6j9B7IfKkhSOCzAuJ1/ztVJmsltsTiRX0UXy+Y+AyDgV+1cS8L8HWJ2nTDL\npIm7CMjpiIv051xjofHAji0ku+YhvFmriSTMvLmV8LZbtY9iqqtniL0R8j4U\nbm+sVIdqzwHSbqXDus2vmB4MYrf5iEXWbuIi0R5TMVrQL5X5amUCyw+neg3K\nboG1TOm3zl84GpKA3o7Ciie3IEUwBSYEEL0/ltOAr8blegHCJRWIC+1da/4D\nmym6QNW4Ar6EA6VodgtEGDXNspuH3tQEwZFvyEj9Hfq7X0rVFFdZL5HAOm9F\nCgMJCCqxuO60Uu3Sdo7nSKMsWQEtDteCTUBOQc5/7RzRcEI2bXShAsnsXwoP\nL6Cj\r\n=PTUD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"e2230b144e1afdf856c5316339a89fc59ce149db","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.6+e2230b14","@apollosproject/server-core":"^2.0.0-alpha.6+e2230b14"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.6+e2230b14","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.6+e2230b14"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.6_1606320546720_0.096754218754451","host":"s3://npm-registry-packages"}},"2.0.0-alpha.7":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.7","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.7","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"583a3b4ae71809c2ec3c0e13834d6c596fe08773","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.7.tgz","fileCount":158,"integrity":"sha512-Th7gHrysWXQEezy/BOppXJFJncC29PTVOj3U7KkWBKJsXRKDdQTejfDp+341AgleZEWr6A0U0EDBd+2FLe8Ebw==","signatures":[{"sig":"MEQCICTuUVKLiEuHWfuuCpBakLmMc9UsFeL4XtMAZaCgBp/mAiA1g4CKCRz3QKLxTeaSzMy7X4r+vqOkHDshVqYJxgCupA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":981576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvrMCCRA9TVsSAnZWagAASPMP/2yotmjfrPEy2iZq9ne7\nxqCiUMsMZFdFnQaYFDRl2IJFZwxXYnfmVDb3jPi/rN4ZL5s8XPFyVMZLmFlS\nzJYT9FtblWRQfMvoU4+6t+fdLpBaCysm+VC2CzB9a3c2Q7xJnxvPoHE+BEjV\nd+jh5JGhVkWfnd/25eHNOs71egT2PF+JHra6h7R2UvHR1cjKmzMeL8MnFCdN\nywMY6a7gYc98WiODE3R/UzY6qx3O/zlm/49Tys60GHn6s8TGJ/MS96bluXa+\nGhGe07FqHwl9Gdx8wxjiNKGABW0iruHf5/nc2V3wD16es0nnDl9HczYuHySS\nIq5I1jPJCDqN5ojH64zv+WQFtxE2VYoAxhEMr7hpmdUwhxm9UY3tSpetIwmC\nAtfMxcpcqA814DLz0PRvj/rS8IfwfiJP/NyeIUvwaY4hWSDpzj5aMYB/DTSF\nQJtq7gjeKTuP4683UBpHsNJ1z10j96mgJglOZjLtosIPfcNx7YTPuGAJ1SRf\nSY18ssVnJdn53oj30NE8ZVKWBUOZd/RkVZ0u8u8wFGZPlJxK75E2MXA14YsU\nN/+Imva71CSrwr95NxUitIFX48TC0+WtagLOEUu9qRj1HF5WEANugo6NcftL\nmZuFmK5ZfUDlQbbLwGKbJLOp32SyJZjQr/9lyjWjMoDY48bFr3B7eu8wnMcc\nblGM\r\n=VVt4\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"d1769264b9b855618e57fa0e758a186ee301c6c8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.7+d1769264","@apollosproject/server-core":"^2.0.0-alpha.7+d1769264"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.7+d1769264","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.7+d1769264"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.7_1606333185620_0.8253881178505895","host":"s3://npm-registry-packages"}},"2.0.0-alpha.8":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.8","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.8","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"51d5ae1416631c77904a8b39c93813c8cd8cc9e1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.8.tgz","fileCount":158,"integrity":"sha512-q5w/9MzX/FaT/OA4ZEbipASzGq6Nhr9huWQz7lD3R1BAKz0PGM4Sb3c29hjr/2laAz9FzS0f57JcnuUDUkIITA==","signatures":[{"sig":"MEUCIQCbxaPH5mV5NMMtFmhdAr8ipQ5dkvBjqKhuUBWNUWVODQIgNOair1UKCJODLmnRzMN+mLkfn/Pb3LNjBDi1jOlQ/aQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":981576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvrM4CRA9TVsSAnZWagAAXiUP/jh5f7Krq9LixxhClJiX\nIFNKj8HznZfN5IdV8k1rhn210VALqtDsK45tP3QtuC/uk4DPac9CB4BvZPHF\nkOOGteVxD3ZYHzRavtU7iD6lCJ8d/vOR/fBadiPeGLFwF+NNl+mlssWhCi8B\nlfsAMKkWVecVhEyH7JNtGE2DEYc/sLd2C89N//P6Q+dxmtDz3a61D8Rnv4Ld\nKjlLC1hB9Jr3VQPD34iPxNoDwWKlmHEAzP9IZNwyCMf8OZNqW8Ur/dfcynxo\nDr1y3SkrHcx9pbtmUVfB0dDJvrmwXl4WuiSwR4UVcJWU7Tha2aC9hFLlrTwK\n0DJOMf5GiDDbD7mxJg6W7cPDOYogsJRGmDAAsqXpHIvNdHKiKP97j9E1S8kS\nHePeH+H5sABHGEj3xIwBIHL+kpjtxsoR28+y/9Adjx4Cn3Z3Xnjw5STXF/Ue\nTSbU0xQzNABo2OIP44VFUjrGTLWtBKs4BxRhUTkdmxnFMqOiFx0i6mFmm9SU\nbZJYpaaZrAD/+BK24T28RZzRNPsvIqTTseIAqLO1QuAIlv7qMBoY2wItYyjy\nNT3dUABgqsV9vBRP3FugM3/WzRD+6qBXU1ToDf3G86h6qrxSV0DGju1mAEjC\nOVpNkK1TudJnbmq+8874aY5f9dExwhPV/yg8EoXoULAwk+PTyrPbq6LspEc1\ndQ+5\r\n=93Lx\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"fc8cf3d31135550be0a60a9aa54e4fc1f799131c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.8+fc8cf3d3","@apollosproject/server-core":"^2.0.0-alpha.8+fc8cf3d3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.8+fc8cf3d3","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.8+fc8cf3d3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.8_1606333239693_0.16218403596518383","host":"s3://npm-registry-packages"}},"2.0.0-alpha.9":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.9","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.9","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"aca953089644f2288869035bc92bd134f0c5d17f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.9.tgz","fileCount":158,"integrity":"sha512-3EYsBR4B3vey1hCTP0EBsLwQnquKOD5gycRt+xMbxi+rBgoQhYB9Z1dcUHOSd0i9S+Z+BWq38G9XTBtT44B0HA==","signatures":[{"sig":"MEYCIQDVbPCtdIx69B1mDfPIKSWYg5sQaZC/8Ho7LtBpNNniCAIhANTzztJC1Sh4MXWXCXzjG5MPdh+g8EfrV9MedZGxFisG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":981576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxUKJCRA9TVsSAnZWagAAKecP/2cHZN70ALpvEaPz4Not\n7QPjtUawm0SqsNOHaO2SQ0LmsWVhY2HYOw4dTzzCHHMQBMATJ7Fjfd309/T9\nPv6QnJzOxB+FrzdlLBYZvqRPB3+AYcrrneX/vBIk8trvk5pO+lziwOACRgDZ\n/NcqrbTOUJXGYKSsPdFc5CeCgz14z8Y95U526EYYrBoc/swHLmSZ5GKzuKRi\niYXHAOf+qbgEv5GHoWTIQlzeR4m3O67/U3TdL8AVaTLiSxPB3g/26Bc+FZKR\nbhxEXMN+2FhlvySuIX/69B79hyo8TY7EPOqnIZlDMEcy7e1ccpJHug5bG7+H\nIJvGVpGZOYrKMehYg2mh9WaWFZyxU5X1GX/XnU+EYqPgyMkQW01LsZF0/OWS\nMs0EfVfCyIg4CKbVBT6cgBrYRZ4aM0PFseCjxBKG/lKG4FsuRFWjnAev2fZz\nWHkzjxl29vmX3+Eq82HtUBwGCTWQQmRcQUtGKFHSiXRSUFuVBFdJSemXKQKM\n5UcwGpun1Vwnj3TS8TBtKFekx6/XfcMgDI3uCGfqZm79Xujk6uz+Pdyn8c4c\nk0ilYYuRs1jwNAQPNEV/UDqEmV8B0UG2FjtctXB1ezgBYM6smVyKDP5dIUzG\nnb1AFG6pOl7jvnqpQtU8pqahx/1d1ZiL5PgXZUmCaowSmQ7xc17ySq81oFk1\nJqBn\r\n=BpGw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"59aaa97010164e06f39abac2e86129b6749bbee9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.9+59aaa970","@apollosproject/server-core":"^2.0.0-alpha.9+59aaa970"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.9+59aaa970","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.9+59aaa970"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.9_1606763145196_0.8423776051720648","host":"s3://npm-registry-packages"}},"2.0.0-alpha.10":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.10","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.10","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"285fd4dd50784ee658a09d9a5698268f4969cee9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.10.tgz","fileCount":158,"integrity":"sha512-dTkNTXMc9Z0K76mBzjnsdfmdcQN1liwRY4WBOqVmMvoJ4fYf4zVVelI1NqYpn4q5gQJBqImcFah9R0dtTKM1Jw==","signatures":[{"sig":"MEQCIBlM8YFnlAcogQHRcpX5JhHnkpG3Rt6bbItnZOW3iU4iAiBRM/6DoXH+0JLlo4tMZtcFHRwDjVyLcirbCnZEVFbUpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":981581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxVTGCRA9TVsSAnZWagAAkrEP/i5z1GvvCgy4ySXCAPWN\nEtXYRi3jhzYpwIgT/7PZ+gyX4vFV9fnyWTrpsogKj/j+ExVILSTgSylVZrbb\n1PRhV4fIzfAaRKETs51kmRJ85CzSt6z/tXSsuLe1/X1B0Xq3tYtSoJ+PHS9t\nJyVxWgsizDiHUagBeoQxlvqEKWBqPaRug6iNQLZoKBOXainSRMedpPymjP3P\nutvxBxdSDPq9g/w0E+4Wgh2mGURfOZoBlOTy9l9fUGckH5BsKcs5gNcJ44fM\nwo2gE6r+iYvtF84VQ4PTLCgRkXtzoej5lC2qonBp0NIakisRqo69qNihwvsa\n0wrA+919PtQWJVLO+FIuL310E2KXOHXo6hQJN3M6V3sxX8eMd8YyYm4XCC1m\nEaIAmmGZDzmaYeYWEYSUIJXO+om4O3CGA8iv0ROyMKCYF2uXTNSS533bvh83\n5pqLQoqEJbg1gSerKxEuu6rf45h2d9/g3VBO0PyyY7oijYlaCC5F4GRr5uvY\nxp+K1DYQvIL1bvYCV+bvZEZeXEO22eWlz5YVkvPqwV3jWhqsb7PPoqpBQEOR\nIhcAwcb4arkA5SHMZ2TSi5tIaLMQDwu+1YPStMwRC7o8HnpsIq3o+IdIFiUP\n+Q4I/YBSqr2mnV5vB6PAFK6NcnYmUfTL6zDsnvBzumzpiPn2bmGbeD9YQ5lt\nANd4\r\n=kpW0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"5da6f1620e8116fa937326835df11a8eadb914df","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.10+5da6f162","@apollosproject/server-core":"^2.0.0-alpha.10+5da6f162"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.10+5da6f162","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.10+5da6f162"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.10_1606767814238_0.7602820884306771","host":"s3://npm-registry-packages"}},"2.0.0-alpha.11":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.11","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.11","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"191df31098ff974e2e3ed95fe995ab18b904ba5b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.11.tgz","fileCount":158,"integrity":"sha512-v3aRezd5+DGAdpab3ccb5E1JQYWZ5iPhD8IMGLeIGsJC7F1eaMWKe9c8ZMrUehhHI1n3AWtlCjvG10jPyyBAuA==","signatures":[{"sig":"MEUCIA6crmUfIfLt95JupUZTmhjGIofaVFIM5ZZ64E8cKTSeAiEAhv1jQCaPgxU3T+MCsp26/a9rd+/bDLPK1oFbsjzSBRM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":981581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz5uBCRA9TVsSAnZWagAAAgYQAIYUShfmNl8ezaOv/EDR\n6yBj37ojN9KvaB8ndR1Niwu0WMG+ZuvvZabNzparyc+A5SuEY3u5Xl9BslyW\nP+oHI9qjT8BIHLAOO5iONMuVEqOJTgLZmiSq/yxoXIgGPWhyJM3gBUzRvCpJ\nNJb4N6nVE7F6dn9WYqmoRxM06F/QMf5Eg1kejXKhxLNMotFnSnkolyL11TDG\nfkJ1A58ZYaPruKTFjKh2+h7EsEQAi0HWA4YmTRTxNjZl5V5FJ3BT5pQb+WrC\nYUlEY3XepyCVI9IcDn4sgkFs6TZstkaj0B8aku30Nbl4sQwD7oxDWNxF3DGt\nSYd83Jr1X0vmSk1vtqe+jM4GCnEjHe+Eygk3aoAnijZnNfLLBynESpo4Uomb\nUMpUx06m0uiWs6YkvLLdf5mSUGpFKY71o5pI+oajWMiCEzt6KOFBPr7RClBC\nSmG7zHx6JLMZjA8F/DOp7hwPvoXpO0GLg5bgK//KfC927VPQMI/2/EW3anJz\nVqgspxgJIbgsN0riSMPIdeBUWg0BzDMoyQdit6vLPg28yRbV+F1d7O9Ishqi\nsh4e1On/TtpgrfB3kzzx3Me38CBpluSjpmUz5e6opZQlYEEjgp3fKpvFSm+P\n9fzxsuOLK3wUQjWSTu3sfj3dbfxNoAXIV35l7iIgX3G1uV3R6qVh6PTeqIvA\nuoEe\r\n=jOKO\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"84203963737ad269c997fcb05529d23cd1d9ee4a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.11+84203963","@apollosproject/server-core":"^2.0.0-alpha.11+84203963"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.11+84203963","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.11+84203963"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.11_1607441280646_0.9258798038932414","host":"s3://npm-registry-packages"}},"2.0.0-alpha.12":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.12","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.12","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"01c231e45289c25c7c74d3f4ebdfaabc50b71d59","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.12.tgz","fileCount":158,"integrity":"sha512-imsSgT5Pw4/gbKR7C/+JLMj13xdOIi/C+NVcbKXyYFxkJfnIXsfM1a1LJJZTaOPBhf0wR90i3NSAS3L3i//o3g==","signatures":[{"sig":"MEYCIQDn+duRguyRh1RLXWopD4d9sglNEKoxEN/pe6y8n98WyQIhAOq4QR+4DktyUMWowfWHh1nQPsSUwaIHhGFRVgb23rLq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":981581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0NUaCRA9TVsSAnZWagAAb10P/RN2upHqYf2TQZirwJnY\nD14fLrMVNroD0KHPDuz90aPEVSqGbIEllyYJEKkaPM7lP0Kew+dSREVMGkBH\nBSfpUMpuWqpdayICgEoQu2v+EQUKak8Iad+8NNpT+93ud6gpb8O8fsk5rkgZ\nyCFrWkoCSun60vzux8Y3azjEoh3yGG77P+B+L16AS/akwoosXWdiLWye7jNS\nBx36jeGrWrM4A5XJVcKmBVB2pS/nBCWMem7CeqxsmZL3Y8SgGq9ZhZWp/nI4\nrhPrgLn2uXbquoknTPhtPQopRXan/as3Op4558hriLaYpOZDvenum7TW7TgP\n7fRNHb4vIfj3PufGvHSwShI/MEBnrAwFcvc67bEWq8GoKyGqeeHvvEY4mcUe\nMwAaNzpjtYHvwxJRLzEhqvc7r/UYtZPZ5NVIQlx4PXSTfH3GW1JeaVNI2Mjs\nlM+b7DRxPrjXDxH2bVC26yNnh8iGJCTSx3LxhaSy2MyKI9ZlWUNs7GSn6h/7\nQe9sxrfJ5i+hv0K/dNEzphmspud1EQYZbcoQF8Qb/9xB6Q8PbNO8C91V8g1b\nc56a7TN+RiGN/Ym/iprrIAu2Nz0gZzrlMW/yxEHnoAL8mxlceGWkth2gTZ0v\nd84rfck19O6A+dUDMOjMIQfYJ4gbhm9/UpbvHpKkbeArYfHd2JCzSt3KDmhE\nljfz\r\n=KBhb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"743430b22e30b6d3307fa76fa35d991a7ccd45aa","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.12+743430b2","@apollosproject/server-core":"^2.0.0-alpha.12+743430b2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.12+743430b2","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.12+743430b2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.12_1607521561704_0.9923268210214813","host":"s3://npm-registry-packages"}},"1.7.1-alpha.3":{"name":"@apollosproject/data-connector-rock","version":"1.7.1-alpha.3","_id":"@apollosproject/data-connector-rock@1.7.1-alpha.3","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"de6688dd92b75a5620bf7976c59092253dd8eebc","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.1-alpha.3.tgz","fileCount":158,"integrity":"sha512-hBDrAjuYDGkr7GGyXQ8eSXNi10qJ+cyh2pk/mPWBd935j8zl9K69Xvrqugnk4rDi+0YB8+ZOjJzmRu+mYto+hQ==","signatures":[{"sig":"MEUCIQCKRFSE2WpgbGEPKbIm+sQ/1ljJuOqwzGQ1OvdKUW6hoQIgXWXsawSvzJZUsjkqVlavuZgVT/ctNicXA+bmVb0Mcxk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":973525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0kabCRA9TVsSAnZWagAABqoP/2GRA48zaisguh4ZO+MG\nIl0cLO/AbGvorombjdIzNDioKMXqtQvNjJ8SuM3b6Jp1s/utm0U6npMQVPXV\ng1Z65OBsl4Slqw6FL0lW/eqa2ADVCjxMViTFGjQMJ/gbuhRy0kJl03/Fn8RB\nB/c0pdM8O2mc63q94y7Zy0Qiv+cKrMlqbDJ55p+GGzDuBCmvUSTpde5Lsjp+\nsmeA8NzNyB9CoK7bAi8yuoTCYcH+ab+8bFzrXVvsqYVdfliNGYbeA06/OB3u\nT+aTSFVx7ihtaJ3Xcz4pVmDdmj/bWD5zoxn557DHFLN55xfpzNPm6YSvnXlq\nnjGBlZ5DgW3SN3/htFanPN2CeUwIYvFy0L8F6R5gKqX0UjHek5deSzdnGgdC\nLovIyXxYhp6LeTPLOi8iaEsdO9GWKfG9ic21Hx9wrJ7YhUvjpDxTDXaGKXDt\nux92Sqao9Z9aaQu18joCDCU00yUC2tjLwuYv9Jq7EHHRoRtWJbkofEDQC+WX\nahrHIywjz2lpabz5VMz4IkWaWpo8eQgC6xgUPdCAlx4JKbU339H4QzhO6PA0\nr8noC1B2zIIO34KYrdHpGx6bk/jrVnN5rG7IaDdKVHB6xO6Va/qzzrMyOFBt\nB2ocDZOYSKSSXVpo9ELoLdRvLCiDftJaAi9gCCyNQUuormdVvtTBVYV0kLak\nu04M\r\n=CNPC\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"2c50471d4d6d74852461f607cebb0c4f9d52c73a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0","@apollosproject/server-core":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0","@apollosproject/apollo-server-env-mock":"^1.7.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.1-alpha.3_1607616155247_0.9945920840401272","host":"s3://npm-registry-packages"}},"1.7.1-alpha.4":{"name":"@apollosproject/data-connector-rock","version":"1.7.1-alpha.4","_id":"@apollosproject/data-connector-rock@1.7.1-alpha.4","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9ec6ab5109dfe16bf34d505cb54adb1993cdbb1d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.1-alpha.4.tgz","fileCount":158,"integrity":"sha512-xOE9dtXTYdUlVfEoYYiHPEc38IpBaKI+IbQVaWMxQXkKAWef7y4Nt8tPw6NXsKTb+lwU5gmucT0aMqldz5Hcxw==","signatures":[{"sig":"MEUCIQCWeWFHouUlIizDesvYcCGgWUcV+PPvBnUw8zt8nfSLwQIgIPs1UXkyeO5xzrkvcqD+nsO/QWP7v61gpBku1iRToeU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":974151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0kpFCRA9TVsSAnZWagAAlp8QAIaeeH11H2Hvxl+TZDD8\nraM/nbUPo7KDGI5InlJAl61CfEKa9oCJOz5jbzn0jkxkokmKqrN7FXsFz08X\nrWit2A5VkWkJENiiafpo0Lnu1UuwT4JzAOV1kEhdCTOmL3bE8pZiJ0WqX3Af\nidaR5wsVP/k+A5O+9xO4sUsqzcHDBvrKL+usvUe/yFHgEee9f0MqV9HlYS8D\njOtx8CcIXYtUk7XTBXN+AV4CuP5KLUvMlxUtIYvAdAIrh5Ib2bl7iMS9zt0p\n77dn633jrtzmHzaLaB3uzcI9pDW+jo4HDU9TOOhlJ1BoQsINBtheT3FapTAC\nD5ZxH6sL3ey57oh3TVb+hTPQfREpG2pYTcRbL5o1kMCaE6I3Q9M/J72Lwhok\nkxCWUsfgDuCrCFVKtrdpWZuWbzNycqo7j7c2zPFdqSoEMRZJWqce640Ppivw\nhn18u0OMkSBZ2wLlsDiXisbF2vn6KDvBxZLZ/a70/kOmY2aim7wm1b4AEmCV\n/gx07HlQOeBkcMcUOL3Bv+PxM8dr//pw+IBEIq/kL5HSMfXjb6orUoMjl3HB\nPSa/rb4BI1t5uJH3y2ArGfkvobXu69TkRleetjEVQZ8tlZL1mDhgYvKYTA/1\ngO0kWDkTZEri/4NhLZJ1ne+NBqs2nf2dcKQOR787See4KodZNq3wr4PNUiim\naNcP\r\n=NJ96\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"5345a5593a66b423d43fc207622ab2c826b2875d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.1-alpha.4+5345a559","@apollosproject/server-core":"^1.7.1-alpha.4+5345a559"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0","@apollosproject/apollo-server-env-mock":"^1.7.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.1-alpha.4_1607617093425_0.9379882832461264","host":"s3://npm-registry-packages"}},"2.0.0-alpha.13":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.13","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.13","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e9e359953950e54da264b8f108779322717fab71","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.13.tgz","fileCount":158,"integrity":"sha512-rAAFJhfjGZq4uk2oi7lLuqbSsc+gI+k7xRbqy0I1zqeJoyiBrK99qMFE6vOtbCmWLXEFd+OC6s0nWtcJtl3u1A==","signatures":[{"sig":"MEUCIQCI7YhuMCH/K2nQYOXvOhjIASKujzxnB9cogUT1+/qaZAIgB1oko1Py5X3GWOsRDQYpaUaYuyR2r1dKUsTrvk+Jl70=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":982724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf04UuCRA9TVsSAnZWagAAkXYP/0HHORuyN3mlV5xvO0Na\nYT0TZGXhBCqs+bw0+YQiVKaPZ/xKLUcPjCVw31OzKP22mHGR0Ipv90JhD/3g\nQ/A50L2oLU7OuEYRje43sR/CnwK04URdDJYXJPUxxkbkyxN4qJgtlbmv9tZP\nnMqTRXMYObuzir3H/VC9fdoXN+wdaIlrDa5hdXiO574KHLUEw23Hv1Wi8FVg\nv5Kt5hA2Y84hx1zZ4mwUwhklTbXhLnOvJ3D2rrzszjUFUG+aZJgHjGKbXahd\nm9aCJVh64HptT7AGdm5MvRSqy0ko1//fEer3BnBX4+dxsFBe9gKWmV8Bcjv0\nq0oPCubOKlXx5gRRGpWLhvzcdCv5Ydd/x1JHCgzdOxdlvHW+8Z3gXQS3Lepl\no58dqTDUDkQQcbkX/Qeou7ut3hJhkwGvjrkjzQezVI7ba587Dk8Lj+14bVFH\n2Hz5Jp3e3f2fmLTesx7/EJdTEYqLPKTePxlRTdkz0yB/sAFLR2O/+9iHQ2za\nG9lt9ePFI2oviYpj9h/wi4epN4553T0stqb+WQauCNKNR+1/JsAR4ZRiyGFa\nVf5Czi92qqv/0SPeqBh0FGqrM31JL1D43WByNRsQjaEEir4DWxcRvgS5KXgC\nnB2IJtlWgSD4XuI3WPCuc4YKVruq0+guSpfVrJE5HHK935YJLWMvK1klOrpA\nYG3y\r\n=i2vX\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"076102184031c46757e231008f847f1725b80953","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.13+07610218","@apollosproject/server-core":"^2.0.0-alpha.13+07610218"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.13+07610218","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.13+07610218"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.13_1607697710196_0.49616518499684514","host":"s3://npm-registry-packages"}},"1.7.1-alpha.5":{"name":"@apollosproject/data-connector-rock","version":"1.7.1-alpha.5","_id":"@apollosproject/data-connector-rock@1.7.1-alpha.5","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c25969831966509ed0bb4fbca346930732215100","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.1-alpha.5.tgz","fileCount":158,"integrity":"sha512-L6/3Cs6Vfbaq9GjK15w2t2Kg3iu8faNbZRvcprmvEcg7YhBMcbo81Smcd6oRTGzbvQ2IpsoeKXj2TYY+E4PYqw==","signatures":[{"sig":"MEUCIQC/k+BdxAIDIB7UynHGTt8DmKEa588EG1223hsu1vj9cAIgNqbd0QGA9ARn0WcStwT9DqBxunbLQY0ko1XP27gM/2E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":974599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf05CUCRA9TVsSAnZWagAAd7MP/0sKlgdMozkh+ugu61kd\nYzZl9NbA/bjem4pM/a5Ty2wsp9Id9ufdmSaou3GK7KbY1O0U7Vjh2oeJFIgH\nwcnty7Y131Dfd0Ob8ypaf/IZ39SmnLfB/tc1IkU64AoYDqb6zwVJ/n2P889Q\nwy6ntpm3Xzd2vzvY2LmDlUMVxlFRFsRh4VusqvyGRoS8pvaA96W2pP/fD8vJ\nwk0KEEs4gBNkvwMp7lrSVqR/DGtcgFV3rGXyRDdFpyJ6KYJUO2StEdixWgw9\nhOFPNzLsGeQNpl+SVkkTnD5TiByY3twWHXthGsVfCJauZeLrbrx2QQauHiSQ\n3Qv8pMs5uENjtviTi6gdbieFj7x5tOMKDlwK2TP/XNtv7QuAndTxtouGU49p\n2z2CmpfdBzD6bY/wFSZXNf8r51/4J7ZczDLXIcfDn+8NxPu1MoWdOkzb/DIH\n+sZrd8jX70IpeZMDZbMY2WSoA48JyCFNHMrDCSVsIRwfs5oEZ0OQY3IBaDer\n1sMuM+MA04tszmA8cEK7WIhgXu5Z6y0GxLZjXq78fJ2r522hf2ZMUWxG2RMh\np92PyJHWj+FVC69MUngWG406Wx7/o3sAXKHFgummXV4iDYCrMv6whFL2ADqI\nvVGRW1mWknE8QPAqqpKXqLl4fL3V7360jyZd+MnU4pO7s+83QB5oHSnNT8ad\nJog9\r\n=wRh+\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"84f143335edf19830a924a5f5a524b43fab15430","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0","@apollosproject/server-core":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0","@apollosproject/apollo-server-env-mock":"^1.7.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.1-alpha.5_1607700627600_0.14635744900578151","host":"s3://npm-registry-packages"}},"2.0.0-alpha.14":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.14","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.14","maintainers":[{"name":"didevshop","email":"hello@differential.com"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"yungvincenzo","email":"vince@classyh.at"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a89e54b984f26d222e57bb1431b32e821e1b7422","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.14.tgz","fileCount":158,"integrity":"sha512-VtaMKY/LG7RMn+ON0IC7rdHow90zAqbVMDc1j4eOan7EEPhN/epslVm/02XGWkF4/5jXHKdVCOJXB9tDmZ6kLw==","signatures":[{"sig":"MEYCIQCZY2p4NaWrTuzGUgftY0WLL9uDWNl6CJASiAjDvpa4bwIhALTSkJQi8RXxirn3RAhxV8XVmV3qtkbnuHK5/UCH17tl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":983206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf09yiCRA9TVsSAnZWagAA8ewP/AgF9dbOc0PRYTZj8TDa\nazFsQXniX8i/ZgLzPD6jyOo9dDCatMopnlaotpRszpbuNFbWAPWCyxElSx3I\n5BTdfj91n9MlUKoqgoMsG2T9AzbZeIxfSghasGI9jDNrtDQiZYAKYcPkrap1\nDPFlVucHLYLlduUXwDuk5DftJN9vxZTSZm0pFoiqqtxLPMRaqEWQRghnuRuW\nMoX3QfnZhjVu1mgTxW4MlhTxxhkhb+8oF8KZ1oWCH/NxhBBJ07K01lZEbUBf\nb4qOHtL2UpvJCqBjVVNZElEdJqpMKg16Jj59puWvwEoSKJ1e6M8VdujZv442\nmhgI7U2xECLufirBiUtvmjjJZfDdZ0uWYaazQNU7l0g/3lZekwqaU+vIwGf7\n15DJyNeCWZ3QrGwI4Q43LU3/FZicm+Mow3s5h82lIH9cjxst/u+a8h4pNuSQ\nBdIAMbcffUkhrpB5iGy6SAYrC9vtk47u93zzIncK+J3M3ogYPPTOGZ5+YZVJ\nmF/3/UF1d5Ww9iiKULw+uv7iTa+IzuyvjPM/AoqcAg7DKjnKbAhpSVhkO9Hu\nf74erAtXXrD0u8r4PxSKBrLlrpJvWkJfSQ2buri4cQixuQdPreVVgUJAHkH6\nVvvMmcCD2cFGyoRrGoDQ6sghlqkKUcvW6oo3RNeHmmXWASwgwLcvYq1f2huN\nP8x0\r\n=9MBn\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"418068ad8f3afe545d1f43684791d53e99d90951","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.14+418068ad","@apollosproject/server-core":"^2.0.0-alpha.14+418068ad"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.14+418068ad","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.14+418068ad"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.14_1607720098281_0.05910183661712343","host":"s3://npm-registry-packages"}},"2.0.0-alpha.15":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.15","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.15","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0aaa0fba7bb68f0ec015959742fadba2bbf35970","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.15.tgz","fileCount":158,"integrity":"sha512-XOg6wAkjAeYgrIU7EcmzH/SPt1VgP2BDG2cH+YZBoq86ANXJjF7EV/nuCGwjey+24EHb0PymPxxTB/YoLO7Tvw==","signatures":[{"sig":"MEYCIQCZpD8xDxDI4o3a0DQ7XS00+2P2X2QJdZqf9OffKhZfhwIhAKdIN/qqEmXlYVcF7gzERd9cmHm5KXPbCKOGyORzX91V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":983206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf15jfCRA9TVsSAnZWagAA4DAQAIzabhhOKucUBO6PngWP\nilfkOFOOZlJtl/T2rUH5itk8SsgT7huUEWZwKotFYchYA7tG01aT7ts7YkPW\nVj5oPf4jmw0lBmazZjyd1zd5TlvDYfFt0YQdjjzjLGTH9+npgCLgRm7lhk0L\nw21M8fVCXGNxYZjeyrQCK9dB5cuL+Q5qWEuKSFogVB8GGYb/DBnLc/uaGBiz\nzt57zN1i0LOmnDVgft9tqW+a4FpE7wqvncIro4VevsPO/hcXj0PEk0Sr904Y\nti7yH4+LZMqSVeIm9lV1YFvy0qk2zqMqU/Nw2r0jud7/CCBLrpwZKlob7RME\nHubZwYet3baxTsDR2yokqgCW8wszuc/gTCiLylkzAU8Kw3krFOWkgwJXJdJt\nSOyZzhG27PecVOBQsTJa1cFfqhokhco4x1Kk1DO2HWOmbO68RCksarYNqhon\nUgNymez6+qhrcwSpsNy2kc6MqEVIhEKo/slydi8fA5sqhcseQEY7G0aGV0dI\nRZmjqA/BjG4sPPTGN/lI37n5LFWvkX/VAN5RTEOMF8naqJkvaV+LWD7F2YKh\nHMjFCRij5ChP6LZzwrRYY3PKCEL36ewZ5nNaUAMXkSq3Egs4SFQKAlZbPwLZ\nV5LOkcg36MPnHXLokOOHXg8d3mt288q/II3boZEMXiJuqoMcWjv7hA55slQ7\n+2bz\r\n=ecAa\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"9ef8d244cce77f8e843d7022ea39cfb279df66ab","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^2.0.0-alpha.15+9ef8d244","@apollosproject/server-core":"^2.0.0-alpha.15+9ef8d244"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.15+9ef8d244","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.15+9ef8d244"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.15_1607964894912_0.17092645683619567","host":"s3://npm-registry-packages"}},"1.7.1-alpha.6":{"name":"@apollosproject/data-connector-rock","version":"1.7.1-alpha.6","_id":"@apollosproject/data-connector-rock@1.7.1-alpha.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b175f337807fad971971cea9cba8c03f8d4bbe4f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.1-alpha.6.tgz","fileCount":158,"integrity":"sha512-WtMRZ9r9Vrd1ZMeUruFx9yiRPMd9oY44qiCPGnzuJeDkHbwtTMdpA3IHhkwSEvCa8C6bJKXJN9ExjjYI4+SlAA==","signatures":[{"sig":"MEUCIB9DFD1E+/ebrx/EfdPEab4PmzmZbr8P84jJ+ZCwMrIXAiEA/+AkL2012AwI6e/TMi9ddUmIS7suiQKfTMJNp12MgfY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":974633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1+DbCRA9TVsSAnZWagAA+E4P/iM4w56xhqxuMIugQkE9\nE4cXgUvVqNEPp116OvujoNqtVAdULrTmvWDMxascuPW9r+uCvwvwimS7gnmB\nTu5VKB7oqvI0Y0rttfHBcsx7k5FXdtvO43A5dn1PR8kJGq08tCzzjigy7Lqc\nN1UbnlaLodjMwV2wj95SOIfHOHPNgE4TdYyGpcsr/s90ZMADZ3YuqiOGCf8I\nYv/q0SpLvbrb1QR9tKZKgkQ5BTuGPBlpjYwOmM2IU4Fp8zmXdTWeCcWG5ogZ\nDr6whLhcWk45/m1I5NNaEhdE6sYFimpomDaQnQFP/MV9Y0MPLeYXMG0uFCmz\nsZxaodKi4pKySsLN69j8VNb+ucGFVUqglmH++Tewx9KfsbPC6peVUwBctDY0\nOUvxevp6DA3FbUuxOKv1lJVXyREJ3Sxl/GvfOEVSXifZT3ziVnCc8oELrl8V\nFVvDhy8vb7k8pkQBfRFZkX9EoN1CiRxWv6W1/LLJ2TDLSzwIMpR/q5Cl6qEF\navC32YL/RWizgAeTGZLvhANV5sX7e4x2yeA/llvcWS9blP008WXGrT5eXfuo\nN4nhnZLH1CMwcjAhQa3N23Jx6+0CZeagENNfPBGFeffV2EIOTNHehMX3NZjH\nkJeZaH+X+UcURSeomnU9zp/InB9ovrM8zhFkLPDet2iPLSFxMQSV54WKquDm\n9A7v\r\n=0yaR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"d223513c51b61cf039e0d8def6a45f1fdd4d8687","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.1-alpha.6+d223513c","@apollosproject/server-core":"^1.7.1-alpha.6+d223513c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0","@apollosproject/apollo-server-env-mock":"^1.7.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.1-alpha.6_1607983323271_0.404829135318046","host":"s3://npm-registry-packages"}},"1.7.1-alpha.8":{"name":"@apollosproject/data-connector-rock","version":"1.7.1-alpha.8","_id":"@apollosproject/data-connector-rock@1.7.1-alpha.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"29925d9416811407303b740bd4a2ddb8fdadbb18","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.1-alpha.8.tgz","fileCount":158,"integrity":"sha512-pGqxS2j+loDcJq2admi1wAtt4Ur+ctaByRabk4GocGgNk/fRffUb+vPy6mL/rvkaXx3+g6ynIL6FPKcZisMtJw==","signatures":[{"sig":"MEUCIQDD7S4N0zesiwCJMtDfcbKaeF/YB8dGdeo8cnX+Q5KtWgIgVKP9yiug2cXhlCqleF1uK0q3/S5U2ssc8DAjEn2o+YI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":979038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2MPJCRA9TVsSAnZWagAApo0P/3bbDhxWb5qJ8BUxTDv5\novCGwWe394AT964/d7s92lBW8gxKdI7vx0+jSA47IafUo4ZE6TY4gzTGQ49y\nwmDs5cvlmBmV88/0zJtJL8xPmooBFCacK93/votFsxUj+aZOzXjaLaUpyt0E\nk+vwaXt6m0pMvR9Kh9tnnlTJQWExQ4RWu5Y2ff/BA7aCCNUCbP/rawlZmvGe\nLLTnPxvdv/uuCpZcPMEN2TL7dvnxlken69m8RBOH4AeM8Cq4yL3cOiRoA6Nj\nN/eA9gbTl6lFvWGarxb1wRmRN0R3AFoWDMD6g9rQjqM9Dk7BXQfNPRQJmURH\nf9UWctaPA2Eajsu8o4pXFvtLzUwbXwc+hbT55bUpUfJvOP14Z6xctZdEnD0t\nnUJRd+b6QF3+ju28WIlBWKLzGDxL5Wf5Y1dId225jlYsAomRbOzmjaHXJFkO\nsQZNKtvemLuSlSAIc6TgHlptE1MNtl+bQePmkR9wstta4H6WBK+MLlqgNdVe\nypAqZEU7t2j2L+um+Q3j9cpgjEUWQ7r8Mhmhf0AE3WK80oDywa0OPlKl+WBA\nrl0DIwjWabHTUEPNjCEHr20FQjUK01MicGFbLkWBy3+V1oNUN1gYX2sgp2fm\nu6HsOFjYyp/KJB7ei1b4X3ETuyU+677VbT7rHTKebqBiH3GVrYM0kINn6960\nQSWQ\r\n=BDrj\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"7d024b51038f67b13314502154ab52a79c0acf2a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/data-schema":"^1.7.0","@apollosproject/server-core":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0","@apollosproject/apollo-server-env-mock":"^1.7.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.1-alpha.8_1608041416574_0.26437460064545837","host":"s3://npm-registry-packages"}},"1.7.1-alpha.10":{"name":"@apollosproject/data-connector-rock","version":"1.7.1-alpha.10","_id":"@apollosproject/data-connector-rock@1.7.1-alpha.10","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"cffeb03a69061d25fd4010d19e196266453381a8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.7.1-alpha.10.tgz","fileCount":158,"integrity":"sha512-UhZe1yun6QzxcI6Fd5eB7USoKOxl7MBDw4RuMcNCpisgl9v4ALXydO/o/CDxZFfGQnzqDOJghgAY9d4nFTcrvg==","signatures":[{"sig":"MEUCIBcwW6//lUfy4fmtlF8uge/hVrN7lMZBX2OUHQBLn7aXAiEA4vrBu3FYc57fDsysmEvyOFBCuM9VI3Et8kM5Ufgtal4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":979034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf238wCRA9TVsSAnZWagAAhv0P/2wl+CjvsVGV8LLjEBfC\n6tcTaFXRE5S1IjrRC7IH2vUiH0S6Vp2ZgcYGk/adTijGD9RZm9X+DnNjo/+4\n4iZOLdPwsGWAUK5qwPtUmyd15gdF83HAjyO6X0YqLW5VX2kg0Nnw0k16zjxJ\nu08a3SG5tojXuMVt16vGDwmlQSomomfE8gPYYhrRh4oXFZzR18kPxH4Qna42\nn+7BRVDh1OdzZbkLssRNGAqOrgqDnLj6MNFWoeQHmi0xzygn4E9uaIetq0hY\nHHtFxhZGYwVItLUteDgwvx2rAk6qKzmusUdRltuihx2UbJ7zei6WlKVVITZv\nWzrLRD42MBYlLTCSX9npj8nwZxS5rsWZx4aDJeOjpe+k4jRJMGC9wy+O37G3\nbCi1UMU5WbXjUAEQIBUr4jUhmT5h3lgI0qum/Cn/NIxIiHm0yxP9H35rNjDO\nqAusiQWgg1dYbLOk1NgGq1xpFIH8DWqrpbKS1u5ePZXuMQoCxAU35UYWcbel\nig6CRU8eZgJHnRx4iuk/rD1YaCANMU4WTl/LxdG52lkDYbP+WOAElSHzFl6N\nKgoF05wGid3Oh2saniGxjnuOeX+4EUxUsNSQUnGjpSxdBiSWuOOoO3ViTW2B\nZkg5B9aD9dFCJedpCROIWPxu/DQAw/0jXIOGaniU7kxXMiTupZkOEcDHr3Y2\nDm5J\r\n=RDdF\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"bcbb1241590fe63538a450156a222a3dd1f24a67","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^1.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.7.0","@apollosproject/apollo-server-env-mock":"^1.7.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.7.1-alpha.10_1608220463706_0.20145456393789263","host":"s3://npm-registry-packages"}},"1.8.0-beta.0":{"name":"@apollosproject/data-connector-rock","version":"1.8.0-beta.0","_id":"@apollosproject/data-connector-rock@1.8.0-beta.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2b2818dcb777d3148fb26c4d32f6bce9976dda87","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.8.0-beta.0.tgz","fileCount":158,"integrity":"sha512-AFXF/fvWIN3y6t8vhJT4akJ2YdQu05+rBton1RCdA71UXdUnyqiG76EEA/E0gGgM+sogGS3/RfO65f5ISRqdZw==","signatures":[{"sig":"MEYCIQCpqquZvnNdT8O8vbtPkzpFdrR/LeH/sDZgPEZFu+odZgIhAMQkRzGCqjfY1QyysizMuIcBn38vvkWLqa1aUeRHwHLS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":979902,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9e/ACRA9TVsSAnZWagAAoKIP/0otiYzP/O9m2NWr1+iI\ng0bdJQ4ofJ9To3WGLNTUWHEH8qLsroPElccsa6HukPAKxFc0brghXUtwLfXH\nbssVB6ZWskc29dohT3Hmlhnvgi2wkochLC3NBeXpD6eki17Ro9uUu2D2H4xa\noIYJ2UweTz6o+QUO7JSiHXpRSc+IR+0CZ5GSfUwvEa9dq5abCbLG0VIbXHgk\ngTX4AKcV1EwCjKRhxLJodLyujxHDpzR1JLetJ4JaApMCJYyu4YPlIxtbtiSk\nAPrOKhp2e6CbAnkkZgT0y+jE6oX0uhx9FHVY8MsUWU7AbONMpJLYBOWj3kfw\n4NFBjeSbaU9GMQwk8CT95OoYMoofc//sFao3GAebg6LY0NguX7xaoW2MgptW\nk0l164LSat/+Jia9eak+boq3Ag91Fhs1fF+sniiDouwkpLDWoCqaTnofjsKA\n3HSux3NNCyU0DU735jdPllJTWmP3yvqHS0qU49sFtRKV9Z4LIgi5Y7Oy77Gu\nkUA2DX4/1eu3WVIPyYPAvjhOrBVL1sz7n2k547BMRgImqxacjBDGGzWWR4hn\nEDTiY+ql0KcpHsg+VsQPjJOJyUGQio0A+z1SPEN+wUI/isn387l1kf3kAi9t\nRr2Ryskl1BlSMJ3RSLuq+i+/fG0KNdX9JKSvUk8AID2Yr+yx7qCVCzNpw92U\nremZ\r\n=8fCX\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"d858a9ee7f173dbdf9e52da3dd2df1d591ab837c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^1.8.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.8.0-beta.0","@apollosproject/apollo-server-env-mock":"^1.8.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.8.0-beta.0_1609953216374_0.9761523645631551","host":"s3://npm-registry-packages"}},"2.0.0-alpha.17":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.17","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.17","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e43ad2919ac57e2b15411abc74a32e7a9feb0a1e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.17.tgz","fileCount":158,"integrity":"sha512-fk6hxlcQy8JLfOFQKEpbkIBFDotCzQbiWQL7DWCQ62rVEXAR1oEBIrBeNLCG9nMMQZigf8A326PrUf1+T6aUBQ==","signatures":[{"sig":"MEYCIQCFJvVVatg9kp/fD9h29lkYiKakeDSN+MN0em6yeG6MQwIhAL4/oi46ztVli6EvSx0MlxbyNj14ngSX2Wkn6dPc17Th","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9xwdCRA9TVsSAnZWagAAUZ8P/28G0uZ60LEsMDluwu7Y\ncYUFMAiK4rA6rR3yFh6e7MCd3HzApkV3SBuqilttd42Tn+EX1lNYJKy0tNzg\nLrpNgZwIbzm5C0lAdIVIRFI4Hotz5w/28yTHlrkX+6Kbt2w8dsIsQx6MbSak\nl1CTwAI1a9pVzhFA4MYSmskBOiaitX7P/LIPrP5AYc3JunFcXm+5SZQij/iF\nTGVql8Ygn21na8c7/7SvjOeUbjrAiKseWVsPpq0Q1lgp84yFaYH84vSzimM+\n+tSxeczXMWcesoa8wMQTiH+pu4u2ISCtp3cJt4DN3yni2msBY/YasKesZe4h\nL4sdkI+7vfdECDImCG3ysLd0fm2I67k/Wk55yrderATViPH6lwZIY1367j/s\nfl709LRnYUBzenOqfEwi4JFHrAJp/wcroS5f+eZkhlt4OqXdjcFxh/TZDeRf\nS1mfuZS9NdvBreuYO5VB130/UCN1OdEFIs75pz2x9xo5b9bqPedvK9/NCHah\nQacFgtuSpDKg9LzoCbefEkHvvQ+PweOzzRi8kHCfzAjFVhLAooxwx+A48lar\nzF1QADAJ8yj2WJ/kXG/Sy+bnQLNm/EA0ptF2TQW2/mwOYNT2GO+4F3gFc8zr\nPWSumUBGhAkyODolXaiZpFRyKytx9E66SfHmmg3029mcQb/r5bTyO9tXYWAr\nkGWj\r\n=kbHl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"2a239018b9234912e21aa75ba2f92570c2da9074","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0-alpha.17+2a239018"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.17+2a239018","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.17+2a239018"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.17_1610030108564_0.33118731760227305","host":"s3://npm-registry-packages"}},"2.0.0-beta.0":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-beta.0","_id":"@apollosproject/data-connector-rock@2.0.0-beta.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3c39024e53a30e95b3fcb1d22145c44fa5850a29","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-beta.0.tgz","fileCount":158,"integrity":"sha512-chjKNz9R/uyeXzlMjlf3//udUUpQeUAuIXp8YissRY8xJgRE7X/fCYwEVXetA5sS2iK/HWM7A419HuLdZ1NJ9Q==","signatures":[{"sig":"MEQCIHzEQKZY+DsR9Jb+XAhlFVcM9Nza+SdmxFGIM32nDeU5AiBjWGpDgQ4Fu/HUELw28rqgsp++zEveKutcqB/ymbiyRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9zoPCRA9TVsSAnZWagAAok8QAKMR9P4Ua5bZtzIEZSgD\n/PRzdJ6ZDsKZhu2Ztpr62VPN61IovQIcoa1kYxI9IYW4u3T2U1d8/hGYibNm\nt2pzUXYvLgIWUltv7Pep4Nq6Y8S2z/Wv83Me+V8cDyxvBgyjTMGj8b8Doop1\nYlJswHgkNJ7/+2GGfdmHwO6TWSoGrErjyCUTmyy7HhVMjcCxYYvyt8/5+Ayt\nr3rpN5aYe3N/cLV3KpnJvmpsG9m6q1/CBsAsQJwV8VtK56bgDwuce5cp99NQ\nh8+gOUK1RJFhc1Fdr7o2LgyyU+tj391BaZMnoTEflXY9qrmWhi8zRdvDEwKh\nr8RRoBwtPTsi9XdxdXJr8bihhen1HgkGR7LYlnMK1EfzsX8aEY+phhloLGOH\nENkIwJKbWegbbENc4+0/hJIC4Wod+cM5DD0NSsYY35ktw+Kniu0ypXQRWPxF\n5OeXLBR/IVjo9iBs2q1/tNgr66Q9BlySHC+Q35m32Colmai4Lu4i2FuTJ+HJ\n4inJ0KZ6uf+DjZBdUWQdCgP0AniAAty89tqyNIfjRAyJgBxyKAi743l1QldJ\ngKV+orNO8WXbkehtm6DSTTDPvy8WUagLX7i59L5c7+XN53K/jXaD9DAxCWDv\nSTsz5oI+CsNhg53ayyOc6X3nN8N3ziX/59V/faCeLS1ikV2hnsuDv0ahj5dR\ndAGC\r\n=xR7k\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"935a4efb2aeeb3db6f400c8fdbd9ddb45a31364b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-beta.0","@apollosproject/apollo-server-env-mock":"^2.0.0-beta.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-beta.0_1610037774897_0.5477347957376635","host":"s3://npm-registry-packages"}},"2.0.0-alpha.0":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.0","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9b487e4715e69a37671517706533d595a570b6ec","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.0.tgz","fileCount":158,"integrity":"sha512-C6a1nCMG+wVpBEqakS8ou/ny2JIoOtVqhZDXYkKV/Lj6fYoWsXRoadeurHxgzE5PlgXXP1Ut16jQW+MsCAjAcQ==","signatures":[{"sig":"MEYCIQDrcsg6McSSOGUbLW9FWAN9U+wEvcgZ9ooyBn0FHSA5/AIhAO6HHx7sxkqNmHGAqRpdvSBj4TA61pHlGiNhP/0IH/QT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":988448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9zraCRA9TVsSAnZWagAAU8kP/Rk/Y2XxGLeKUDobyBig\nwn1k+whQBxClxnBrOg9LoNt3NX6oO+2cfh02FLtwXGw58nhUI9qgtfIwf+gA\n5a8PNbOifq6LNmg4R9keEBZDGzVmuPnapBo7/0Fmy222Zr+O8klc8MNj/Dqz\nj566IRPRSJN7GuOZqjZU67LrzCjB8k0JnauZ7sdPojhKGv5x24wvbujkOSnI\naNcLHk5yEzHI2P4w7VHbJ4lF10svvwkx6amEjPZ91UlMf0py9PEeTLjBemcN\nIKlNBNu+9D2NIV/0NIQNK+9OOh0+CToCmSvBDMHfcZp1HF5uFw1a8fQsshtW\n/vupVv5i9HhyPgdYlsViBYwLPdFRE99uEHcBzeyNGroWdo+tJP3kY3IokPqL\n/fMlTSMBGjz/BIXhijEZZXVY746vKBlP0z8FUUsXT1uQcULLugQiZHX7vHjt\nLUDAC/DYYc//OJyWkXZJmGhySNjdPvuZK8Ca2/8VKDegVzoXjbfMtV/VUPWE\njgvWmruOUeGb3DUuk9isJYDh7KGljCyaiDjbI4306528KmtnOs/NirXau7/K\nPww7IizKO/Wj3RXPHqeDDDnqo+ee57ohxhL7y5pKEXJUxf9DiT0YfXUy++tL\nt7G1lN8mCnu+v/g5JpSEz93Nz5o3fJnUNtdDBdNhlCtmojPuKEPWsjZKNrii\nHk1w\r\n=tsEi\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"935a4efb2aeeb3db6f400c8fdbd9ddb45a31364b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0-alpha.0+935a4efb"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.0+935a4efb","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.0+935a4efb"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.0_1610037977857_0.7427994438768262","host":"s3://npm-registry-packages"}},"2.0.0-alpha.1":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-alpha.1","_id":"@apollosproject/data-connector-rock@2.0.0-alpha.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b33518489867320a3bd59af672593870506a9380","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-alpha.1.tgz","fileCount":158,"integrity":"sha512-U5sEoUuNbjcYjG6UR7eh+U99PG57uBmpn8XnAgt/yfN2JRZIOLDCcxkqG75YRDofbzUywiBhRz6QVlMnDlbrWg==","signatures":[{"sig":"MEQCIDOvFTj7ooBH6v2T8zZmL1Ppara9DeNb5c85EsZ2/OdtAiAXe+8RO+0m4eQ1vYkSUhfA77lAom8HILccXi8WUoKq9A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":990469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCGNECRA9TVsSAnZWagAA3T4P/3cTk3eNGqK0qiIiWidD\n2mdILJH4RcgBvXUcS2RI78zr+jfvJkrRZGqwVTyguraPdnbSeOnMkj5lUXHL\n8OlLGJpkhEWIJ7mvzO5jKAYvWPc8L1sJlgvH3vIAfVruNRALHGnO6rsamOqh\njUvG5IRHGObAQCkrLDPcitw9FHVLBS2FPnzddpilAI5pNWzAq0LjanXmweDv\nTwIpBEy4+trPc2Tg6Q9Et0VUuq79hho1TPNWgt/F+uKgBDndqODy4CZuYNHk\nNCnvqNF8n2qHaJk93OcXQmf3X/IyY408f33Ftrb+GFeZMmH5PLfeVTKw3YBX\nuAPHAPukG0Od9BeN2ur4wNCLBJ7MU1SurJocjD9j+ebI9XP3uAHR/vsbBx3P\nt9mH7XNoWOXIOdE2ZQDx6+ZtdBfYVubZzcLDSyVG3WBd+fT4i7D5uyqvGmIf\nWbb6I006rl5lefLVb+PP8mGHqlYGzBYknfO0+arz7x3MDmOj1CLw81+/4kY7\nRcXo0Rsi8MzM8wIUgxajto6655io/2BPk14vir0/TnfCDCTMEd0vvSTJDkmP\nzucYAIGzzSUn5Ff0fKrEQBTZKGm90mZ5T8qmDopt9/rAGRJXuDw+lO1FUVpa\nZFYvdtkrZI25ghCYT8QDG0lj01LG5PsdC5OqbYgXO4yuPfBQ7O8eNws6N2vc\nLEm/\r\n=Y8vU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"9e12b69d167f12fa42df2937cf636191b9653cb4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0-alpha.1+9e12b69d"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-alpha.1+9e12b69d","@apollosproject/apollo-server-env-mock":"^2.0.0-alpha.1+9e12b69d"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-alpha.1_1611162436176_0.17448940496287824","host":"s3://npm-registry-packages"}},"2.0.0-beta.1":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-beta.1","_id":"@apollosproject/data-connector-rock@2.0.0-beta.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"fcb8065218a8280cbe6c616f46be19933449fa35","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-beta.1.tgz","fileCount":158,"integrity":"sha512-0HnQ510eG3fff8R9x7QGsCumdfVbA1jW0PK90wQWGAfC3WM94NZlYrtuDGp+JYbFqN39LZYGA1Ua33VIfd+xxw==","signatures":[{"sig":"MEQCIBWrUtTvCShiNTK2xyjBvx2Fw9DLhCoc0bvYBqT+fI1MAiAKAK7GFEDHq19zcY5Md55Qst2RVDPIEksi38eKkdOzOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":994195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC0MNCRA9TVsSAnZWagAAyMwQAKHxh1xsvIdViIVmqCri\nEHE/6CUYuLQes7qBhjUPKVuvSj6vn26mCJvQ2RFK3OLnpScTZDysYvmmdR+K\nWtuA2rFfIIMDD+sXHfOBAbIWRodupNwpp5xe7wxL8Avt9z/OvFX7ppbXOqI9\ngFwxA5UJaSaUpLKi6dL2bP6+8qAVL6T4rcW3DKfVFcgVkil+C3IqDpSk73bV\nyGezkBbsTY9+qmVUYmg3rvtXfHDYTEYxsHZIS+41M1XT39YfgRCAQN3mmz2D\nlAi8AK7v7F9HOHEMoeSS/wmilNE7Lrg4w2B8qcdCvYPee/6BHwsu5ikdVhgp\n9DjUO69/6W2OVpTfGhWvvANSSJ2D8MnH5H9okhqh9ywpCoF5sV2FXrkE/O9g\n/pxRcZRMbD7tovZiNEr8ucqWvvs643xFpA5vZlY9wyk0pOwCZaflj5hgg0Li\ngdSSwWS91d3D0ZpXK1AHTatRNve73/4flAZSRV+FSI7ZozRrsxD2S50iQnmT\nFBn4hiAo5bMXXhWxsxuzaQycBQVfg78TpFO0jpr6zXqJwlSO3RYGgbK8XRvg\nWL20fvsu6gmabvdCwrq1LhCKVXjdGBm10BEEvO0ioSHreqlY3Qi+TreVXYR+\nrTe82ZPyWKsCc17t1cSEzFzYJGmX7ThQ5prjquWzpymPfWn1lxmeyDu7LFdZ\nd2uc\r\n=kzYs\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"9c74a4d9e0a9bb64e1099b71d27968c95decaaa6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-beta.1","@apollosproject/apollo-server-env-mock":"^2.0.0-beta.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-beta.1_1611350796583_0.16009893591623503","host":"s3://npm-registry-packages"}},"2.0.0-beta.2":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-beta.2","_id":"@apollosproject/data-connector-rock@2.0.0-beta.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a4928179a3a1bc4512d8171027b84bbbea601f7f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-beta.2.tgz","fileCount":158,"integrity":"sha512-UCSpW581bDUsv5tsMBdlSYbKABQkdFk2eVbSgzHoCOsPmvghdidYIS2LMIa2rC5ZBdw13ZOUcBvM+wvcbe0A9A==","signatures":[{"sig":"MEUCIDyMRMOTt4tZbT6DefjhLs+Ylcg+bUA6SaeEFnGxDgPlAiEA8Bzn5llOdPDq4AjSJAyuEjVwuSFQU01qs4dMT4j+oF4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1004572,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEbe3CRA9TVsSAnZWagAADjAP/1LpsPLsQcdZMiW8C8B0\neWP1B3Y5AGLr+31AE4vBG61EatdGINvU0Z289VUtZcj1b4K5g7DiGfHio/bV\nRdjiD7D/HmkkG180aH22UJwXI4BflX7JAE0pRD/JVEJ1pV8/9SmLe6W42BPy\n2vDfwKKbBH9NgMac9E7jlKouqIAxH5c68f/p9A/uATbzusXF0wy8f2fK8RI7\napABFsciC0RrsDnPnfRe1Qj17o2aURxI5fxwsvUA3Pp6XFOFG+aiUoCsps5x\nD+yaXaDW3u+OSDC8vGspRtsXno/CLmIqlBNm2sOd33CX9Cpaj8s3kUhoZc8E\n5lvQGR0kDGeSS4tTohDA6Hg/sr829MYzhTrr/NCMX3LKyra68/pwGTtO7jlt\nFYa6jtgiOJYMamfTYTHiPjMGrtrv+phZwer9lNEPbxrd31m4gjnXM78qEVP+\nFSdHZeZ9mC2P06aitTVEeZ+j10IaROxuvhJTLud199hzCPfsSNQCy3fZ/I2Z\ndXucXaz/K5GcJZhMRuGU2t3fMYozVQssyJOBCt99G0XJGOvKWCp2RhQm0wNw\nVBgqZUpV/AeTmlarzbWJIqHhjyihPYZ2dueatLmcuQNssccgC322xr6ZBvOI\nkmP2r5eIsXcf0nDBMjxLHPJMSMld8kgtqez7Ixqo4j7Pd0C14KNAVyC/pudX\nB8kC\r\n=QxbK\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"a2f8f4e9b187b2884c0ee51e78c263ba053ee7d5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0-beta.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-beta.2","@apollosproject/apollo-server-env-mock":"^2.0.0-beta.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-beta.2_1611773872958_0.43984081862093927","host":"s3://npm-registry-packages"}},"2.0.0-2.0.0-alpha.16.0":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-2.0.0-alpha.16.0","_id":"@apollosproject/data-connector-rock@2.0.0-2.0.0-alpha.16.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d42b7b9ad8194f8dd037adf4a08410f4df86eddc","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-2.0.0-alpha.16.0.tgz","fileCount":158,"integrity":"sha512-EcFtqX+/byApkpKPIL1JYgyRMp6bRMvU3CDWAO5Sf5nj/fD89DeeFI4x14NRapbfzBEPf7XS1fBmQ4Q3jKh9Sw==","signatures":[{"sig":"MEYCIQCI7ye2v/ZHtAYXbsERfwRkE1ha8EwGc+3cJ2QLnUkhSAIhAMr5Ay0FeB5xqcnMso8gG+eYefIhOI00h03IJCgC59nY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1004612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEc7yCRA9TVsSAnZWagAAMtIP/1tGGQpSzblkWpCThzMv\n0y0PhBqKL1QSLZF/8RylPJ0SQ4VgYctlyErP52sNYcbYPIXlbfB+5CHoSRVJ\nF6/ax+Rvx9jZWqTjqw7Y59IAKB0YEC0LinBDn3KNfrbai+wgfchuNp8oYwYt\nHV7qQ/iPF/kxDQXn4AYIMCeLfzmQaygDm2ohLe4d3IGQ/fAULke4SPItmoJs\n2+smYA11rENlsfYIhmiu3OB4pu4/IXeu2N7WCBjgqYs9RQJxlwvveZZIfq4T\ndvrjP48lhct8V3HR4Csfpe/CmXrmfFxXAK9k/wCfyF3UoflrfSaWlxUsT6bb\nfk5tbKch3zPKVBueAZ0JGZeun30Ye37nAen8d+lF/CGtm4H+zCq3ARYYAUep\nAskNOlPO7b8maYiv9lqESM0YzgUMEpDdgbxJLdK6pi+iItztgym/jpEojmSj\nP99USeLYz9nM2ZbheKKL3+eq3StFyw47lfT8Egln/eSAuPx3MGgGy/M8CRYh\nZaI/BYEz8H9TrqUtUgHQbTFcsQneDvHkw2oFOp/XlIdSa2UF9LHiPCTOF6SA\no0afXg/l+V5+gdi2zkZQpTcUVsEwNy424K+XKBy2b2p11s+GhLAT8EwFp5um\nH7bxUvtSxsC6lgBu/8qEv2QDt2qFPMYe3tSU+JI+cX8xXK9J2OTi2fPQ+HF0\nj+Db\r\n=duPE\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"a49059ac4c22d9b315b6f94fc2a65775f7686603","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0-2.0.0-alpha.16.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-2.0.0-alpha.16.0","@apollosproject/apollo-server-env-mock":"^2.0.0-2.0.0-alpha.16.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-2.0.0-alpha.16.0_1611779826235_0.6769115524038578","host":"s3://npm-registry-packages"}},"1.8.0-alpha.8":{"name":"@apollosproject/data-connector-rock","version":"1.8.0-alpha.8","_id":"@apollosproject/data-connector-rock@1.8.0-alpha.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0c0e9773f6bd6d6f72cdab4c0e0d7ed33e52140d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.8.0-alpha.8.tgz","fileCount":158,"integrity":"sha512-JYVCRMeRH9rlKCQRqKTPqtNPpTcl8xVPUv6Jb2eMNuKj4QtSIl3KN5Q8UgmBPHm3dZc8CmLEi5YfEYGtn5MDOg==","signatures":[{"sig":"MEQCIHm1XzR2o6fWUvGIScWIg4bV6SC+EpnEjWLjxKoYjroPAiA/HNFLOYc+MGi7U0asyDMZ4CUF4rwMUG6bXlQH+JlMMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1010382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGrZWCRA9TVsSAnZWagAAx4gP/RDDD+jN0sJZ0iGRQyCW\nIPYGmnfArawqo+3PAAhLAm5GHZdqubv0ma1ubonAE57rEUvHjwbvlLGWRK1R\nY7Ux+sPh7nDsPNw3H48VDsGNInqKFsERdAxrOZUWz2UJqzQtKEqaAYWB/1HD\nLVA/DsfuOKY6vQ4NgDTJk6EgR8jiqdKyUJEQN2j9JvtSQGbt0JMWsL74OYzn\nYSdFhQgmX/yis43zD73i2DigxxeKj47Y764+f3dIst1aVq+e30YN0/GAQKVr\n6xfTYXalgd+wlcf6MlF/UyxzSf4DEQbNh9h48Y5YtDygNo/R8ATQyjRVMgH8\n8KIHvZQRN292n+xoWNVyDuYgxQJCuUNkiHdh9/s+yYEYgcT6ZjH7gjYh4M9i\nn6+PMprR2n4q4Nfr2wGI/fsn00aSFrj8jpK9z4JQYOHW5yZB6DG+gWYXh4gz\nOLOcVCnpqBDiDKPuxNfyu6XgxFNs62j33G49j1cMT+ZKlrJm2xSQGx3aFlz0\nhh6730Em7DyxcRzO1FTqrBrlbQmKaU3ZnOgN8bBWLaO2Qv6+Rn2ijlSH02bf\nzGhLKv/aeET+xwFmeFA6T31mnQNz0q8UTrJhLHe6zTTBU07aCSMw8cQ836zV\n8Rd7KATqsh1PG06qcbVc2vN7KDXeuA2fPXwT64xeKwdDJk4hOsoLtyyYY/zz\nJi57\r\n=k1ie\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"4204912c982d6b217191e37769efac2aabc8cb50","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^1.8.0-alpha.8+4204912c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.8.0-alpha.8+4204912c","@apollosproject/apollo-server-env-mock":"^1.8.0-alpha.8+4204912c"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.8.0-alpha.8_1612363349928_0.2954733899670605","host":"s3://npm-registry-packages"}},"2.0.0-beta.3":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-beta.3","_id":"@apollosproject/data-connector-rock@2.0.0-beta.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d77f586368a2bf4cfc0d8911d285748472e90678","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-beta.3.tgz","fileCount":158,"integrity":"sha512-GBPETkFGLQY1advEv9sYQwgt0wldOAq+a7eAva2ZfM9WygSjs5iMo1Ra3l/E2pOuefO/+auliGVFOKZEvgBl2A==","signatures":[{"sig":"MEYCIQDEgX2xaMi4KfX0KfrjC/26Z+HQLRxaWclZedMmq3UB0wIhAK9EQHC9IDHbMxospl8uScXZOtO2sfJdJDMJ6SaZX0X0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1010342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGreYCRA9TVsSAnZWagAA8ngP/3Jf7POnDJ1sTXQi8kAC\nNjf7BKJBrqQ1671oqArhNK7izF3mlHCthYWF6v7XWjHMio9Jk67G/1ZP/bRx\nRtv+fSYZdyCTSNqWPGSyJePTZ94j+HfFgUfyzL8Dwyk2E2VVsZlS7hcqWNO7\n7zMvczfu5tIFKUx9gH4k77mM3HzlGS3KXn/eYGS6z4FptOldLMWKhvvFpeNY\noae9kQ3oN+n1YvaGFmMg2Re22tK/hobyttKwNdU6C8zsIWTWKlcviTHj+B4W\nLqHUCBWqBWFcUocbmIScZ+ipb/JLv9keRfFlMZJxYK2oYKeZG+VJUaaTrzRC\nUFOptX8YNvkppK9oTYQhK5ywKHITaVYkVq1NTJYXPheS8F2AVFNfJxGKK1zo\n7J01McjdnGCEOht0yQ1gdooaUia/TsyaFPRiIUix0S9PUhJhAmOaOuhUwDnz\npaUax5Ixj+KzDmzAUNLVprcdEh+SzH15OCgr8Jf/BJidlCkti0yKCe9V00+n\nWwD5X7MkZ0g4lcsejFeUVvwNfER/Du5JUvtgyw5h0Cj4GDOf94JFa9J4YVX/\nSMRYdb72vrwnHFpF3+zP77QP4jR8QD47rTDvHzVSlWfK0eM7tHOVxMrGKe2Y\nilZaMADGoF1W8HpfdMocUL1eQ17ESdQdW4/Fu1SxbQ+/bZCd/LQzkLSCUUMw\nYqsH\r\n=Nzse\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"7b5122edf49fae4b2118d242b41e12e38d5d57c7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-beta.3","@apollosproject/apollo-server-env-mock":"^2.0.0-beta.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-beta.3_1612363671958_0.6277527759254218","host":"s3://npm-registry-packages"}},"2.0.0-beta.4":{"name":"@apollosproject/data-connector-rock","version":"2.0.0-beta.4","_id":"@apollosproject/data-connector-rock@2.0.0-beta.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c541badbcfeea26e587f9c2da15aa3a46cd5783b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0-beta.4.tgz","fileCount":158,"integrity":"sha512-LwxXakzs6b/r8b9zmy1VnVaGAcCSZBPH/RuetxKl5EYlZzRiEPTGcDfg9oSx4VHGkpXWOnQj86bmuHiCQVH27w==","signatures":[{"sig":"MEUCIEAcMLcce5nGV3XTL3le1s3qvBaDIddQmqkRhGSu9cg8AiEArG/+fS5Zx+lK51yfrreGxD0Ehv7GajPx694G9Ig8XTk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1010342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGst1CRA9TVsSAnZWagAA6K8P/3zJmODaRAS1CDpW2cd1\ntTHPW1cVrEKoDMlqptDLADj5aPrVJnJnFFaIBtJvB3lGiGUjdp+IG0CltoCB\nzhxf4tPWIKmAVDm6A4Uye8O19qVF3I2RVnpg6cRK4RGhngEWanslgfag/19m\nxasjesBsXK2wqv9iRZd7H/O2vtSVbJRXycOu99KXOKLP0cTDQsIAOgCh90pe\nI7dESDo5tOZ24lVzvRNNcHkFh0meWucyPGPmmtX7ZrQFN9pXTG/7Nd8Cyin/\nxZHZaSCbUhaBlJ9/wEFw8ARs5Yz4AB9wtjmQ2CWW0bAIl1PuMH9vUqqe9zA8\ngolgTu9atzu0KGj6vM3eFnOcF2WVQzbufDTLUQwXFDVA+QP6w+1e0zxSitOe\nDybwFGUBO3J0l58xi+KZrMBZLHXrVY+lQ99Jx/GCn2DXfZ/V4VOI4ELeO02G\nEZBh3IckJWkZBLWkGaBoj1SS77PHlCUvOorgTYn68ugwkqwT+epBDt7Np4hy\nwH1KKa/pvsUjiG3b92f67jy65tLJHWNccBo+f2Sz2al0f3xLQZBtR3SgCX3Q\n2g2IrIg77jUTiN7v1AuenPOFRp58eLdqKDJsGCfA4n80k9pSxg90FZQrtsxv\n9bRYKRUCJsQId62hKTzHAtr9GW2XEbnOMk6D0wp+ajXmqKIrKElk8bGfSRqN\nT+0V\r\n=SZqP\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"f3350f4b9e2498e7451199f5c146cf7e05c377af","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0-beta.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0-beta.4","@apollosproject/apollo-server-env-mock":"^2.0.0-beta.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0-beta.4_1612368757087_0.6997263358883534","host":"s3://npm-registry-packages"}},"1.8.0-alpha.11":{"name":"@apollosproject/data-connector-rock","version":"1.8.0-alpha.11","_id":"@apollosproject/data-connector-rock@1.8.0-alpha.11","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"729d39508eeaa880b53cfd9f7290f92b9f28b164","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.8.0-alpha.11.tgz","fileCount":158,"integrity":"sha512-8FoPVZgLsrQ8tbEsNKW0twNqvNdXwo0MQMLKX6r+LGccxuKCkBaqiXQ7s5AFBprOHW5/S28uckdReS8iaLF6GQ==","signatures":[{"sig":"MEQCIG5Zp+ViHDI7yh6r3Nil2T1gdPFW/mzMR2uorWyscHutAiBFSG1OX0qJZWOGOj/21g1l4Zn3+54tEmYfO0qcp+4Adw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1010386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGs+jCRA9TVsSAnZWagAAzeUQAIaEzsZOwmQpD3I7fz5j\nEyjnEdBNH1C9pd7uyp9lwSORoyDRSm1yHx0oVufeAE/Kg5a9RmVszjFtD+sZ\n1XR6bviD72qs3vVNRhfC5R1DGaGpz8Tobm/FSZM9i6H7LpwVmLTE0EJx5Ksi\nPog50JoAOCvguFKFJ9STqauM7X7IMNkuHF77GwC0SJ5qo2nfH/3D6obSvX25\np1ekaGNYJ3A0MKZmTgsIZq74IHuGi1QDMwOGjJ9NKC5PrJ4gUKmrXlbrcEPW\nUdCPPUoCvDZB9xn7nFYmkcP3E+eRx0Ch3ZmnyiVzWbGK2vcaj34ThdGuRmH8\nZsuVO/up8VfY23TzGUxUUVvRxpZAitnuAKd5HGbdQGFSXixoCM2xHbgxU3LM\ntBpDIF8k1OrC5Y3TaAJ1/tmSAAR6XAbeVFE3+X6rb4yHt8xsL97UmZ2diWDV\nxpa3u5Bsp74/kJPRvzHaDdSQD8Ws2rFXn/HHJwnFORiiD0b/VgB/lyVP3Tcc\njxyfgFzX2VAXipPasDOdlQv37BoPeOv5JgcCeQfBTcLGAwpbW0RDg6L73Bfr\nH8EfxU5FhwAbYE1TB5wbFNFAsEqskhn73GHUHQ6mlhPuol5HLA/4BxixHu3i\nLY8mdXwPTAb758ENdPKo57IrnDnWUcwH9zCWzwVz+BnGQcjSBCes/lBjTMbi\nmVB9\r\n=ydM3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"54fdcf6a0cb961577488bd8d67804ea05b00c137","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^1.8.0-alpha.11+54fdcf6a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.8.0-alpha.11+54fdcf6a","@apollosproject/apollo-server-env-mock":"^1.8.0-alpha.11+54fdcf6a"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.8.0-alpha.11_1612369827327_0.6252998240367453","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@apollosproject/data-connector-rock","version":"2.0.0","_id":"@apollosproject/data-connector-rock@2.0.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0f6f3dd096192e124086d4c7525271ca607d4e37","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.0.tgz","fileCount":158,"integrity":"sha512-dMcyzDfb81Rc9Dou+E++RxqF///SfMsvQ8Mz81VujvstcghjGSyydjHwmXiOSLNZCiWqcHpaWc8U/voaXf/OUw==","signatures":[{"sig":"MEUCIAfuI574ra0TPx0/uRSSX5hDCiHP86/iCIQSFgb7N2VsAiEAi0yEqEswtF4SMWgVGFKyj9dPysrlsybJj6DAM4Ng8us=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1010498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGwauCRA9TVsSAnZWagAAut8P/AoC9zKj2MnI/aUk6MRf\ngGZRO5CHjyqcMMkBt5MfHCO1QVeyD4vhdQeyw5dAEkMXGhL6EOb7kPmPS5Kx\n8jRX3nxtJ23q78KU/Mh5lAWawbnxhimjuDCEx8dqXMA6kRAk+UDldROwnNoN\naqk15kTiylM7Soqsymxkww9ozUXASa8h1S9kYogco+F9GpjISvwChqFZjwVc\nnHQ9TOVnofOcq4+KVNDBiP5WnLNTpjzTNGRYhC18JDHOFj3xGB9UD5XFkjdS\n6Qh+kWZfpkkEonvoCN5Z3/a4d0hAhqfMEg0FWeJM4PWJUTBvzLn+r/s7p4Yg\n2+bwjHBTjFVqZSpJQVo/LtCA7MXimkh8uxDoVT+0XQsLYn2e3oTcNORGpjIs\n5SSgSI23oUIkYJR3HZTwMjJWMq9UwWOk2ckGwqgVDQrQrSmtL5L0C1jJZAF+\n/LFeSqLt8ClwWJ8VTQjeZlkkfdixA7lIrQd2Dsg/kc35WLfyzx5kHPhUWyrX\nfyziXwllPUJj3qpkOyyvKmw0hDZLhoqVOTCnCw2iVN0hGqH+5qKCHRg0EG96\nedjQ7PWahJeTWVQwzLdXdfdmQvnYDnklZRPXq4hYIGKPkvxh8CNfTT1rFDVJ\nnC+8O1553Mb83HhcI105Lat2LqZfGt9gtW8l6kTbdK9IzBrYdKbWL8mBoU+f\nEfV7\r\n=FNqR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"b008b911f273ddd7798d8607b9136a6d9422ddc0","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.20.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0","@apollosproject/apollo-server-env-mock":"^2.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.0_1612383918577_0.6468990287717982","host":"s3://npm-registry-packages"}},"2.0.1-alpha.0":{"name":"@apollosproject/data-connector-rock","version":"2.0.1-alpha.0","_id":"@apollosproject/data-connector-rock@2.0.1-alpha.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9ebfa02dc5ade5b973d7d730463e08409a31bccf","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.1-alpha.0.tgz","fileCount":158,"integrity":"sha512-S4EniE8ubPvbU2AHIyN9GXbYRDz1QWPCTqAQCjFsNFYbvN/RKdIIQgWnKblVn5FHIE4DHAMfPyGmmBU62f6CyA==","signatures":[{"sig":"MEQCIG9RM4uD6HUsZN7ya5azHWJvpLZ1DLbSaUU5qh+AmKjiAiBwh346gsogPF5ZGuzsp/h+D6f2V0nRiPqq0Y+F4PKD8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1010991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGxC5CRA9TVsSAnZWagAAv38QAJH4pAoF0JfABzxYW9Cw\nhq5vzWvTieCq09GN3HCLZ+pOYkBFSpUT7/oHPEEekykwr5qUNxOpo49TEQvB\nNjkHR+Sgp4FUeFBqyasXgX7cJFoqSs9NJwnZWrum1xENv1bOKnxA00GwW3JV\nc/+LupUviIEufUiOqGxP8VTAp7P3dDuYwaoGh9alJSfbMAVTPYmmgl5jzA8i\nPSHoSR4H9yjlhyyEAUZs0Q0yF1QclgASTQQyY1VK1vAsXnbQ/XUm65EDIYLt\nqJ9ewGCXsNkhAoES5RDrdL0q1fGIqQ/FEXKubdJ+b8dPxPhekwaHFL3P7JMI\nWElgi11a1XSoBYmVluOSZ1ARUFaj+wQJeM/pmKhF0HmYox2zIRYbqjl+gZWh\nJRidjcg4NfRScS3U6Ng3gMBRctrqOhgka/TOS7YM5t/MfLGIT0Gxc5JzRc7u\nL5hLgAcqIvuNwU3sqSEATf+Xp8bDM0hikOw333RobQ7ao+ubp5aRHYBE77se\nOK1JW9rzB8FZA6NaYmmBZJNYt43m928x2bES4nw37RbQtUcZeu9LJuphum5M\nfsR6KjnJBVeAPBpTNU8yYNxDD5hcMP2alk2NIcUp/TtGe3WHPoJqPsZWMjh9\naKM6tZOq7b0LXSDe15PDicCz3IwY825Vc+3qYKPLBG1C3PUeJEzwKHYCpYYq\nYKy7\r\n=Qv9A\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"a3bf30df838fecac082565705c599329da1cd11e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0","@apollosproject/apollo-server-env-mock":"^2.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.1-alpha.0_1612386488751_0.604377913165091","host":"s3://npm-registry-packages"}},"2.0.1-canary.8":{"name":"@apollosproject/data-connector-rock","version":"2.0.1-canary.8","_id":"@apollosproject/data-connector-rock@2.0.1-canary.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"412f35b41e19376d3887dac7d71613ff100a57d6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.1-canary.8.tgz","fileCount":158,"integrity":"sha512-fN9LLqeI9k0ohYxcxap2GtoccVZC8h5Vhcd81Aux6lC8leIRhMZSok6xgmRbIGvGtzqc9q2Da6xS8i9RKKR2xg==","signatures":[{"sig":"MEUCIAGV9A1TxLaIuWmgpEzS0IZp6gQKRkC1j77Yvvz0AAmNAiEAgdNW+DCxOxr4eRbroPq7PjC3dyHOeiEyGjKFMNamQ8Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1011010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIudvCRA9TVsSAnZWagAAe1EP/2zAl4SdbTbGcePS/aHl\ndobHb38kNcy1TPKUupFdmY/lU6iJmqfK012Cq/yV533uvT6XffZ5V9Jp02CM\nW2wyGPJAwdFahcZNMznYAkHdHHpjVTjgcETYKn09MtjsDRIdf9QIZRfgR3fH\niKTElzfL1iC/6Y/++gfjdKBIUfrW0OSKHCc9NqqGL5PsWRDaCXJtxEbl0pr9\nk9r7kwLLbrTLF9YuJTkZlxnE7O+MpwPkKCLNjnDNihqeP1gjViDqpnWjClyI\nJNnz1MuXgW9GLID/0Hopt9C32HPK5nrE66VvTqOFUMNUWogIhBcjnwqMqZI0\nyDK+5KXOOAZXQS32yf9iJohDgjkfZFXb8u1RPIIhynRdQdWFGtBG4/tGOLWM\nlq5RNP5qixzvaIqtXWQNU87Duj0+PjBiouicvHV1MXvnlqRV1Oxbu14r+9Fo\nxSZYKHcU7fa9QZ3maexMNEtTDJR9wnyoafD8sS/2y6RcXXXnz2NkZcHFqwTW\nsnl2KR+GPDR02L3gjOr/2G85KCnAI9SsJkuuS6Hqx3YCwo/ckyWmBo9l4uh8\ni4okW9T9ru8NGQaUQqm+FMoTiJSbW5F8xaIyZy2E6hshbi/bIreP+Lodcvy6\neFzbLt+xyb8EIHkfwUv610if0iNqdczLZlnY9uSV1R3OMtVuAZUHAvCRi6uG\n1lyx\r\n=kvF3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"93488c5abda58e56099b786feecb999020f907e8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.1-canary.8+93488c5a"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0","@apollosproject/apollo-server-env-mock":"^2.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.1-canary.8_1612900206822_0.06535517929474777","host":"s3://npm-registry-packages"}},"2.0.1-canary.12":{"name":"@apollosproject/data-connector-rock","version":"2.0.1-canary.12","_id":"@apollosproject/data-connector-rock@2.0.1-canary.12","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"870619c08727f2e9e6f84718c99709667d5ba89a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.1-canary.12.tgz","fileCount":158,"integrity":"sha512-ed2vEzalRGyFSW7x4CyK3HLluY4/foXx2Jj4Zfz2FcXLfAGjuhPZxcaYANA8cVYIckxAeTFJoZnyb60ay4q8yg==","signatures":[{"sig":"MEYCIQDTxLgVRWIeoqLVeCKRZcjfeuzNpYgPh+L3CGCoad5kSgIhAP76bbCJkx7w51EAHBpAgdPxProXA/IZcdauBd2nNQfE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1011690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJS77CRA9TVsSAnZWagAAjDYP/1SSibw6Ws09xk+v/Uzu\nRJbNszWyQG92jvd8VX8jfOW7YRK3mK17DCM1mTXiRYnyWvr+RO0foRor/x7v\nA5DC3GNzJ9DGSrSbQCLB7Fl+CwuS5zw51RFTMX5/pM2HeQU2LrgKCnfBGll5\nY5obdvXRxVlYNj/vLG7A59ZD3AMyC6C+yUIUP8yuokHeWH7tpF/c4HJ3Lz56\nCBoB/09lF6W4cd37uS/1UeNllEuElLrOuO9n+3gSOOvBDuaFzTdSYMvwRKdm\n/fPXTy2Er/FY2dhd06JdwwZdRS/jbbcAt2fvbCRZj3Tvi8mqEXHYxFOK+/+c\nTuZkT+S5fkEKizLGvo0Gy/7jQjv/JanXsm+QifeMsjHmMNCHFtZ+g+LaDm6C\nYQYTBcqSQvQpAsd6hITWf3MeBCsf6cxEOfeEP/jpcjflGe8ATb3Uiy3zjHNx\n4wirAbP3zEyfnG0lelSyjYR2XHqnhZKK13L+1WZ8HMNZ3UItqZOfZ7yoajjm\nOQ01di5FFO0JMKXdAniP9CNO5jbUcyRfzxGngrXrUzzcpRsU4/mAzOpWnatB\nfSAHILGT/79E78gef3X2j152UmESLbadBcwpxmLam4l2dunqruhCla7XYuQf\nTR+rMSii1roIGbdb1CrkJ10zD0LkkabDx1cbMfBEiSdpX8myp4loR40vGa+h\n6LXw\r\n=iL4j\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"e7f2962cda71c0bd84297cf3408e33112935fb9f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.1-canary.12+e7f2962c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0","@apollosproject/apollo-server-env-mock":"^2.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.1-canary.12_1613049594748_0.32371961010124584","host":"s3://npm-registry-packages"}},"2.0.1-canary.15":{"name":"@apollosproject/data-connector-rock","version":"2.0.1-canary.15","_id":"@apollosproject/data-connector-rock@2.0.1-canary.15","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ebe5193f174a08afe09a6571b95e00828d3e1c13","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.1-canary.15.tgz","fileCount":158,"integrity":"sha512-tVsrNy0NP1jPeOQQDG+JjUCVlNyFxVGP8zt88pFqTvz3f9qxy7RTfjS0udyzecUvRleYXR7UR068On3b/0dCHA==","signatures":[{"sig":"MEUCIEgXjfVphJ6/ORAtsCq30TeF9xxjkeL7gOkU5rDgA8UKAiEAmkHnkzeVvLw3VDPESdVoGg8v1cGgBKDsu8tcXNB7oc8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1011690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJZ5hCRA9TVsSAnZWagAAgkoP/R8ZLXCaEjw3trBehLUB\nGqr86PI6MN7PZMG8w57J59nAMz5J017hGQf1k0b9Bu6+BAyVCF6VlgISiCS/\nWoB6p9H0RjSFi8VJH57I9BR1WF0yu5E29nu0u06gTwccQAC7B6IxieTxB5Gg\n7+b+hkLDilznGLMnnxyvVNe0czpeuebjSZ2hvi9HV/KP5ebCZdNRScAUnDxB\n0xN/FhpPM+zyYgMbOwCLO8Wgt7Wk651LCh0pPkyhDp55oyou59zoc9zLdZM3\nIknO6wbp8kAAEPfBcW+FXr2MT7Mf7lqYZlP5gPM4DDxvOIqoik4oSVpGkrXB\nkLfmbS+MZ2NOcChnnAfIj2hO8j/56Fzf1US1n+Vy8R/roE2YGXqFz44QbJkn\nz1Sx7tPNmcA5j9Mc4D68l0zNoW6QJBUDiaAuYOcsqx3ppQGIiX0w3NIWq7Ph\nHkEOTYjqgBrKZrOwbsz8zJRvB5xVBTQ6WvYMIjTHIE4clpc6cwqx+ene3evY\nv3duZOb6I2WxJWpPCQW72o4gDT05P4HS5n0nDWooNWfrsa4NDTPzp6UeWKdc\nD1huNbUfulJRWge8kPh2P1aCyJtMptt/iw5m89wi9fhrJSCIUfe9KPsH9oyT\nrROe3HQJUiR+V1Y5G7+WMYgjDY7OtIUOp/JkD1Phcr8pMquoDhTQuEEX5D/p\nEW/H\r\n=15sk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"da6539d839b2d2f78871dba674a66aa76a39627c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.1-canary.15+da6539d8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0","@apollosproject/apollo-server-env-mock":"^2.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.1-canary.15_1613078112965_0.5108580554366484","host":"s3://npm-registry-packages"}},"2.0.1-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.0.1-canary.0","_id":"@apollosproject/data-connector-rock@2.0.1-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b20c7a7414f81385603d33bb5dbca020ef3f7c25","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.1-canary.0.tgz","fileCount":158,"integrity":"sha512-6Y+Tb5P3NFwPOAghM2hUJkmhbo9HzB53agwkSJGjgg3kg7xe+wX30fPHFUxC9SsrS/T1oc4lS657xcWxD/fpOg==","signatures":[{"sig":"MEQCIHEFSxBDzfqf5s2OsGMjBY8Aioq1lAcM88C0is5TiVJZAiBYMhERaXb4xpTRTXkED144U1bDl3I26sv0uzef22KMTQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1011670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJr2sCRA9TVsSAnZWagAALAoP/jyw/F8vM431XiaNEdB3\n62/7kULCBqsIJGWA8wI41Br+K+Kwq7YNIgANthC78DPJY9YeSYV+AG/691Qw\n05FcXZnPk75v7zboWBdJHSJPQjbuZKR1WaAX1850/lw7zQvtR0AZckMPNJX5\nQxkKaatSpslx8Dj/SRUqdpDC5NkjrOEWd1i30m1poB/oQO9C7V5Nb+/vC5BZ\ngc+H8TZ0aXHzMSXrHuz7C3K3v5JRrQ9EN4tsgZE/n5za2AFyENFJk1waq8LE\nbvMOhZ+iM/NggloYRB5xC9gKLh4B/RJ5K8qdI+hLoZJaQRjB7mdOwDngH+qn\nHRi5ExATNKZWw7454v+RMpIXC4Cs9vXwb60Qc3+M9JUs+zEBo5uqezrxXIxu\nzxEse7dP6L70MNAnw9iOqGJs0QkTawyYI+w3DQHq7Arr12E9zMXN7kw3ItBr\nc9UnXaUN74Q6jx8Y5FcGtbHZyoPSLO2Vd9LDYLQo92K3JoetGNeigMTVlf3/\nKwvdefRv+CXT+75wpLkPcIA5oqhylj0agcI3r7JGhOcsKbIEm7mwMWgiHH5u\nH+KZO4SGpqD7nevoCVHqrhIV294BA8SQelJpzBiL6nxIx15QNXkpmPOycDPr\n8Q/kwIfFmGJqE4/cNXQP9EEQ58XpfEQRe6q4f2VKUeGZ4aaI+9qBSJF9V9GP\naMKg\r\n=wjbN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"7c2905a86f080cefaa219a771ec15d660aedf39f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.21.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.21.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.1-canary.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0","@apollosproject/apollo-server-env-mock":"^2.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.1-canary.0_1613151660281_0.17458589003248415","host":"s3://npm-registry-packages"}},"2.0.1-canary.4":{"name":"@apollosproject/data-connector-rock","version":"2.0.1-canary.4","_id":"@apollosproject/data-connector-rock@2.0.1-canary.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"cfb869747f73f42bc18026a37be54d1986552a3c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.1-canary.4.tgz","fileCount":158,"integrity":"sha512-iaZIQwDAjySQeocniLTwoREeVRWx7zsCWRx1wj9Dw+d+Gt1aL1IzIlVyUDGn/lcIK4tIfddWj2HeE4ho5Uipkw==","signatures":[{"sig":"MEUCIGqzpVPZjMuvxOSgMUyLvqCoTgRDuholb4sPRaepK4+GAiEA7oTZPpN9ewGrXIf8gfjMmefCVWu7CFWwMVVoCKq5fOQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1011113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKsMuCRA9TVsSAnZWagAAJJwP/R8fJJ8PFMXMTUfIBwCc\nkgjwm+RMgYpARDTdWn4xAIaM6lJ6jQA9sX8S0wS0YlRec160tTNco71sfA73\n7IygkbAxvDWfTUhMn0uEwph6yOav7aUPCXlpZH2EjEayLJ6GuN9sO4F6xL/W\nGpg6RKn6Jeo1+Fwprr7oxS/1OMGI7vWc+2u/B2aPX9xvZ+vm5laIWYhTmTPm\nyDcdaD82Q/RfOXVZkbuncXPdEJ6Kf8deAZNFPkV9n+n8Xhj7scSpVdl1eUg9\n7zJvtFcy7g0wf+0yUIKWpkwEJqeN6KP0TnimqrhXWpG9CRNfHYkU8GXV844t\njIWcqpXsS/mrgrzrzZ/KK4gqd5JmM7guMNNa9Kv6G0rkT1xrytI1jJPAhqtt\nzCwsrPZQ9rNPbNCXSuFAj+v+AcZPKStOECrzdfcQcILCfe6SGQMVmlRfF5z1\nQCDkvuviw9AuMAPpi/MAAgEi2kizh8IfZWPugsM74qzi13s5c8QMYuPagc0J\nlmsFohT+Ckw4iSHPLFfPy/16sRiT4BMiWrlj104JZ1J4hLu1DHUa+Itzswv3\nLBRDvvqJ9pjKaQsTc3TC8RbZuj62NKb+mWe+UY13ehIqGlUdPUvAslvOOiMm\ngB6bfNUIOSI2ZKpKwocTuCWyGAZ/Y0Yt8/BWRExsK35IsAgwLZuuPHaSsAuY\n2FU+\r\n=v5Aj\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"d7970c053edb9cdbaf60cb3dbd1c9c38c8811bb6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.1-canary.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0","@apollosproject/apollo-server-env-mock":"^2.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.1-canary.4_1613415214283_0.7053842310415925","host":"s3://npm-registry-packages"}},"2.0.1-canary.6":{"name":"@apollosproject/data-connector-rock","version":"2.0.1-canary.6","_id":"@apollosproject/data-connector-rock@2.0.1-canary.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2a0415f7a9069037000ca04d7a3e5115d0fd2645","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.0.1-canary.6.tgz","fileCount":158,"integrity":"sha512-jVeD/3+FGZeSkfsUn+l9xwnySeZp6bcD7fJblWo57/nr7ZCH5Wxz5b8xBAPNxdx/pYJdGWemeJqFmTeLxj86/Q==","signatures":[{"sig":"MEUCIH+KpFbwjFWpI/cg+ierTmlwxU15Ky+n04qQar4UA8YVAiEA8FMwp5b057mIXQJfONzffmJTqRzw1A8byefyeGcRFOE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1011250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKs61CRA9TVsSAnZWagAAgFgP/0qvmB2SGAxIDvTTZTHz\n8IY2oZzyoebEsCdUypD48Rgtr1WO0MdJlw7cdmUOwV6cuV1n2uxwHVssZ5yZ\nLss5qyKclyO4es/fQvH7rq20ojwD92Ocn+ye2YpQ/5uJVhSsGzKvd2kkscOg\nYI6Sg2LiFS0V4nSK8xhNnSe4Brkpf6RfufiJVYWIzjOp8jaO72iURl3x4+7X\nHbsLu4rbt4k5qQPfQgup70ZXUjx1N9gN5anStbreZAmfIIjDEvQBVbSasffZ\nD+/jixqRoR3Oy+A/W1NzB4iA0FvQd3Eh0R2OHC9hNSzZi1cyd/4IB8Q+XLUd\nYGlnJPRM/jvEgUyVOU4C4Qzt5TWUYn4uF4ktQCwAtaeWecCsj68kL3zcLBXh\n8BtAHJRFKZjHUZhgA6zR61nBp/ZTrFwh924Ekll+Iy9TAFcEiLFbqW1uYKFD\noGIvZ+uRT5cVPyXCquetQXqUIT12JrJv1k7KcQGRlWoW4adPDfu5jlWDHvs5\nvQr5ukjS3Qr6YmHZbrxMV7DjM2T4zPtv1ovo9z9UEoMN0X40tUJKWj1SBhaM\nDyt6Uo0mcrva9uZA5utWNm4YH6al4p5oS/vZIIZgJzMWx8G6WvPQeyPfzUkz\nvVE9s7X2WYDPyigAhL+j/sPcvQ/se2S868+jCOSaZY9CNfN5jcZu0XzltDgG\nw0/C\r\n=YjR7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"3093ad84772a597956b00393bc9c930e4acca264","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.0.1-canary.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0","@apollosproject/apollo-server-env-mock":"^2.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.0.1-canary.6_1613418164613_0.08590906770062245","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@apollosproject/data-connector-rock","version":"2.1.0","_id":"@apollosproject/data-connector-rock@2.1.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7fa874884988ee48727e2e8a2497d3980beb44ea","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.1.0.tgz","fileCount":158,"integrity":"sha512-IyA16DNfpl+F2ajQbbnGxMv0xpcM3EWyrg+KQr0rnMNoqoCtsyVe9eVwhZlnvphrLhM1sjwSRztXDGYQOQ+9JQ==","signatures":[{"sig":"MEQCIDzB9lZck9Z333sU9/9TryTKH6Wfishc/lmJO2Ir/KEyAiByKQufhqc8DMhryT89DK+UqkpAAQJYk6SIxd8YqSneRg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1011410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOS5oCRA9TVsSAnZWagAA1jUP/RIGFh7uVb9c9lNAi9Ku\nnsL153+R69P4ZZ6Ou2+Cp9IK+SFPJ4NI+tYrVlOUrmifH+swgooPaJuf1kV6\n/2foVZg4rY09QoZg55826y4z0FiJzfEp9aBBCOieseUvmpua2zmH3Y9inTbk\nyzOEHEAr7LsTd9lrDyncA6CFLpg1TtsqMXAr+EgP0pqGu3hykcPIscv25HOc\ns7gA2sb/ZdL6ScjBTxgGpuApqyfzfxsbohYpDYltPuVW6HLaePCc+PLfOEzD\nD2zk1mLjfQ2IFl6sbpaPVLP3XEl5ASiZ8o0NvIQ4Fa46e+qcpq1nWUeBZYs0\n7nNjk9Yy0aJ67R4WJ0dXiJjxWlGn1Jk2E/Qf9AETbuz19u8ik9JlGWv8R2+m\nkkZK64nIlzM1OgTIJvf67d13B9kaoZ3pAVKRe5pRiy1Yp3g5BBNRrlmbQZnQ\nzFxx/R7pxRqIYTxMXuqQuUBGXBJyShjsmWFMiTGswj/c8rUIRdx8TKuv0fAG\nDavNpZN+RIV+TMjjunI7tl4mXozP+QHwdakMouJvWn1bPMdosWYoRYsP+mOW\nrZHjKO13D1mnda3edDy2MU2Y7PzSh6Xdq6Up1U5wQbC6I6f+pAicGsp0lHoC\n12rwowZaK/ZY7eUY2jadbQkvYnGBlDWMbzqZVl457l+n1zppndYj632opsKk\nZvW9\r\n=KYV7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"cd31afc4f65afa92a8e2359d64c03f03f0861e95","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.23.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.0.0","@apollosproject/apollo-server-env-mock":"^2.0.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.1.0_1614360167595_0.6716455753029182","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"@apollosproject/data-connector-rock","version":"2.1.1","_id":"@apollosproject/data-connector-rock@2.1.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7645c7c5ef3d21d0fb2ec76095ed5cb19d4534c6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.1.1.tgz","fileCount":158,"integrity":"sha512-+cjfsBgrwUvYg6uXEy1nyicymJHtVTmvSriVvG8clCU1s/d45RY1i5e8ijTk/hjqLBMMCK5i9AXqb/EauXNcYw==","signatures":[{"sig":"MEYCIQDVp4dQDIS21vtlo7VVcCk7xVbBBWk2bYFRSaTyUfXRpQIhALgyOMmwoRVxmoBYWz0c3Ku5xZ8wZ84vhqkb7ukTvZEY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1011589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOS9XCRA9TVsSAnZWagAA59gP/i7Ig4jMA0gVHltjBcaW\nw/FCiHk55km4uzBfRpBrtCbkZ+muf26gwh9XhzqOg3OjBd14zAqDx2T52M/z\nobTCZfQzOul3sa5VP75omYpEcpbc7NP19ySlEB5QGEhPAYGfOCXujDjErHH2\nV5K5enOCR13qiy9rzzikiD9qpn/pJWNp4QCevgz00abAH5ZG2QFWG9oXEL2R\n5Fa4kJySVN4JfUgfdFNEZJ6frXr3vUFAhObjjaYZA5d9AUYcVQQ8SSxR9rWD\nO7awlNgJNWqYYy6iW3DHtK/PedC7MiecsyOLfraiIDWxpI0Z4uwaBcYvrpLk\nHtmFFSLDjvAfRUtZsoZvr/xzgyUofOeEQtuKfKoWdwvJnnu8h8FjFNMQdluN\nSjDUAEZJ5zw7UlJ7/JILZhOtR91n2dYp1GlcaWsjYAxgq2AECQjexhGzMUAK\nVoggxtQVoPT6OEO/68r4M1C23lYXvrLkp62B1owy2NdrBEx3A9ykBQRgIATf\n6AomvJ8a80MSNOxI0ZT424g5kcUQs2CB8wNZUbrkyiH5dD4Q6pdppGI9ywdW\nUINUcm6oHhCMcmc7XkVeeVjM+sVGc/qBL8XSp5XlbuwYk5EKBMccfiPdIWQU\nJcEiHxT4dsvc5Xlc+Wp7gMu3YJ/FDyc/j6XHeJioATK5hTm8Jo7K+sWKSjgW\nUsYP\r\n=CtRU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"d83599ec4714d6b09ede839da8394a2f66919099","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.23.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.1.1","@apollosproject/apollo-server-env-mock":"^2.1.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.1.1_1614360406997_0.12554682760822256","host":"s3://npm-registry-packages"}},"2.1.2-canary.3":{"name":"@apollosproject/data-connector-rock","version":"2.1.2-canary.3","_id":"@apollosproject/data-connector-rock@2.1.2-canary.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"hello@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a84f758a12591372948919f5301b97aabded37d0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.1.2-canary.3.tgz","fileCount":160,"integrity":"sha512-wW5gJOr4Q4aMAHfi5qlBERKlb0v6LLgVuX0RsU34AUobT/CcY+Pr4O3ktI38unVJu6MKgIoi2tj8sQOF6TlD1A==","signatures":[{"sig":"MEQCIDm2hOQwdoxGp13sX6Xg6EZ5qvS2pno3Fp9u62AshX91AiBArWalO6V3GLf4bSQTkgchV6aBJd9TGsLhbdAyWCJSNw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1012699,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPopLCRA9TVsSAnZWagAATbYQAI14t1XTUyN3hHRgTJBQ\nvvKTFhWv8n14catWKLnQMR/7UPJ50Ef/zRxCGzt0xFjze+x33X32zEkycQBG\neqWJ6nurTNu1fyqIVEeM7QweVDA7aRABJuJYHTkCRtnZ3KotbQDZcm7dUblk\nvFB40xX/OL1QvTZ9pw2BvA+z6FOfMCU3ux51EwG/sz+Cb8tgFvN2ChxfRkAX\nI6rv287Mojma/1AXJqSU4TVMOs3jk+GXBLcXUdYZZN0Uvk19xynjhnyC8+68\nsnvKWH+mnA85rqDk/XqnobseTfteItxCHIBilUgEDR++0tSNviJDF56lTfUX\ng18I7NTxXmNLCuNxdtlGqoJxWxRpVFBHtv+pyUXUpLjBmm4AZL5AcYI2uZYE\nIQFOHVwuii38rR1tqk7MtdkaVXbFGUWLXLJhxSKz+THK+IjgQCzYzSQXYS9n\nVXlTNbTMQ1rqF/QHmd4iFLLhedPFl77wQXexe2ME/5fTovXvoyIlbZvQxqlo\n4ZDMx1aC8JgagNPwLpfBmm/xrf5631SJLfP3zTFH50LcsSdUPGY1ktBasThA\niqBSeP/tBe0OwKzlw+L/rdKYTuLTB9tuFpY7K61swRqZlV9E9QkSaoYZA2OU\nVefcscgP4K/nHRPBGZA804BlpaE+i/9gTOyJE8uTyZ3GTIoaQTWODkAtAYh9\n0Mpf\r\n=bPwP\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"43679a7dfe00b85bf687960e0b13db77c7a767d9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"hello@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.1.1","@apollosproject/apollo-server-env-mock":"^2.1.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.1.2-canary.3_1614711370660_0.5130590261257606","host":"s3://npm-registry-packages"}},"2.1.2-canary.6":{"name":"@apollosproject/data-connector-rock","version":"2.1.2-canary.6","_id":"@apollosproject/data-connector-rock@2.1.2-canary.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"eda49a095ea7929910218e820755a554266aa383","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.1.2-canary.6.tgz","fileCount":164,"integrity":"sha512-T8W6I9O0qqC58luHAP0l4iQOZh+qM2R7D64kqb0gYvnhlGeWG1FsVPMLx+9BFBFZNuTNsJowjKgY1TWuJ7K0pw==","signatures":[{"sig":"MEUCIQC3AoCFmNen3nAZlLOch/8nrVGi/6gmKqevLdxnyxqe4gIgOVTj8/qcnOsmSSQJ6I1bubwgPgK4ONhwZkxEMRjW5uA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1023456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgP8A/CRA9TVsSAnZWagAAjYoP/3r88lirqpSRJ0+TSi21\nEF6RsVKTmjbSH0p9kHtT/PtUS9ulPJ12kdG95uD00b0Pky3sZMzmJS0ewX48\nDbBro/CdGcPFSk7xI/ONMcmF8criY0v//V5Lqa/qBIyuT7ucD87k2tjfr6Wg\ngPa2dK4Ci0/2kL16ceHgTgQcuZLi6/VDiQNT0SVedpsFsIG4CJ8yeVJXfHFu\nqtuAJKbAweIW/cVTBcIcVAFLHRsT0wFyAZBoL5+6XFE4RCPUVU07FgvHFgHf\nntxRqssbrEtJdsx623I3CWSAzipe0rfT2sG4BouYrOoLDFTnW4NpSjlWT5yI\nHvivnZfbN+fACaFSM6576RLzGZyT7i7xYETlafPLfjMzfYSpRvhi9DOUU9kP\nKKnRBblWrueuPCtcOGLbIyiMDZNbHnY4WM2lM4O+wtLB5dGBptzKhElgHX2v\nW4BNEMoUiFAmhrJGOhNIbISlXacOEgWiR8yMA41UHsAcqoxZgbI1X7u5GmqH\n+X7dbyxeT+yaiTK6ZS/CPOmwtWjhX8/rzRUluWMZfw4nqiSF6mrNcgsTQz9R\ndPWM1W4Ig/PbYH7/jmjKUcJgdez27HmMWEbbGnAgg+yexTPMkNqsK+b/yDPa\nHy4gAfyUYTku6KGLw6csyCzDALpZHg/XT/KXaln3ZPSICODPfW9Zqzl5vq6a\n085P\r\n=9jdb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"f87a58443986ffd2b8dd4c69f2537200f6c81804","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.1.2-canary.6+f87a5844"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.1.1","@apollosproject/apollo-server-env-mock":"^2.1.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.1.2-canary.6_1614790719299_0.8327407144817351","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"@apollosproject/data-connector-rock","version":"2.2.0","_id":"@apollosproject/data-connector-rock@2.2.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e34f5d7c26825c9bcd0c35532aedca32480b30ad","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.2.0.tgz","fileCount":164,"integrity":"sha512-+N8w8Epen3bC1BkwBlZzAWhDjDGHz4BUomCNHmNs8M/jD5eXVFUGb3d6S/2XtWnZ/dsb9h03aM1ITXBigIeOMA==","signatures":[{"sig":"MEUCIQCNyYjLSynRzEkbknDUiPzewat+Nn6v8YaTLowCiXiUKgIgMAp8iWbGo5kn4+XeTiCtNur5LmSynHV8ff2LvpKGlhI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1023974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQSbjCRA9TVsSAnZWagAAJRUP/2uJOo3LXwmA6zE9G4qa\nU7w+kdKtr2tFqylDbivrZGeN7mJQBfrI14j3cb3eOCqDYQrqqI2tpAS+OOIE\n1VSFuILYeduTFHE6Kq/4YIdE9S+koS0zdKGZLh+xUAtzXsE7RsM74mrDy+YV\nGq1kSq4rhcg2GCgVpyhCnSw+7eKpwXOjbs9retYn9Knij9gtEPpOcPRSNE9G\n5WNOUgQkrvhNo5hp5UXae6+qzzaQcwDDQgiXW9QW+niVL1j3avyu+KcuZxkf\np4qJFSsSCfaHCteoKigfkrR3FZwrkm3oP9EDCIBucgUas0LRjK9orzmvBE/7\npVmmvIPr6caFzuWOANwCbI7YYuCeF/QcJj7ekob9M/TikImQmZI+5V4ycHpA\nkFb9FtKBDkGSzITE7COZ9vWQZe/DAFC6Gxtis6Bth6c/3Cf7GxxGn8Cc43Hj\neGwdo4tbTZncQq+lQDaRhs4MZJ2fb9utSaqRtBWfzPtwKe99XNSz4eH/H5T4\n5qSTjwjQKqmsaOLJcKHVrADIoO7hGCGt+D9t3PtsEen0nDXwRoScSA6JlEhi\nwpXiM02hald8dvtLkx8EUqmD3vV9za3CA1n+btnS116ArQN5lM8YJovlHab5\nPLuKQWUMjon/L5PfQ4XtGkzGjuFOyDpMeirEdS+KDb6E6/JkAWMTsmRQAi5B\nNOm/\r\n=Qez8\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","gitHead":"6d528ddc8fc6df84a3e2e85c1a0591f23fb1ac88","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.2.0","@apollosproject/apollo-server-env-mock":"^2.2.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.2.0_1614882530482_0.6682486055362433","host":"s3://npm-registry-packages"}},"2.2.1-canary.4":{"name":"@apollosproject/data-connector-rock","version":"2.2.1-canary.4","_id":"@apollosproject/data-connector-rock@2.2.1-canary.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"37fb9c0ac2e891abb6f2b960665d79c0a09614cf","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.2.1-canary.4.tgz","fileCount":164,"integrity":"sha512-kz+QQWFKdrrCT3l4rEwTjHv5Ka7+/qIQW2lKeRTNqE+c0tLH51t5fjb5eMhlvMBLn1k4qtfMXfOZ0WS30Qf9dw==","signatures":[{"sig":"MEUCIDhcyR8ZHi2KM+CpFQyhRxvkvSKcaMFDD7fMHJFnywvSAiEA8azOdmlb4s5zTIMkHjiFjFp7D9mhtx3pH9vsMdl5WPg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1024010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRit9CRA9TVsSAnZWagAA/zkP+gM5GMTRfS+obrqICPUd\ndJtytNf8AuJ3XIvbinB9qXzK4e6gx6TV39SbgYk2/IfcSR4mAGErEitwYOLP\nMzjvxcD2NcTOkl4OO1pUM/JCc0vuek48fisjxDRgBJzs3+dFutCLJQM3QNCT\nbe6apTsgUF27RIHWuMGijtUfHQMZdUEvCRbFY3QItr4KDgkQ5mkBPtHxJLRP\nMbTaAWJJQDLJOxiVfaS6n80RsH2L1FJIFz1mXXcc39bKGec39xnPYb/0jTBq\nwwyYnzSDft/bzwHqgUxmY2PvJcMMjr6odcK0zreJ3pFPwFAtLt9Q7uAlxRjq\nDyBn6/bfvlGaZtFDvd5hSsVWTzP6noYjj6zqRastYx+Rq15n3EWJcXOZ+Gfy\nes+vIbQFU8P0yvtlQvh3At245N0xKA5Xl+yWWqSQrgznIQ0BnLwJjYqCggt0\n+Tg6aw3ExwNTr1j8xKbYFtR7yl5oWlrEUO0Eo1wvRunJVrbzg3gUBqAjoAM6\n8NtYjYj0otTa3OmDkvujjIELQU8dfhpU+PV4GO2QCfc1gw7Q4n0tKJvGrzzX\n2xdC+CVv55T4TBjrfpCo30zuE+337WpZ5S7LrwACfyh5DYApqeUzRdaKL3ud\nl+eggK27iM+5M/Jql4ObkdctHqMSIKYR4Q4Jm9/jbOaaH5cIq0dmXUGBnPO4\nCruH\r\n=ybjk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"804a0a7c98e4abf8cc7aeef548d1735a9d40c5f9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.2.1-canary.4+804a0a7c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.2.0","@apollosproject/apollo-server-env-mock":"^2.2.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.2.1-canary.4_1615211389449_0.8068300003948896","host":"s3://npm-registry-packages"}},"2.2.1-canary.5":{"name":"@apollosproject/data-connector-rock","version":"2.2.1-canary.5","_id":"@apollosproject/data-connector-rock@2.2.1-canary.5","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2cd1f69bac88758d346683da2adf4ed6c201bfad","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.2.1-canary.5.tgz","fileCount":164,"integrity":"sha512-XARxuuhCbqNzguV1d/oAR5EuO9930EBnVsSUI7o7V2k6zX9twWH/Y5df4v1gzrffoDEHJA9I5pNm9oWGOq5i+Q==","signatures":[{"sig":"MEUCIEdF6cANJEb0z/37J9lvV5ZiO/7IyLT52PppqRfcPTBLAiEA72mn4YtNYJja5W7P16mPa21etz8ub5jMOOMLg3Fytxw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1027818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR4KZCRA9TVsSAnZWagAA0fsP/2wviVfoJTNsRrzObCXj\nnAW5JV4FQ7mUa3oN0XSbBr68w4iKTNskjwqBAPg5szyPxGTYSQ8VsYnR09Av\nao2/W7zEPSB8xJHGs7dMUq2ya5SoNYRyWsqdBMvbccw8I7RYI7/WLQ2zvalP\n1o+Cq8VADEbyse1v/kgp27wqhZJ63dLjvPK7tMx/mFeJqTSNhnDDJtbDnnfs\nLz96p1JJapRftWt3IcZpA0hCrYRHhm6vK/L+AOBdKw53Ms0sCxi6Et0gm8S8\n3l7s5yCw/Le/HTLbj9vQ1HFQQRgbvcuIcLCDkkImkE0mocSzWcS2G0UyaM9S\nTs4DWWnqyM4RbcbwBntn4v08lP2TZPpe1LykPxqNDvegfKhqjtQtXr91i8Ro\nujax9vD5e2RiWDvUL8+HZLmueCXwJ9TFDxdTYDEg4O8yYO8k5jqWfZ7kK25h\nEbjFqixv8LyrdMoatHfGHs8ekyA6ZqXdKv7JJBZGOmBWO4YvdBnqgmm4NsDz\nCMdGbBXqFUihhZ148qdEcNsPHyXYX4GgMXdHih9jyBWBSbd0ZSl8SUuyTISL\n77MWurwoPLoi73mEeuMPN0d0KO3ij8QuFDW1HnWiTQp0NfwfXovW+sas86iL\nuB6hO2fLkfSm4yPKr+zGzjIYilNhmPl5HzatZhqxmFVSpWakCcFp9+q7HccA\no4vj\r\n=cT2u\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"c254c5bcdac03c840926da53b19eeba9ac11e9a5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.2.1-canary.5+c254c5bc"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.2.0","@apollosproject/apollo-server-env-mock":"^2.2.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.2.1-canary.5_1615299225137_0.009840112263388656","host":"s3://npm-registry-packages"}},"2.2.1-canary.7":{"name":"@apollosproject/data-connector-rock","version":"2.2.1-canary.7","_id":"@apollosproject/data-connector-rock@2.2.1-canary.7","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e9be8d6637552d26ad2c3a349bb3426c4268d92c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.2.1-canary.7.tgz","fileCount":164,"integrity":"sha512-r+yiyTufAk4w5ojZZLTvnz6iNWzO83Xjd5p7Rko7t5YelaOUAZFrn4vkJOct3CVvpXz9Ey+YIusHtTTZi6EdSw==","signatures":[{"sig":"MEYCIQDyBneQssDqIQBu76aCk7qwR+tu3sw5nqOVgiCCAE66eAIhAOrEqv77uEazTiahdgxjhm78MSxoMEXn2XO4uwnuUVv+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1027818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSSFqCRA9TVsSAnZWagAA1OIQAIRiQxBuNzcGxiewy/K7\nH1KVQ6iiZBQ2KIXbllOQ4RxWDrtD4MllxV9ufT5vaLAxvOk4qefkFCuHERoA\n/3J0hJ6bC99j8VH+bB0Ic5Ias521VZVflQIsDwBKGcDk3vzSwzYhR3T9FoCg\nJLJBaC4vHy64g8wtDjqR+C5u/hXW8CHDHuZQ2KAxYl7wCpq3TdTmxh7rlhMv\nL5E9lEqFZwg7EtTNg4jYyZDfI0Z7nyiKqpYBL9X6k6ep94mKHdkEO5ugDmoQ\nJGFw3dEN5JbKrKWhlo50FX0dK6BjA0Kxtt9GxGn2U5monvlZHeKHd3Q6MDGs\nMzNQKJyURMf1zC8/XK1VH9lYNtBfWYNWSz7zLHqprekCe2/mmkZ4b3A6mxM2\nLp8RsueMAQ0LVpFV3GJM3GEkU4cIasVIKePKqHLjeeeESx+HugWbRX/9q/ky\n+thUwIOTdJNnhZdwo47HYZcTy9OiNGizuC8QqoJ43/Cukkcr3XBNU8JwiakO\nRoOnICAa5Bzc8floM65T6nKfveoh/DtrpXR1qkn7beDOSlDzBzVMCQC6nLS4\nFqAfqgsNcMIvdITOT77+NDnNSIsv51Ow8iNrDMszOqLUAs8NZJRvQPwLbSj8\nyL34m39LdhxiMHLPHVsynGBH8gYkjte2NYeFBRcZqU8EeaTjSwvzaaz8bFBC\n4nMD\r\n=YTwQ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"3d3d1a2ee014e68abcc2b28b3677bacefbe1cd49","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.2.1-canary.7+3d3d1a2e"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.2.0","@apollosproject/apollo-server-env-mock":"^2.2.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.2.1-canary.7_1615405418504_0.35326965650086795","host":"s3://npm-registry-packages"}},"2.2.1-canary.8":{"name":"@apollosproject/data-connector-rock","version":"2.2.1-canary.8","_id":"@apollosproject/data-connector-rock@2.2.1-canary.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d91ef231f28cf080380cda70ed8b0f183fffdf64","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.2.1-canary.8.tgz","fileCount":164,"integrity":"sha512-cZ1GSFFcQlD704kpuDLiSSu7rwGezORS+meeuRh+YVjVtbhc4UJd0SqjhFIBOHWeTNEfAr0cxqm9LdAXR1V1Sw==","signatures":[{"sig":"MEYCIQDIGoDnaEokjn28IDuK12CmuAaC7UsdjS7BF676J5LnggIhAISZ6QUQZhhA6rO7sdNpNuIxxeciS2asRK0P0OAMa0+g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1027895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSSzvCRA9TVsSAnZWagAAdS0QAJ6dOQEUubL5kUNRYIB1\nRbsbiLN3DNJg+ymtX/Ey9BFt+U7+8G9Q6L5rkZiWpIWEbo152CDIIsJv6fiL\nl3vkCQoX4k7e8sO7Pg4XwXzoRuyB/KWir6XvmOZG0T+eN9BsO6ntZplueJSg\naJKHzePM9mNdR62oPdDeLtTH+d1y8x9iOzUINP7Hxfo8NNOyLsY0IHSb+BC1\n2aDCZJSZJ/Tpjnfo6s8H6u4fygmHq8OWJ4oJMxRyDubZMis/UAF6scKZX0qz\nlj6IRvGCW7byHMd4riS7j3H4rUDIuRePBtRah37i+4cokRKwuNoAKxR8rjY5\n+BkID+qBsAc3lTcQir1/EcPvnamlw0ARF6/6r3hayV0Z+PNCqN6W1QfbDIKI\nkSWqidDhnLZ0JQz3xhai9JYzX1SeSvD9zOyg+OeuTpkL7OQzR4Yx6fwVG0OF\n7J6Kg4lKG2IW+9iCRgz1kUfMo8GJp6pRGpoBLtZ+NqZVvZtfYw54D9MsbE0E\nqPkQ1ma3oDshZ7owSFQdNxSqIIs6pes0MFOmDrlRKj1dgoCG0cCfOVMft24m\nYJu5+MeyxKjPlK1CZly/ybdT09y9s5U4Uav0lkluwfIJBJLrhNld3MIfiVOe\nkVZEkONCLrQxXERBjbFYlelhKhFbmQhDvPnvdeOPur8HtcZdmf5TA7AWK7QN\nkEFr\r\n=51Mp\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":"10.x.x"},"gitHead":"f47ac2273016bdec57c610bd73a7041cc226f618","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.2.1-canary.8+f47ac227"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.2.1-canary.8+f47ac227","@apollosproject/apollo-server-env-mock":"^2.2.1-canary.8+f47ac227"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.2.1-canary.8_1615408366867_0.8377784143019245","host":"s3://npm-registry-packages"}},"2.2.1-canary.9":{"name":"@apollosproject/data-connector-rock","version":"2.2.1-canary.9","_id":"@apollosproject/data-connector-rock@2.2.1-canary.9","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6ac8eb7cc9eb38fc03ca877c03ceb738700c6cb2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.2.1-canary.9.tgz","fileCount":164,"integrity":"sha512-TTbuCLNEaom5XchJjPhTZCJ1rucqX2F2MIfZuZeYkmZu2Ya8Ga/2VEBUFWuzvp0K+9uNh1nfhhZURNKagpwhjw==","signatures":[{"sig":"MEQCIHe/m2sz60a3KJTLed5WDbtSy2i1fqffTMlfrBJVFhU/AiATKicLq77pm5y6ewvm4zghf7Z/IVSvAKYEiX1emodQhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1027859,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSTv1CRA9TVsSAnZWagAAzKkP/2uPDgFsrSc97AK9zWsu\nrIn/gi4RQytfZ8XmAiOWiFWlq8gLcXeDhVY6Z+eb78R7WtULbtbxzcPA0U+9\nBteDiGGNrJhvnnlIJ1uhHIolLuDP6qmakzCIbIBgfqRzsoSGBdcK9VC7qMD0\nktfUqyj5Y5UP22fwPWSqn+gbmMFrsqigxT3thQloX/rstrdLLMHL1WLAg3UE\nmkYV2sWCmu7L0IVSix3gQbgCBB6C/750T52Jq09QPoU561Qm6eMAUEbET0HN\nCjHLMya4iXrAk/Oc9svjiIlflYRQnbnVbUzFVO9phuruf+pi1SNCJmpqEzWL\n7eDcMslG0tB2D08WX9Ln9PpdB9tvmiQfMEfGuMT5vTtJtEoxWmnhDRZHl4L4\ne99cmNJELYFZDOcV8e162whaSQwgRMzdASphWErorRjAI+hL0Yzbw1iDiY35\n15YZojySZYNkwfeGstKWDzw9KOq8u3/0efCC52doBKZG9zV9UasU/HtHwqK1\njz9CLsss+mdY5mic3pD4ZbLzm93jmCY8pu5nrZEGDQ3pz+S4XOhB/rG+FAEf\nuVFEYJRhUtFD8OgH094UISTxF6ifNpjxv7ckfne/q9cg+FD2+HdEE4Bhrt/B\npe6NVrzHWSKarMIfZkFd1eFn7uLHyyf6r2yoH9rLpGbW/C6Ex+zF3vywBs+X\nSI0/\r\n=/AUn\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":"10.x.x"},"gitHead":"5f3cd78c45d1e2588f85dd5c6e6f0bba4349ad0f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.2.1-canary.9+5f3cd78c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.2.0","@apollosproject/apollo-server-env-mock":"^2.2.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.2.1-canary.9_1615412212718_0.6138156828845673","host":"s3://npm-registry-packages"}},"2.2.1-canary.10":{"name":"@apollosproject/data-connector-rock","version":"2.2.1-canary.10","_id":"@apollosproject/data-connector-rock@2.2.1-canary.10","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6ec5ffb93bd37ad02e568daddfd0149952039e50","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.2.1-canary.10.tgz","fileCount":164,"integrity":"sha512-EO6wKgirK5kwmEqEIbEjonc4qqaci91gipWqmhUZVMFLWRDi1dA3EKB/pvkc9do0gdnkyULxQnvtiiSYf2akaw==","signatures":[{"sig":"MEQCIC4Hh/ttxGcZ4Hfjg64YLqsxQLIbLXVdKZSMrr4h5iJqAiBywOQSwcBar1nbA5pmbd2XWJpvHDxSFsf9Pue1t309+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1028767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSjgBCRA9TVsSAnZWagAA0isP/A/ze/FjglqgFpcOVffr\ns3FQScRpre66NRQdszAxaIAFeDVrowptyBc5i5UsRDZdVlPrGrIubJt7rx+5\nyMxYzGkU5hsAREOAZJwtb3Kx7APEa7VXRFX/HTy+n85rb0fXEHyO2XhfV7Su\np3UmaoIQutFs0z5QOr5Cfl8nnpXYu5jy8OeHOgupPcRP7/o2H+YkmZG3e/3q\nesNxVgy3IRnm0ZG1sSDMUO92CYsj+vhek4mlIR+UnUrOBd7ZivlItzKvgxib\nmvG3xNv4cYYUseOJ443oytZ68+xZ/bcccTAvAFmVz+rZmqf5L07PdD1/v7Ap\nXOc4syc7Wbhl2qoRCdZMe/qal2McPlu2fddFRjyMeV6oH4dXC+kyMLl+FRmp\nXvFXhxBoQASuZxJod8SCAGJmvhjQ/Zw131431wUzQbjnQomeKrVEoMvfqBEz\nV2m32f/699Odbc0FgHpX62iyd+y6qbq/W+3t90TdezZSPBWZtG+EiHbg5FMP\nI2karlTIlb97zwGeN0lnCTeS5XfRPFtSCWdBNy4G6sJX+LzmFp8Adqa95CrC\nH0ywl3EIRmvNhKC0ChgnoJzXICOie3Y+1Uys2yrQc50LwSche4s64D+VA+Ed\njTHuGUFkD7XcuVPhn2Fd8RJd+zmO0JxpxcN+EBnEoP0IAcZFahGGditggcaM\nuCco\r\n=7baZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":"10.x.x"},"gitHead":"71fcf373bdaf06af9d3fc956d2b95f9e5f4506a2","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.2.1-canary.10+71fcf373"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.2.0","@apollosproject/apollo-server-env-mock":"^2.2.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.2.1-canary.10_1615476737187_0.3495287013658972","host":"s3://npm-registry-packages"}},"2.2.1-canary.12":{"name":"@apollosproject/data-connector-rock","version":"2.2.1-canary.12","_id":"@apollosproject/data-connector-rock@2.2.1-canary.12","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2bc19d0eba9a8b30e1965c48ae78fddd7a825a1b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.2.1-canary.12.tgz","fileCount":164,"integrity":"sha512-/5d+/8+9L7dCipINBa2vvdfnRZhFzxvrtWVg5CtkmKWwhW8SFIlWv3FiDgmAymajlbswUOSfQdQJhs2A3RExoQ==","signatures":[{"sig":"MEUCIQDzH9eOrl7SMMr0jjEhUCGRiZ6qSkAB3uMN/faVYKM1lQIgYvYkRhpmnfIO6tsihFLvfK8LIPfzVZ9I7fYi1Qz9zJw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1028771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSl4bCRA9TVsSAnZWagAA7iYQAI1IljVL1NSd3jW9M1e3\nokUxQp0Ov00sWHzHdr2DvULv6wO4PqIpLf2LpiSyfs7IdX8Cdikpf3rbwAp9\n78GrIVcPSgJiDlbugQvLIcdr/rMgO8dLXZNimP52rE5QMDndYL3ms2nBeq2O\nZk067iGGK0dTt8cWg5ym0NsJZVxF+CdoH8LpE8T/SM0MMVkMjFBlk9Ho7rCE\ncLWhUaleHl/7p6TVLxF4g39P6Z3ea4LOmDHyHuJYt2p7gVK+uucthTVR8Tar\nTo0lmYcJfwvmkvWRSmk1JLAmxz93lQhb3vFtILJGf6FT1ashbl2uzL7Ydzq/\nPZCvlhozDsB2+4Eqb+37xqVxYiDMi7UOrI9FGcsXuk9IVDbYSKdzquvubwDD\nU25apvQz6/p6o9ipZfbX+pafoMr1EHGjwSSvIhIx/H8yE+5J/r8XV6fb76PU\npxRA5sgIkperyNPA2qVTy8Oybhq0O82vhnDM0mlNqMlALEUK2SSWM9o/UcAJ\niK3vmap3GgWQR5ccP7wMG0PsRltf+9mKbMBAi4HYsxPXNZfgfHmtzLRW9yEU\nMSDbYsZeAYIUyjh3+tJBlBuEjjjl8q9EGpVoe8phJEjx+oxJbzvsIAFK98Y4\noSSguuvj5CoOsz6uciwxdXOT93vpA5fqwrJTUkQ4w2k6PYKoK2zmZqOxRtSu\ni3Al\r\n=7Vne\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":"10.x.x"},"gitHead":"68d042de2999aa466f7460263db6ec273cceafe4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.2.1-canary.12+68d042de"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.2.0","@apollosproject/apollo-server-env-mock":"^2.2.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.2.1-canary.12_1615486491317_0.26415799472993773","host":"s3://npm-registry-packages"}},"2.3.0":{"name":"@apollosproject/data-connector-rock","version":"2.3.0","_id":"@apollosproject/data-connector-rock@2.3.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"be98f05b36c569e18b8750428ced0ca8b44445ac","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.3.0.tgz","fileCount":164,"integrity":"sha512-GZpcAg1qHqqaRG1sjnKMgglkVFi/jyjYJHnupZNbBnsnkF6lTNLackJBNSsz6E2XfGDyaw6nwXR4ZprHnLzc8A==","signatures":[{"sig":"MEUCIQCuo4WHVKN6vVhfu88BAwz/mUHF6raMMi9JGiU1B8cROAIgVk7fCJmtTqO44tmGUzueZRBYmAmxk822Gjq2jtgwbgM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSmvDCRA9TVsSAnZWagAAtJwP/31ov2uNtqSI6iNurZOF\nqjDHs5VjKT/k1FY5Bv4vWZtnrp2vmB15ZzEBjfLeTMzKqRyc1wCx18fVIQ5Y\nRhXfIn3vYKv5BmrlB05A/Wk5wF9THYurIq231deA+s5lrmeMPjcmngt5xh2U\nsO2IJka5L9yb6tFMEOTYNqVhsWX6j8Kx5vLnnBE/57CKM/GXhKnYl96sTmAw\nL8PQGitlaXkmfFsVOawM1IoB6xTOpLZH0eMvZ11rqzeW+vS8CT1gfPwN6Yfe\nS3HfPz+48VVRG/sre2+zpNkt11PRsgoiQhpYbBjPNGYA/aQ/u707ERTyyDWU\nD/oj9e8fdJN9CexRSFJ6JSJl87EJTxA3Xz/P/0kg30RxNamEJw+Y39m/gcY2\n8DiiqD8Y8Ycl/DEuMzFTbsIFIXutpD72rtan90A4Xp3CNTXK6V1iU/k3Vw+x\nWM+clv5pT552isC4Ho/Zz3RQP9X1DVQnMKy6CA8fQbqr1K/cI0iwvli3j7ze\nnWT1MBoLmgDNOUtslEIOTwHh0osoZPIEMRWGhYtbwipiVk6w+94SP6wNIK9k\nEoFRqJqXeWkS1PaH//V1H8FFAdrHJ/WkH+l8HMKSpS3b/SksUNy+gqra/8OC\n1j/Ov7pMnOEwcmyTkONTVAJZ4FGZpe483xHTMZY9e8PnMUqNrrYanIoUzxM1\nJTJq\r\n=IkLv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":"10.x.x"},"gitHead":"ce1b9da4b0d172ea96e9c903106ab4a4f877a7e7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.3.0","@apollosproject/apollo-server-env-mock":"^2.3.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.3.0_1615489986675_0.6069502736998276","host":"s3://npm-registry-packages"}},"2.3.1-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.3.1-canary.0","_id":"@apollosproject/data-connector-rock@2.3.1-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c701af87429c129e49764a66fc26b1ac6f1465a2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.3.1-canary.0.tgz","fileCount":164,"integrity":"sha512-eRBvHc/E1ZiMoVDz4tXFb4ZCpvP5rq9bS9LzPFOVQ8yYyD7xc0dvUYN2ou/X/URkwoOXYeFRciKcqmaoXauB5Q==","signatures":[{"sig":"MEUCIE5KYTkGqxixkE9qtCQQSWKzaenP4ei4UBkwc2BRBf/mAiEA1gc+9X0vd7PLC+DEV3omnY3B3nBDpWhIeukmoOCHiH8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSnW0CRA9TVsSAnZWagAAJPcP/3pGYaI588Whs+CkNuEW\norWuQ87hO1vDlld2FWgv9BDJFA7baxOcG36pUHiQ8/Jpz3/hm3QQ+PZunM3p\nThunDb8zXYpdV5Pridp9KPVj4pJGbRHPBuVvytBaf2V7MLCmRqdKcAddOmjC\nsV8OQIiuV87rFir4IL4/dBnb/9RmCQGhf11M1H+W2PSrjO5AJCDEl6aaZtYj\n3bSYPEUpGEFrsN4Ck9a8AlZkQTmER9pCIkBKJUXgoQXfMXpz/bdDqnSZQC9G\nXs9ViLC+yvL03VA2IwHcFKy7TTPLrPWPsZ1YcWfsdoryNc7Y9vgjOjP+E+5t\nDTRyfRY7Lb8NBgpMeDn52aiJpvaNHELBZrFv6C58liKRy17Rat2mDTba1NIC\nJMyU2II5Gpw3Y0RMcjvYH1Z/IldiBUhLSyEuMVyLYpD6ha3uVUkhga9g4cOv\nGlGF+4oDFYZLaefCAkPioApNEL5c0xvwBmCMftwislKqD4X5UycLvE/bS1XM\nPtcn/r2EWsU1dmDTx5yyt1X2+QO0fNUWdfOEv/Ml7JjQ8OYiIWY72slwc080\nYdXuLWQhCqr6cOBpKu9e07LrA3XlT0mK3TuAQHdKR3IG3rEMbWe8nrYxSlsr\nTeMb/7J1LJGCpdCtlnLm3UUEbhufArE0uXP3jX+e2qXup74nS9hLY09UREOy\nbkU/\r\n=4Kv1\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"a8df2ef39f7437e76becf4f9a3ef96e61bf3e76b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.3.1-canary.0+a8df2ef3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.3.1-canary.0+a8df2ef3","@apollosproject/apollo-server-env-mock":"^2.3.1-canary.0+a8df2ef3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.3.1-canary.0_1615492532056_0.6069812733807181","host":"s3://npm-registry-packages"}},"2.3.1":{"name":"@apollosproject/data-connector-rock","version":"2.3.1","_id":"@apollosproject/data-connector-rock@2.3.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0c6d29e25d8aecb5cd9fb301acdcc114467c2bb8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.3.1.tgz","fileCount":164,"integrity":"sha512-w2MpraXiD9sK1LSslV16VwUddTzL8cJl4p87XZNd/gXBsQzG5e1MfPnq1jY7vt0WDYyH1jh4/oCJqR1oxOB0Ew==","signatures":[{"sig":"MEYCIQDGfYJeihgEodxMINJkpplMsW9GE+BbF1gfd6nvf5VIRgIhAKZoPMI+Bk/mVCklQTmlwfYwltki35t6wHTVlCwlegBO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSn0cCRA9TVsSAnZWagAAnvMQAKJr8obJ2clvZIVtiz+g\nsgn3uuCplEzBlyKllMWNk54HqTnSjGDtn6F7V/uYVnlnSStjWRAPb7rU36X3\nLslCaLBlf0RL9rL3nj0DALuV5acAQnnGUZ2IWdqNNZXjYd4FuoTc1hZjV0uf\np/YZyVmj7qZOT4ZmiRegPeHdKAbyDe2H1Fj19xnE7Gpuue/5pCp5aSTHgXDE\nJa1w8YWzYa9ES9j7l/Dlo90RQlVwnkhnCtnB232vi+UjrNKlMfUKV6DOWOg9\ngBGVr7WDqzdXqW7DUJk7yB4pl21bPe86FxUJJMMKq5o7pot35EnK+MqzZWYo\nKIFkPBBe73/mP6ueU+m0WsmKxvUyjfXIXSVEHS6p3GeRDwizVPX2IVdm8CoK\n+XNJR+KcHMB2uKwiNXvrtG08EQ7UPIvkiYsJBGbA8cJ33cCPrx2W2n3r5pzw\nv1o3F0GIl3qEgl3ap09W27UT+XMTaiBt250BSBOY2maT7ozsZh8ztZPXNacE\nBEYdl9XExyDke09DzYb/azcA+yubN/Ru0NIsYXimJYFb+01AgvUqfJb+O7MT\nViTxtWDHNEXQr6WkO1uALEtWNew9r0h0lGdo1ZGfiug76lXRkVc2fMIfsqZY\nGqQgtnXtizR7358SU3Dw8X6FdXkwk9lITg5v1bPK2C2ckH5pnHMkJG1fSZXf\nkMfN\r\n=azjq\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=10.x.x"},"gitHead":"e0cf6a9ac9d837cd1c41234f12b11cda9333aab8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.3.1","@apollosproject/apollo-server-env-mock":"^2.3.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.3.1_1615494428019_0.3286316870219059","host":"s3://npm-registry-packages"}},"2.3.2-canary.4":{"name":"@apollosproject/data-connector-rock","version":"2.3.2-canary.4","_id":"@apollosproject/data-connector-rock@2.3.2-canary.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ac24a221add6d485bc0f158d2c49e4e053b84220","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.3.2-canary.4.tgz","fileCount":164,"integrity":"sha512-zkRnjCn0xKqQeJiLrHx/QY7ThE16q2d/Au9wdb2aaeef7a6MmiOyM+IVh2fDb6VtTnaH1FbFnH/oJYMDgPHdiw==","signatures":[{"sig":"MEQCIGm5S+hvXgsQHyNrx3mdsDJerETUfgOM9l9x2FGIKwIEAiADyIDFIz/ms6Hf1R5KvW3l/CB+N6o/iWC5i39x0oNZFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUMn3CRA9TVsSAnZWagAAcewQAJVnBuY9RsTgV83+ooTL\nH0itKNJ6XSQOQGm14OrRmJXk6eRDrxkKFGWh8TQWUoT1FY655+5h7/vIBGzR\nWuoUq+4FnlMP0LG0g3RD3OkvFjcH87OeD4CvvgzuL/BWLp7uvbABJencTttg\nA38OH/DZkpk24oRaFoJcGLbeMrFw4Ynizq9I6GeVtgAiOU7ipmQ6f4aXgT3p\ngxZauMQmJatLCcLOD8z4aTCXTwJg2PdDGFSe1q+QuySIOugaIi6m1PdqFVWQ\nD5Lo9o3RHVoAb2Tt61X1Qp2kkEG7Vz8KKkwn+b4776tizOK7iXf9xFH4EKQ/\nqZ6p7bcsHWFw3sy+G47bq5VOg4NxT1kD5aZIeXyb9NB0mAqKFPYlVYk0oQOr\n4ueW/1DTk6U1Rn3tEfox1IQY2Lxa9KBrj8ikrqxH/+ObBV+pISZwNe5oC6Zy\n+ujPrLBhAPiNRSiyhUmSFEf1akgTk04OJEE1vv8n+BdG0pnbhaqD90Mb2qdr\nTOQjxcNmu8EEUKd10c1frKAVwEp8ZbUUjO1Fh1Ax5WoaLoxX28biEPwdsiw/\nYQrv+JsiekMd5/6UVaVFT1pXVi8pZe7bhsZXt0xOh2uIzJyAdUcIoCmrFRX2\nu+DNR9xdumOaWOB/Erz09RgGXmMqKAjV1yG+CEo/A6FC1VCe3ywQ7mn+m6ay\nLTzh\r\n=zG8U\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"eb115b616eaa6f1a69c5c0701bbb8dd99e0b4dbe","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.3.2-canary.4+eb115b61"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.3.1","@apollosproject/apollo-server-env-mock":"^2.3.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.3.2-canary.4_1615907319343_0.5199546953574299","host":"s3://npm-registry-packages"}},"2.4.0":{"name":"@apollosproject/data-connector-rock","version":"2.4.0","_id":"@apollosproject/data-connector-rock@2.4.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"cb64da14153edd1e9197e6304a377dd5f6337c81","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.4.0.tgz","fileCount":164,"integrity":"sha512-TSuSB9mj5EMYKpd21Vgr9HbvPxTmDeUlsbcvdMkVOxRpj5fNenwmkhJ5C0f6E2Zu4/TU+X7WqbKMUUF57IbhZA==","signatures":[{"sig":"MEYCIQDu5R+5psMYwd+21GJwCpDffpYE9wYNRJkpMFADbIDWmwIhAMoaVIei+zZaKO7/U4HrOcR6cJQKXKJDsqo21IA3jgUE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUp2UCRA9TVsSAnZWagAA5BgQAIiXL2XHuXu2/UnR7oNg\n1SUfTtZ6wBnf9VPWL3b9SxX8F//rwefvHX2JQgyrEEjkVEWZyHlLfV10yLO8\n7bidIuyjoY2DIS56kaLo+rDnWsF71txIdud9ko69n4UisIs3ncqG7DkCBlJ6\nW/bZL6ogXbZ0Svn296lDV9D25RwxPK25WEbLV/vcGMo0YBffXKc6o8BemTQR\nhr04EYjOtlRWjFZGdYinIYd+7jSxSmZetyTuTHjHBof13ENxj6XbukvPOJ16\n2dIssCujIPHEj3kkTd6gHeIoF/FNCfqA+nx4mz+fs2iBFARqaxXMsyVUJ6So\nGcZE/wvuEQa2BF2yqdR+tw25Ges5bbU0MGUlhISPdGimc7m60wgrkn1aFWFc\n1wYT/D6+1mUEI/J1UP3I0TVVbbccoSqwPgSqRNwELHobVGtZGTAs3Gwxd6Nu\nSmEtXbGoD3HAL0LPmzAczNs9WX72XqDxUetFAJL/UNTnnZqIDEXvvrSWBAiM\nSb7TIpmvasxSHK0Ofad/IHToYN2JtAso2o2ju72moqshqDT/fEJKuW62+THg\nTAb1mQpRr8MTBtzAu8e9ZO+yxW0VnEdEtr2hIghUkAajrnTdpWR4JyN2cOHA\n9LT3Ugisf8pRnt4SJYHUDtwXRj8PlcJJjxl3M6zYVNbJWtNvO/DhMG7gt2fe\nvYE3\r\n=4zm8\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=10.x.x"},"gitHead":"456175663c8003f2751dd362425471aa1c64eb96","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.4.0","@apollosproject/apollo-server-env-mock":"^2.4.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.4.0_1616027028263_0.1353260488564958","host":"s3://npm-registry-packages"}},"2.4.1-canary.4":{"name":"@apollosproject/data-connector-rock","version":"2.4.1-canary.4","_id":"@apollosproject/data-connector-rock@2.4.1-canary.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3483bfcc4445c48cc59c89f794c525eeddc2dd9a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.4.1-canary.4.tgz","fileCount":164,"integrity":"sha512-zbrJlwDhuOhpcJ/1IznlKCefAsdlcpxZMOXmsPgnAKSWfabPt9AizpWAb4Fhelw7d0O3W/NrjM3SRLnfVEJe5Q==","signatures":[{"sig":"MEYCIQDj8CLbo/IjkJSTSiaeseiNDRUlG3i/qCmFGpjq1+UK1QIhAIp8RSiTDSQHjhKu59Hg+2E9iE+hTNhAOOTZprCVf4Cz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVqf5CRA9TVsSAnZWagAAfT0P/0VI+tVXUXMaIrxFfzCE\nzMtP4VzPIBpSb3XFT0wRj0IXcYQR5hHPADI8CUGsI72ilH1+XrOpw/r/nhSq\n+1UJS83ZNinupGXOd7Z5A+q7gGUPYPc0BU+XdOv7XHIgIkOr+CjoAk9i2nIc\nUajvqDCD78dAFmOc6A9MvED5JOo8MaE5dxSrlEUSkg8Uy3SxX2BRAfwrEgyq\nqsidxsyhW4XcSrcq43S8cnTbarmnnaRGJ9eukDChdp27WzRv5dt2GIVSWC43\n9QIYw7IDjTxj1HzcptuA5yQRBhQ7BHpUk1dtEb7fPqFwClezD9T6oMzH66Rb\nvOzwQd7lCjrsQ4BC/zSwszWvIgNqMP1P4kJw5Fuv5gRndkGmGMLY95g3KNaO\nAHLRWo5758J6YOm3MufXF1K3fU7u5zomIYw6NAJPELjDt/UgRBqKsaNEe5uH\nXL2drRMjg8ovMNG0CcdZMAUPT8263l0hUbZi0eIwOXsG6KE9rcl/FSvQu39Q\nmMebzM/zbJ7+jp89doy8yZJ4TjhWtIizEyY+MFo1BilYcEeVWw4yHXg07/h9\nVKRuejD+yJv/Vlij5WZ7RgVqAweG5Lvo0DZjTo6Mo4s9ohtYtBC5cI5qEeOF\nSK4F8Ty7xjvYoyI4tIqqRXrLbAuWyA8zqcb3OxEZBryHiQvdcPhwH1leI+Ya\nXENx\r\n=rj9X\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"16e35562198d9b0049e067075c53f9f9aab0d25f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.4.1-canary.4+16e35562"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.4.0","@apollosproject/apollo-server-env-mock":"^2.4.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.4.1-canary.4_1616291832945_0.832239777142493","host":"s3://npm-registry-packages"}},"2.4.1-canary.6":{"name":"@apollosproject/data-connector-rock","version":"2.4.1-canary.6","_id":"@apollosproject/data-connector-rock@2.4.1-canary.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d5e184411087d3dd0afb592bb16d19da2b3fe8ea","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.4.1-canary.6.tgz","fileCount":164,"integrity":"sha512-YoDf9fAjYyXcjxUUmlvP1W3W80FJ1i4tLxFC5qvoHPEwCQ2efInY640c69uFwvLOT0zJu5noRN5k641KXTHPaQ==","signatures":[{"sig":"MEUCIHH+A3g8FaAnkJOYUMZLYb86ihAaCzh9Be1Fw9+CjnmvAiEAheldmsA2KHSuRRBBDehGA72X1+R0jOcKgVo/Lu70JtU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWNAcCRA9TVsSAnZWagAAdgAP/jRNhZBun4yZZvXeVGs1\nDOaiQuWONvl5PGR5UawTKSEZTcnjunj3T8DyfqL0HTsGZG39wHgzHzMgzF7L\nYsNfgou632b86Ii5sZ9CnuY4yqEEDVr7XrZV8XlkYbzCeKNUBMihzzxU8sVo\nRHdC+ojoybrvwiD9nZ59X5vd6ks+rRVSeY6YBbEvEvdhrqNk1P95NiMokAIU\nd6tkN7Q8MAY7I+DmMs4gwUrEMWa7UqeI0fMoviXK2ANfmImpfuX1wRQKNBcz\nXb9fmyO504vmVBIY0Ek4yYrzpkgWv+Q/Eau0fO9gYP+to92j++SoxcAqje19\nLhCuo8IkAP2chD2gIgWdcYim2A7KADqrw/GsjWjZh7BAlf2+jc7Zedmv+t7P\n1z/jAZHOaA5AvqY5Nz/69sdBzD6Fyycyc+raSPgodw3LBJcbpSHl0OgkHt1b\nWCnZ8QWlljTFH5RqW/UgkIgLfrBnmoueFv9p3Hc9DBg3Jl8/GhAnZM0WWzPB\nHJ1sR2vgKhiJdHQT1w8Ch090ZtfZ2SB/CcbxluthzK48OQ3AgWd/Qrr0nVxO\ny2Mguc2ym0+c30HcP5UuBWnsEUazWHeCmvnvszhSXRa0lQ/3TnXRfemH/HQv\nivH3B3vDGH+soCNlaYJM12hRtBsnkY4cd2rJfGIOHhXBQSZIqtX7sLjLm41c\ngA8A\r\n=HWHF\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"14ba52d28011d2ba579dab65e6a102b7e85e8cbd","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.4.0","@apollosproject/apollo-server-env-mock":"^2.4.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.4.1-canary.6_1616433179505_0.4453308571468668","host":"s3://npm-registry-packages"}},"2.5.0":{"name":"@apollosproject/data-connector-rock","version":"2.5.0","_id":"@apollosproject/data-connector-rock@2.5.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"76e6c211a656bd4c80d025ef65f82f7742177bc1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.5.0.tgz","fileCount":164,"integrity":"sha512-SBB42WuUhOLSEy6SInHL3dcv12y0AxCdVQOi8UgqzDLp2HLHUzm6XHf7aCZg/d1W4hybTLXhlrAQ4HmNB6HOIQ==","signatures":[{"sig":"MEQCIGbyzVqOYCdXRoJsvvWP9NigEh7I0yq0ySKAqSBSksYfAiAl5AbCdwFDHDz10IoJ9zhxh2N65cMeI1/INKP2dH9PIQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWOkrCRA9TVsSAnZWagAA02kP/RPnJShDPBkljY9c6F9c\nMogvpJIBzBTBQpL/rCy3S+O3ELzq306+Hyxlj3uudUwiH1kKndIGQ5ZOQxgB\niTl7AXadJuggScOHUjFfgqRqgdKZ92gd1j1+5/jjR/wWGr+xnE4CMqZ+nQqs\n+/2WYsQnNub0PHZUATyrYK/7095v6ITcETCN4yQeWgpT5sCYg0qPIyTspp2P\ngmV5z7NjaotkzmN740i9tGl2L1EQj2hPE4MK93QD9pgr6LWXZG2p8Jj83Rey\n+mMqoGuiT6YHYxq7LXfsipkI2ZVjsRsVtmHDeOds3+Il0g+PgHuRK3eaaIoN\n1xWwYPpqwqTWIDAKyBxnuXzGIlmnSwhExgVneXxXOr1Kr5czFbV/7GQ13pRq\nRP5ISuCj07KuixLMRlqX7Rw8L+nm8s0BqNONTJg5AdvzwJJqcVgsnEo/XyGN\nqrM2ALHS/1AgTx9YoCaw7MsOBQT6k/MyDaBuF+ixhwYQQ9xM4XxbkB1e6Rnf\nNjGfAIjO0JjbraCLq6luX7nfnVog0YAZYOwfmF0DsRjk39TV+4Pks4cmP2Hr\nRnzDeYxu4xH5jfjlc8P8ItGxlFLoHFsYF5n1RQKFPFgw4YZ+iVsRBHvg181N\nEOZqnPKSkFQQOfnXAZhkO2S9mcPRlSuIR/6EVQx03ebzOid5SJtCJcPBJ8s2\nX14/\r\n=YL/W\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=10.x.x"},"gitHead":"a242b98bd2129e3a3edde14908dc817930a29475","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.5.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.5.0","@apollosproject/apollo-server-env-mock":"^2.5.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.5.0_1616439595407_0.5464233001427836","host":"s3://npm-registry-packages"}},"2.6.0":{"name":"@apollosproject/data-connector-rock","version":"2.6.0","_id":"@apollosproject/data-connector-rock@2.6.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6ebe5a0c8ff73c5ea32c6f20d1df7ca1d391de9a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.6.0.tgz","fileCount":164,"integrity":"sha512-i7jSRtZv8UqQ0mc2WIpAQKOkfOgdQyrTmLW/6+TkqZhS31yJbUv+ct6R7l+ZDFnLW7ukslcpiUJ2U+Yxx3lTEg==","signatures":[{"sig":"MEQCICYvuT5CnUG5k+Zav8dFoAanOjGs5MYwLfsqOfgeSW6/AiBGjSEe9L5cTjEdGOFRUjbkj+LO9RjVYQchefLtdaeb2Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030145,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW5pKCRA9TVsSAnZWagAA8o0P/RlFRBqrAhFyuB9Fya/D\n/+PJZB/GDMoC6vT9KeiVmW3i/FOJlKOcUw7tU4Bzzll7qXEmTFPJpBbWq7bM\nlcq0IYVDmWIAtE6CBgXBjr2CHz5CIcHs6614LmIxCCq3FY/1Z8aLHRzzYbeh\nTuWPd8HPspM8DHGzNAtdSPxuNwBb5fnQZ3tDDeg27BhPvBoPj6TTLhAwF2iA\nA63Ov9Y5f94BP/OteHo4oGzELvwp+KKDV383NB45bh2cqUYIw3KLQFlxqniD\nBRH9GaLeuiFHPRWWqJ21dWECfMW1qynfRBbKtNCxhJ+U4N9NFUuBDfCgwMxH\n/JU3PHYB17/lra7Nktu+df3MRlgCgoCuGNb4B/ENsR+wzBNJbmhfBLpExf50\nZQrJ/k26pLjR8LuHeU21/HgiFS9sb3LTSNjNPq9jy5utbdnem3c5iD2/78o2\nrvE2HUwMhrSOb0lsRpSxre1+pZSsfPnq+UtBqeTQWktS5xj4s5y5cK7/iNz1\nzT3VSyWebfDNk+F+N9ThH9oWfCjSwtGNxawNKEMc/IpDsrP6im69pXkl8/xZ\nFEm78+63JNPznLO82kcoOW3rZFSUOFWKTg0QXZNpxNYcgPnUIiwBRAwUXQ+/\nG7e++jSFnimEJoRM+cZAOwCPAGuNogtCGqJ7k+e12hClPgPeRoa26CctltUz\nD07N\r\n=jeNB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=10.x.x"},"gitHead":"0976a22383bad628124850d6ebb9d9f5cbbdc1ac","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"yungvincenzo","email":"vince@classyh.at"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.19.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.6.0","@apollosproject/apollo-server-env-mock":"^2.6.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.6.0_1616616009528_0.21337560893417762","host":"s3://npm-registry-packages"}},"2.6.1-canary.6":{"name":"@apollosproject/data-connector-rock","version":"2.6.1-canary.6","_id":"@apollosproject/data-connector-rock@2.6.1-canary.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"81da9af70de3e11bc53c6ce60e9121c9c03e36ab","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.6.1-canary.6.tgz","fileCount":164,"integrity":"sha512-I47qKC6LyucBIRE0iYhR80VaZYgf6Cl860+Ntnv2pGe8tKlsmKIOmy6KdSJaYP7FLw/0d6Gj8jwCLT76EbLgvQ==","signatures":[{"sig":"MEUCIQCCuRTtWRSmV+n7jJ5ty+1XXpPTcwWbyD0WAYXHBQSpQAIgPfu7Kqa6h/au1ly1e6riE2JxZQn4yHa7Yv6yhZDnkYQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXMTBCRA9TVsSAnZWagAAfvMP/0PVTVxPaAQJXbKtmYUm\nAKbaQ9S+WTQw9nQC8z/fxbCP9+JvgHSZeX/j5odtPoy93NJYYFiG9uOoyUf9\nkj0FQZlsldIDDCAbtuyA8kvsKHh0vHVW66CkFtJjQInfYCMkdhx/gdcoid7L\nCEPjDjPsDL9b9tW7wMaNP1LJ7O/wRpVHix1B/pG0iWFhkbjWsuF+xpYIQvz/\n9o8xxSyl9PyZussWJcpzq7wo+mwR4mvdUZURNr4b/kiMr8ZY8XCbnDUFHamq\n94WNKZDqR0yY5RH9P79/nYhDKawaWsWSWsWl0Q0rwMzSHPG+499fDWNgQlCm\nwlbs2xITmgPp7JdkGppjPBpoyqJCmBrBhh9m2Vi5hAuzW8FZclKPjGFr7KYP\n686r6ynmIWs8Ll/TI1ZQ61esv3y015GSrt18JWw9hkz0UhT7N9ULrFSmQM63\n/eW6ZBt+muInmcun39AEMb2iHne+OaeLt+gX34Om4mQn9YEViSAn9eqv3K3M\n37cvlnSddsqfdaC/Qp7/IMLx3gwkEqV6Rb2jb+RP1+ZfAkKsZn8FDMbCggK7\nPt9FW4XU1i35yPZsg3Rab80s1xsplYIjJUu64GCSzsnRYiM8RuFUIp1Q9R12\n8z7B/7GMNG/SHTjNzgDOZOXb9joiURIwJdPJ6/T+P00c+o8yclKvU+Vq9EoP\nYjTN\r\n=+fce\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"4590af7c4299d3e7e0643b25385d82cfc7891ada","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.6.1-canary.6+4590af7c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.6.0","@apollosproject/apollo-server-env-mock":"^2.6.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.6.1-canary.6_1616692416972_0.48398178138568104","host":"s3://npm-registry-packages"}},"2.7.0":{"name":"@apollosproject/data-connector-rock","version":"2.7.0","_id":"@apollosproject/data-connector-rock@2.7.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5ea80cd212caf927a8e782a0b37013708c45451b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.7.0.tgz","fileCount":164,"integrity":"sha512-bqlLlz/zXadqE0rINLOs8ePxfocy8DGxSHODOvqVeuOZjruvG3lNAvxDpzA0SQZsOM87HEgq7R5nL/TmukipNg==","signatures":[{"sig":"MEQCIHaoONy0Ej8LSeXfCxsxQ5+nD3zAUTaMQoxCC6dGGfoAAiBfaSnLiYmfMK28fpuHrIHCwYuxcQ54n6kAOgvZToRGmQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXMpfCRA9TVsSAnZWagAAC50P/2zG7O7jLSNfLWVxKAAI\nrfofMRkeCAGKAkTgaEBUErsFRjL2sQkX9u06q4HsOeJ6z8f6LwFrY6QWcDht\nWvC16hd+bPT8IxoZ4vG1PkPAh7hAdarM/OT9oe9l0WJ94oWKkdUUrzVs/PjE\n2TAa/UT6Bq3YQYmr+vCnlglCOttVcFk51xyzWRz5MPU7yfW18PHLP66cOjqM\nAD7YgXoOO0eCZ5hgs3OMJMQWgETc7GQ4cEFQoVPzPh0inkLrwnRrOcILalq/\nYARZMzeE7/qSKqecKKFnTFWHRCQfsGgwMZzqqWyVWwoVOa/WEtVhg/1Tk+cB\n1ZaheGs8dMFfrVEPAXyCukHuPPOYfPnibRYCyvTtsEAxd0XAbzZx/z6KhDq4\nZh6m3Y3YGVzLhp3HovcOB1kDUeMmAjVO+POtG59LaIsWn2tpnOi3+gr3EfP1\niPu6U1muaSVsGH+SGpZME5HjdDEi00L3kieBMykEThGhfynRvNEM/RClKmtk\nXfra4E/RP5WeUO9KAktnpjittNppMqWkBaSEFhRP5SnKQVXObeRhxxmj+NWQ\nzbhudsV2N/2fGLMLHfc6nBZOmoJrzkGIWHAyr5evDK2yk8AB83UViRZ6Fg1p\nEdft87D0tyDx1VHmQdBs0LYyVOJKhj9bEy24YOfC9iqqIqDmJjXMrNeJw8MO\nXRrA\r\n=9DQG\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=10.x.x"},"gitHead":"e0ca94fbccbbe278b580b71d4b415c8779454fee","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.7.0","@apollosproject/apollo-server-env-mock":"^2.7.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.7.0_1616693855273_0.1985287504336508","host":"s3://npm-registry-packages"}},"2.7.1-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.7.1-canary.0","_id":"@apollosproject/data-connector-rock@2.7.1-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6c7fc5116a942234f718179c0326ed550e7fbad1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.7.1-canary.0.tgz","fileCount":164,"integrity":"sha512-GvL3kDunLdF/lVrIECw7jm4UGcYpya2Tj17/OOzgUyGP4FdEFk6xm91KKS8WcVIszKVClirx3ZGXQKs8J2oI+g==","signatures":[{"sig":"MEUCIHaELSB1ZW/QsIcnUTaKoE8crHgR3qoTlpHAfZxvMA/cAiEAiuIjb4/9HGL1rykYO45UoDWxzBdhDftwhoRoOfDPjOM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXMrKCRA9TVsSAnZWagAAnqEP+QA8ISFPx9bQ0sYfEVPL\n8uz9e9eqBLtbxuMj8Ht1YdaI/vK6agV0R7u+4O96/bfW9JkjLm504Wps6g/g\nenMQfGT8Rep/3jRYWi0XsHyMAY3s0uQrk1RcvwPDC/U8seoYRA66S6YetGmq\nrMBZm6GHS3Yi8CTSIXF8noMOTHu4qJVOzGltBehZ112WIKke4czGvgoFMUjv\nqYjnF8M8Y5SG7jZkIoiJjKRbvFqtXOL8zJ9KUnxJ7lQSFeGOwC24oI+dMk+n\nQLuSV5ISppWEIOAcbJX467jlK8/OXmX5AjNa7v8KIaHcYuvZSdH8OIHW6PV6\n+UMaCWeKv7POafNQce3wmnEemBHK8rtsNqGx1Qv1eO72NeL6Um5sMTVyCxgr\nNvPspatpJlT98HKc/mLzKnq7SExg1v9TYwhWUSRf9ZUqZ6U1cxUAhSlYSI3L\nWxG5OFsVtx46vNhn4EfodheZDw86gUGHOhZZCIGA0a0eA/SMth9YmCfAlGuY\nem1sngvU0eJ4u94hj2/6I0/Y1WWZVONjaopx28xDenAFwB9OqGg8zS6mNst8\nF2blJHiwTl9X/7iLb3R2CPx49pPp9Y667Iy+41gjrTRn0ZjwE2Dq3PZXYSQU\np7+12NSTWSJIFNLaxIpuDTzUIXy7nQWNrrEIouJ+3OwivBC8ktOxEvfy21Tf\nytQU\r\n=k8JZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"e0ca94fbccbbe278b580b71d4b415c8779454fee","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.7.1-canary.0+e0ca94fb"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.7.1-canary.0+e0ca94fb","@apollosproject/apollo-server-env-mock":"^2.7.1-canary.0+e0ca94fb"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.7.1-canary.0_1616693962203_0.9860205388369228","host":"s3://npm-registry-packages"}},"2.8.0":{"name":"@apollosproject/data-connector-rock","version":"2.8.0","_id":"@apollosproject/data-connector-rock@2.8.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"28dcb471fce3ddcdb18982cb40baee6488984c78","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.8.0.tgz","fileCount":164,"integrity":"sha512-Z9yJ3G9e1s4yTwKzoH/q7WA9G/naL/k19e1RJPtxHevvrFGwWEzDXifwBmUUpIMsBxyrX7jxlqszT6E4o95KgQ==","signatures":[{"sig":"MEUCIB2nlYh526VTHTMG+CSI8owSpty1Pb0pXvN9s8tIxo9FAiEAtNBi5I+jjOWCnDdqL16BVPhngDaoXFALbZcgkW3YE94=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYcfNCRA9TVsSAnZWagAAnXMP/iHab/aLMX2n5HFe+KK5\ngqH87fspWMCQrgQ6dpJ9GE1jgIzAeYUMhyn/EuqTDAZqo7NrJ1VI9M0rM2PO\nZjeXgF6U8HC5h8JUd2wGIBGDu0B6FBCgK1LMZ0mJgxlyvuyAHjz9I7YThGpL\n/1oW5RSG+gyBWNvSPJ8FyYxelv0ufjkZa1XwvUsVzm34irCg5nY9EqO1vPUX\nWG9w3E3pE8ma9Z0uDYapcbyQ61GHAF0YrNdqwNphDN1gYuFk4s+Rq4U1+5Vp\n+LAIlND6cnKERlSCZgmEOScmn6yiDGYO+owa+fYf1XymQlRs8zI15kiUDme+\nSJlRYBbjQIS6W6ekrJ3sR3GGs54DWWMUxefZGP9IGLR6GCeywFncMMfAp+X2\n1pwweWU08cBSbLpRz63CFnRjawqZMWbZukjviXvkZSbpE1hpOCTc3klmP18U\nM/+IwSdd5jCQe1DGe1NGZjfZ6xOugFkNZug6u/DbeJdKF5gEQhLWcPK3UStj\n12WEEGg+ZmeaWQ98lLvf0B5ibz/R07s6crjVIMnnV8socaXgysCCapzRa0j/\nMI3IC8QsfedvqoWVB4emsvX8ctOB7E3iuI7bZXVPkgK74z1RPRIfs+7is9z7\nRyGrwJpDon63DDTfeoQ8DR1RzW5fZ8o/1I4H+6zPeuWitY0Aid6pOQSVnb1y\nclsj\r\n=d1rM\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=10.x.x"},"gitHead":"36d68e0c3e11cb07bc217a9e13cdd3466437ca79","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.8.0","@apollosproject/apollo-server-env-mock":"^2.8.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.8.0_1617020877338_0.9936097080583657","host":"s3://npm-registry-packages"}},"2.8.1-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.8.1-canary.0","_id":"@apollosproject/data-connector-rock@2.8.1-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3ecf8ef57c51113491511b923278f93abf7c797b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.8.1-canary.0.tgz","fileCount":164,"integrity":"sha512-Enop30FKMauVMRopz6NI7YIuHppgsrvHlMy/kwJMRr4mzVYXbssN42UW15QwJlujSuuJSNT/PeGx6PXCdA5ifg==","signatures":[{"sig":"MEYCIQDMrWRiIZvPNp6/Ahxv+sgvaG1O8yJ5idfdKLjIOr+pbAIhAIE+xezQRz2393pqvNcan+dOeO//gRFDCQWK5ynnwJxh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYcg+CRA9TVsSAnZWagAApDgP/j/mPW2WzJFmAtqGJBoo\nRzKtZ4zEWgcXCFONAirCOdAjXzWktWzraCCDcSfWMBQZwUhCBATIlGizzeew\n+g4W0fJLgqdMZQLdQgNY6P7Qq/dStjVrNV+2HgvqHnHuUt4BXiyiuPTaUwLe\nicnGqyEz42nCTwczq68Fvy06lkKurk+2YdZwdfWJNyh54ngZsbSc5hu1Dx6B\nzOI/BT6B7VPrtv4A9GYJuBxrlEDTaRMjgZxmaAoRCGrmWlUtX5dzVGDoiB8s\nnktsgdi9YG2tMIcF0CU0mHIUWFBG15/VIocJesFpVusUe4zXAJYAoewJRwU7\nhGfLPu+XSdP0NzRLQ6FiZPKosSXIQ7FNePlwIdKk/3OR/spqwSF57N4zs+tb\nAD9NZ3ZzwAcCTUV35US/3D4K8Gz0qCTPQwIe37Fv5vNFYTbvw1u90DoyzFjB\nHAdAjMdzIZURLiK+Fblcx8zk69Q6v5bkoM5YqKPYuy9tyoeI10FBkeRhkslk\nxiEPybLSw+PA1x+f3VnTyhdVpZVloLws6EgYI6LWDBwuIZVQOSg/aZDj0oCF\nDTBQ6lB4CijPbEqLq8uT2ByBp2qk3pJhDMbk7tVHL5g1SdprBVsPQqZU8lQ7\nE9DJJHoA6aVQmbcM+ZDtIuVWIWXPo4Ni71QhWDJKZKoPupXnVBzLJZZF8XUv\nv3j6\r\n=8Kec\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"36d68e0c3e11cb07bc217a9e13cdd3466437ca79","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.8.1-canary.0+36d68e0c"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.8.1-canary.0+36d68e0c","@apollosproject/apollo-server-env-mock":"^2.8.1-canary.0+36d68e0c"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.8.1-canary.0_1617020989634_0.5647984287453507","host":"s3://npm-registry-packages"}},"2.8.1-canary.2":{"name":"@apollosproject/data-connector-rock","version":"2.8.1-canary.2","_id":"@apollosproject/data-connector-rock@2.8.1-canary.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7963272e32de614de9bc17fe40a200623f8a4f86","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.8.1-canary.2.tgz","fileCount":160,"integrity":"sha512-LeQm+I2RR0fPQPvvNQ6g4RKHzRPsvUnbro+YbphO2ne/G0cSSnY08TD6g8MvJ8hyu1MMiJoWkGVoXbzNOt5s0Q==","signatures":[{"sig":"MEUCIQD1cQJNN09he1Jd0in3CWpGMnSZwDEYNdm2Fsg4Mj6bBQIgCc1buWRRX3OIL4n4CuNEeIObUJA+rNSbYi96RGy9ZLE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYepLCRA9TVsSAnZWagAAAr8QAIJRKqPEUbhSY1Hqy2vW\nhg4uTYHLGRmLf47wPENtXfPvImLNIrYFsbfSaGupdTSe7TWLogxOZaJCiTtW\n8T7mw7r5vtrWDpxzYlLGQkj1KqGf5dCES07Sqtls2Fhz1NcnzUAfDp8AAM8L\nzlf9uQz9O8go3Xinw7gUm8bzk/iuvD089oY53oe1GPeOTm8zUlmBft6cIoB4\nxk3gM+u3pIPxT8Cu4Ih5A0pNNfQjL77cGRycLCuFnxuyrRngW/EtT+ZI6eh3\nb5ZZCtfhBxyshU9xyagSyyPHBVmYqGatzOQ37I3wXaq7X7KbxxVg3sVzh6r9\n03t/ImThyvTKA/QDTLRjZwa6Q5WXzd6lQl99jKWUzaCFdRNLEofzb0MCObae\nkQ2lLGWX1vRU/ssQhRcySKpPEt+08zUtL0lfk6Hu/HLq9/0uLhwxF5Qxgioj\n1DzAink1WWF6lqDSd+ugx4z/fsPXv5r9/3Kww01rNAZCxUmPJHRrPGybDgh1\nCCakyzDiMD6x10LRNhQo7S/mt54xAzYopMISmlFvK7jH9Byvh/eHUIjrJU4S\nrMlSlrn7NGk1VTTjs9kWk5AF+ijX4OX42/Q2v4gTHGlbL7nCEBIW5hv21Zdm\nZVV2QfHPzJXdmOxJBO/JegfgoyWjikwcmj+LDtZmMA7GAL3eR6KsJRClYlua\nipB9\r\n=yE/Y\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"80a4fb8ebcf8678241ae85cce6cb67cffcc6a2a6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.8.0","@apollosproject/apollo-server-env-mock":"^2.8.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.8.1-canary.2_1617029707397_0.18482801902497514","host":"s3://npm-registry-packages"}},"2.9.0":{"name":"@apollosproject/data-connector-rock","version":"2.9.0","_id":"@apollosproject/data-connector-rock@2.9.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"96dd9f388455f470cca8fc855a665fc7fa582eaf","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.9.0.tgz","fileCount":160,"integrity":"sha512-S6T85zc45KPrF5nCSUUGNA1JJjBTWLAbb7UnemB3oBaKcmEoUrD4lmApRN6ZNTv9lY69SRO3RRhi/jRxHDIY+A==","signatures":[{"sig":"MEYCIQDn2fS8bbv9Mnw6Zjwda1PwNRTA/y3Po5mSi4YWU6QTiwIhAM7x1lzPVwCTemK0XZo3Dy6bXk9SoNMGdK27BIHpzfau","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYxZ/CRA9TVsSAnZWagAAcA8P/0s1Et7OWAl350QkuPyS\n9W6n5exiyTOT6+wHmYkR3LYJoc+vKnurJDf0xJM89VrkkoQP4p1hHJnstmMe\nmCONIjM2Pucu13/kjTbIqiI/pFrUNpRG1mJ6yeDgHLbHLRT+sELffA8rW8nP\no3l+ldAWxhASsVRY5FJH2l5PsglGysu2LKd3EiJIEfIBTM8hULB3/BQNHPeY\nDCKhbHdaV2EddYcl5AtgSIZp+wGCiYfpxkHZM5fTykfzYoPE2vOVApzNmJsx\nzG5Y13R5GIYM13gHnITnfi1r6TtaENCHcnjuHZPqY+yN205uHhzaFzeKoPjd\n8v86hMDbOuoujBYhqhKvDJNvia7v+Nz1dF/MOaPuRm3V17zYakDQrS1Rvdcw\nHjMAvWF+0Nk+mVM+N68Cv46FWE4rHLCCBPC8aBggF7dJRlY1sik0I1bhyMh8\n/u++1Qc5jrdyN1MLV7O1Rvum+dQZh16505HJBwh90lLfc/GYE+vX40hHrN7D\ncpBT/iz8ND6TvIl556renL2XutunHQM/odlD4ed/Ej/hG4/QjEynzj4HH8RR\n/pVhctBTC5YZbKY3gWW9QsPea+NK6KzgLF8yVN00PvPymajiBnnlaa3/SguG\nVdGggLMcXWRlpfUiwzXOA0iHpGDt8HOSXodzImHxdmzwOSe5cdowczgaG9Yg\nz5FZ\r\n=zgEz\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=10.x.x"},"gitHead":"8555fb7dacca51f7c5bec4d40e013fe6babe64fe","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.9.0","@apollosproject/apollo-server-env-mock":"^2.9.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.9.0_1617106559272_0.02500749695300608","host":"s3://npm-registry-packages"}},"2.9.1-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.9.1-canary.0","_id":"@apollosproject/data-connector-rock@2.9.1-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"05a6c9f6ff69987de37140f797e0c516b309899a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.9.1-canary.0.tgz","fileCount":160,"integrity":"sha512-jc5SiSguMoIafBinVuvicXMHwVWP0xp9AKODfDprgh5b8UEkx0w1JlqcMUpkG6rVqxUnzr4836eId+kLEfgjQg==","signatures":[{"sig":"MEQCIB8uEWFS7sqsDyzh0gABUOPZ6pqOS2TqEwi8S8W05DBGAiAR5yNNhy4Q1IfJtgBfBkS0KKDpS6IcD/WZSJWOd7VItg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYxbrCRA9TVsSAnZWagAAqzUP/3szFtR4hA5BjpU2TrYA\n714CM8OHCmsJ3cZ5meEWLad9nwlINLTsA2B00TtTbW17Xv8gIWdWvg90aPc5\nHqRN7CqNFOMGHYxHqMwcd69LdU7ik3c3+PZo8aKlvq1qp5NbqVXgvJCrbZeU\nlBlONap00VRlvoocijlRADbbbiTwZY92RGD8zuY85OnDCR2F8YK6wbO5lSvp\nG7GffsTbEesD3tDO7bYW0Clx4s00y09XWycYOVcv86ZYimGM6UHPuqlnZYds\n7KfcSznuHIoviUcK2yub567xjOUOEEPFoeK7v3MUJ3mmqAkWXjBPKJxrAYfO\n2EalDRhnr45BEeRUmMqgCDZEcwvSkOFjSOJc9WPshxM3eM9V8fU3bazxr4Y1\n8r3KKR1TaWS7Uw4XyePLCMjUbruAcj3V6erxyclmvObVD+c28pF/GXKeSHry\nOb+lezZNH9KCA60NwpP+BwiWY+orbjlP5tMo91RtTVk9YhWAZ/zgmhVrf3YT\nVZjTr2SHpp40OzRiHAmKJSCu7KCbQ2k2HKAXOJIvATnwAgrqZYZPzzKVCJll\nu0eJypU5qVT9BU+mJFVBe9JA+137m/+86kxeLrIfB76OZNaCrUgtpdcLzU1k\nj0W8RB3cTmPLkm9rLP82+FdzVFj3Lgpc9xG/pZFFZLiJDOAlMdWuOVZwRipE\nczue\r\n=iYWE\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"8555fb7dacca51f7c5bec4d40e013fe6babe64fe","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.9.1-canary.0+8555fb7d"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.9.1-canary.0+8555fb7d","@apollosproject/apollo-server-env-mock":"^2.9.1-canary.0+8555fb7d"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.9.1-canary.0_1617106666612_0.552936837303746","host":"s3://npm-registry-packages"}},"2.9.1-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.9.1-canary.1","_id":"@apollosproject/data-connector-rock@2.9.1-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f60d69fa574b0e72a233162bf0ed769a5b911948","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.9.1-canary.1.tgz","fileCount":160,"integrity":"sha512-HFCdo5hENUSxZyylNuJaMnjOXfhpod9mNLtFnTIYtMfgcT1KogMc87nPESHQGCOsMiZQ9B1nlvCz9OJakCA8WA==","signatures":[{"sig":"MEUCIQDWka6SNnERTJse/WvzplEzGnHTYJl2yPEWqxYV9Z8EUwIgEhS9o2rlc1OcpqSXGV3dbnF2lYyvNs466RT+u3luNa4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY0hVCRA9TVsSAnZWagAAwD4QAJaUYP5Br7KDH42A+O8o\nTWWoMOWxfujaQU3EoNZveWb3GRukEy7UHoreIJCZoGytVF4EZwD6VDQmsn2A\nMaoNBq1sMg66qeAjsxqQalA61enHCzYsPqSTF300OAxEdaCINM3kdEYeEiUe\nnZUiOlCvQqDfcTP3pWoxLxtNnLXm+Qc3oz70lsVUgLz9cAmZAj3zTR6Fn44R\ntrr+CRsJmdNF2Uyw++ULVsCW21jHlll5f2ENWfcYWzjvq6AxNmwD1iq5hzcX\nq2covmDiIlN44G6CYWuYO8TIswctd+aIjg1v125I0aytG5guXTs3x+CF5OtL\nCNEppfcaLWXFxYpVUWhQkxbq/LAH0TXq6VzihEo3aeseyTxwuxDyJRttdp1r\nQHJLLz92JQPgllW+SZiFbbAH3CYCuYluR/AA2KNsPAv0jWZ8WNiZOlO+MuGL\nopKnJNOBiQTpmEtBo6eDsdmwGPC2d25wWwLHh1ozbeoIx71B1U8ghlrOq3e1\nuL8YOi5lSTpAtuN/1C4sGVMPh528LmLGjUtJERmSr+eShY6W/pyS3HAXa0oU\nUqWH5LMLpBshoOLLc5sYKm0VAamKrCOFGXcONcjJfxpzFlrbBa3V+yfdYqro\ndPt4yJkq4uRO3BvLbRLdG0CY+D+ZLmpDqLM8yP7/Xo8rTrHhm78ND7hwx9Iq\nCANF\r\n=/ZQ4\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"1210d6e3ad50a921fefda91cb9df99a3ee0151a1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.23.0+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.23.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.9.1-canary.1+1210d6e3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.9.1-canary.1+1210d6e3","@apollosproject/apollo-server-env-mock":"^2.9.1-canary.1+1210d6e3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.9.1-canary.1_1617119317252_0.7667932237346333","host":"s3://npm-registry-packages"}},"2.9.1-canary.3":{"name":"@apollosproject/data-connector-rock","version":"2.9.1-canary.3","_id":"@apollosproject/data-connector-rock@2.9.1-canary.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e6828554f0b63ba31c544068d4dfc9db38d7424a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.9.1-canary.3.tgz","fileCount":160,"integrity":"sha512-FOX7+X7l75ysrXfkMoHjs0MbJ9ZO08s/iymdoG4vfspucfGXElQmS37qraPozSZi+JcDqJv6XULEJw3KijiCsQ==","signatures":[{"sig":"MEUCIC0eBYdZZii3T8zYyQ007AeYavwVn/xAFZ91xQPzhwMpAiEAoHfa2OCx48FljjE4VPNbooG5/xpKQaNaqlpCyGXJr7g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZJLxCRA9TVsSAnZWagAA0QcP/i6kX8aPePfUfyiPg+nm\nuenv/NCz5ki/przfFiixQJnigIwCEGAIh+doGwHDjqpXYD2lRGDuf7akljd6\niIfdoFeSVtFycuPKCwRG2FJTQz1AWD1Cvm6mfTyBaxtQ2xxEwHVICmPxrPYN\n5hb4aB4MYZ+Xhye0n3+mTErJMgqm9sW0oawPG9pvbdT+uKCeWMe7yRIYEFyq\nCjj4eeyWJi6n1Pwk/8liMsYh6obuRv54VLl0mqTz+vEq6BJRA2n2qSxXBtYx\np/gET4ZPcqXnw1ZX72LaIkhrfTOfEqBgipnVDx/h3X4TQL8BiAhowL4nnv9h\niRFpJkKOS2wSmGGlZ/axtec35y2wP+PMdlZsfGylUEN9JNq0whrC0DAHIHkq\nkCVj6C7D4D1JMVFqYd27xsn0VQWmEFyyVzqXJ3X6816EmKjlNVBczHyQlWD+\nq0HAP+JWGoLFZWLBANQHjuBeO2UHlTll0UZRLNathw3XesvjnprwvApow/oL\nZm8rfdI/hHw9i/2hLbNjD4UVP6Ty9bG1q03x+whCJETGHZrzGCGZnageqH+P\nNTKBSlrI6ha3oR+PgvvqNsXnxZDfvPWccKl/EKWab50lBSMAirrBOuqTKgtk\nRKJiB8sRpff0yayg6ryTs+wP3++VJmWH9sWcmu9wEI2E4RP9HYPbC8E2XOdF\nWPpk\r\n=g76Y\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"067c236688e3eeb6bd681ac8ccdf736eeb66502e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.9.0","@apollosproject/apollo-server-env-mock":"^2.9.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.9.1-canary.3_1617203952509_0.8022970745347626","host":"s3://npm-registry-packages"}},"2.9.1-canary.4":{"name":"@apollosproject/data-connector-rock","version":"2.9.1-canary.4","_id":"@apollosproject/data-connector-rock@2.9.1-canary.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"beb315cd84f19431fc4e7a83903578d113d03e7d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.9.1-canary.4.tgz","fileCount":160,"integrity":"sha512-YhhJ8Mx/daUM4lOGd5Aj4HQ1cy9MKhpBbQR7svMGelFJIintTxRaY5agTKnuD9avDMsjhpfhpXc2k8AT/QNMGQ==","signatures":[{"sig":"MEUCIAm1GKZ6Eql0vne2HFwN4m/taJrgacrPYdXn3CHm1kSmAiEAp/5sZ+JnRad84OBp2qoTpoGBjS8+QXA40nlQ2Ph38zE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZJhNCRA9TVsSAnZWagAAVYsP/i+O02UQXYTPjtz0gbP1\nFYWoI9XpXzQhDgSy9Eb9nSLnuxdGMWaMkuQbrRy7h2ylp7Om7bk/7vXgtmF0\niB2fnuYC/5RRv8ySRrHsNN9EYIuhv8XzA7fl4UMlBJTee8O67O1mzvrMRd0I\nF9Os7l1AYhOdsyRLuDQfM+aD4k01jDdzE5MU3IfbXlSRThrl4T1uyFLS0phQ\nXwzOvlmZRdy2b6mxRWZik0WPjXRpxPLQSu51O2fir7pngFiY8ID3YM9Rj57K\nTbO7z7iFJ18hKl0kM0KhtkXoTkZAJ2ZKXlq5f0XhO1AYAiGIx2tE6cRkKPvl\nOMVBT9bLpzcemcdcptsjQOgjNydKEY3WvrOCsp5SZNQRwkWGOm8053LPp//+\n/lkhb1I8CXNXczbb65Uj8ncMgUMbsGGn/NVwFOoZYdJ9RWIPf/x+PR2Fatnn\nq45O4WR8lCYe1ps2aQUBIlqUuDQbz1tXiFD6O1wCL8Q91YemVeyXFpFHh60b\nSPJeNx/TrE/q8QXmol6LJb49DAPaT75lgpqBo0+8YrmVHeVxVrd5tB829GlZ\nPQJp1YFMY4orrksidRpjUZaz4Ei13MDDXGe19TAduSmOBBr2Qdm7ylvPpUpb\naxPg1m4DSJPbM102OJVdcYOPPWrNh+hFwEviaWJ5fRJTAHssyNvEOsa2xH+Y\nWEAQ\r\n=3AJm\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"55a113274ccab136f313f33a6b697dbdd426827a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.9.0","@apollosproject/apollo-server-env-mock":"^2.9.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.9.1-canary.4_1617205324754_0.41814351742139055","host":"s3://npm-registry-packages"}},"2.9.1-canary.8":{"name":"@apollosproject/data-connector-rock","version":"2.9.1-canary.8","_id":"@apollosproject/data-connector-rock@2.9.1-canary.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8870d48af37d0a257667c2d557608fee4f8712ba","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.9.1-canary.8.tgz","fileCount":160,"integrity":"sha512-wcSlW8soKhqDYND4vtplIOW1EDRL3Q2eaCFyqqEcz0tAt528SueSitgllbcwoHUfZ3ENkxcA7RYUNbyCm2G+6Q==","signatures":[{"sig":"MEUCIQDpeyIBb7y/+Y3gaiphulQpQx0Vq6hPpXo2VzLkUiycpwIgYJTrewQ2tdCtuU/GRCyX4AfMGx/hz8VwaswO3iKNZtI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgax0ACRA9TVsSAnZWagAAN04P/3O3gzQoLCjdTv+/QTVl\nMKzSfjNdenWIK3dAUuDDnTdi6oXk6r/mwaFoU7gSG8cqJO5U1qlaKjlwCBsL\nTujgOrMDHe0BVU+rU/Xm6eEZBtSRtAP2+IrS2rm4F0l2ZGsUSZxACsrUS5iI\n368rHDDBeII0ulQvLVBbDpnB/LenIpY+cuObiXS7JsdiT61leYMF6dbWNNRF\nvNYe/NpjfJeZxTkQqwSKGWFOE+0gA749lwQnsTC1bXvdi/OHEmwL95J1fMhA\nBFiNBzKxDL96sCWgUq66wNHHj+RUYCRwEIgkxf99S/wyCHIundikBJWF+3tx\nbsD/P2I6E6Y6JAcwXUmzyIOJ2+vpfn56Rcjo3jH3vu7uhukHU7+Sc9c5wc8q\nSORDW1rnwsywphTu8B+jOFCH0HV2nKAhC/4xA2CS4huWlBp0V9CW1/Ii476i\n5qXDN91gZnKDBcbs0DxkHvuucacAgveQdXqKorAiqDyV4EyWjfAfsZWqlqN1\n67JVtJBdVw2gN8ZIrzQeFhe1zquWcb5prq4LWnQzRlptbKtLb27miYBsc6YL\naMnyR8/hOaII6OivjD8xvN0rDOHYuST4al9p3rVXRNhYzweBQRusdHT17L9K\nh4hJP3ePWwBxkrqBoC3pbcs1IWE+0onJpSS3NveRLrjBLJQ1LPLEUclITnG0\nTehv\r\n=xJoU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"6968b6cae059adc4b810c18d2ed9e217166c48cb","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.9.1-canary.8+6968b6ca"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.9.0","@apollosproject/apollo-server-env-mock":"^2.9.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.9.1-canary.8_1617632512426_0.18767839477711257","host":"s3://npm-registry-packages"}},"2.9.1-canary.14":{"name":"@apollosproject/data-connector-rock","version":"2.9.1-canary.14","_id":"@apollosproject/data-connector-rock@2.9.1-canary.14","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5393097b589d9ee37ee026b973a63f9d57f04304","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.9.1-canary.14.tgz","fileCount":160,"integrity":"sha512-zzg4dy41qdY3giKy8aD9VLyEiCeoShVLtUeipBx3Xsj+2lJ/iG4hDSLPQLE7KW8VFUxb82NnTkcT2WcntPfjqA==","signatures":[{"sig":"MEYCIQCxXLCF7nA+7dL0mscDjAzJrSHlOR3torGE1aVFK2RhWwIhAMjs+0eW/42hbLsvrao12fNdlYD4sp2osdO9+vtY0BlW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbHJUCRA9TVsSAnZWagAAf0AQAKA8+/k1pTiLe6ShthLJ\ngTlb/hAmpXMimezTNjw3RJFXvkZIb8Biyn8PpNvg8Xt9ddXZOOkvaPajq3LE\nxJiJX2nW7id3e0UF9rtUK/mxA3q7HI1RU2oRRtnsuFJ7TXB12aHjXD7XUFyg\naZmKAwpevlgfuHArK9KUPwKl1WsCoj9mbWmoBAUVm5fh7L8YvhdxSwp85lyv\ne7CgVrgCwJPFWfzfqawWcVfefiMZSK49Rq3GlYOqxTaUvToHGdjlmbexEKur\nJB0d1tXPvMc3f7yA3+f9T116vukihBqmmNDNDHHUgDA8PJ8/e1A9h5yLOi7J\n+jP2vuIp/kKUOoTcBLl2J6SLl6P1SZL6sBPQcnoxKPa/iYyyHDtIcKJ/SL4N\nNGTgfHb4WbwpIqzf9MTvGq4zGV34L7Pt3IN4GbXRq8PPPS3TZ7slXDlzbweI\nVCmzijbNSCq8JrkVrfKOS6zHizQWGffyGNwX2yHIZhDhA8rMyZm5wYdDFgEM\nh3Gw/5WgRhFG8bVhvLGhRjqiU9RjGhRMUXNLZHSLglrbuYDQikI9lWQCbseZ\nOFyOO74uPhN+yCn1nW6ZrZNIE96l4uN+RNg+q933/CPxWCiWAdYKUtuJhasv\ndwl6L/AlF2uR1XCTx52e3/zlYfLYrdbCFdQRMmbXaTCPqvYig4UlqT+k2ldD\ntrNH\r\n=csxp\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"56cf8da9c0a7bf93283669c85d9156a606a282f6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.9.0","@apollosproject/apollo-server-env-mock":"^2.9.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.9.1-canary.14_1617719891558_0.6343452917168377","host":"s3://npm-registry-packages"}},"2.10.0":{"name":"@apollosproject/data-connector-rock","version":"2.10.0","_id":"@apollosproject/data-connector-rock@2.10.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a25f8be26715fbf4a2e4fc4ad3a72389f8fa2360","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.10.0.tgz","fileCount":160,"integrity":"sha512-i1p02Q0BExO3p6HSOogrH9cx2C1J5OT2GC8pET6FNj0HnMsb/IMWGHpIe45s2+8QbF0LrIfFVM0smxaqbi/C+Q==","signatures":[{"sig":"MEQCIEhridynrwHhsYPFTfWVo2lnZ8YrJiNDykGyP66xe+RcAiBNdjrV4Kau666l0xDTYeRoON+/SQ4wfjqEJjgNAvHPqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbHPkCRA9TVsSAnZWagAAEncQAKMW9NhOAiXkvKVPhmEh\nL4BSTc/xnaq+5w2tO4aCSEgWAdBUvf0li1Jn4xHGquST9Ra5VyO15bThR1nb\nBm1twev2bfW+wunGgNQg6jA4jmOUIvQ6CVzsRWZIodhAX0knJu5XivOtFlWa\nYDcxtc3T+Eis1m1i9boqcRgEcg++Bxe/OGurRCf+UyUULEIhaitD4S9s1nND\nxp1DhK1GB3t7TE4SQsneH067tne/br9nmu0gZjoYTqAxYREkJOmjvm5wwcYi\nuscfzNzRVToD7lKIniP9Mm5K8K6BaCHc1CSMp4niyLyCl5aAE7vQ8AKGTt1t\n5TalVIv4Nl/Qp/mu2C9GPjHjXQr8TvlSmwRW4Zc8TNuqHzMy30RTQElOmRXA\n0k6HpRGBVX4id0sfw9/Hky4D5Op3Nbbczb1JKKGXOo8HaA2aToz3nt6eDo40\nVVreBBlH+b4VOJhy81dUIUvpAq5d/4XD3Nayo/cEeY5rEJ7GCCx7zJ4o+gzx\n4ixtnVgwdJjm2SL7YpgKwPzP5IwSM5PgWFZleCEkEVicT7c2SrRSIsCIcan0\n+FnjGbjytboVQUAlp8FeoLsqIPb/qBE2ZHkQEliLc45P6YWizoCnIfn1DdAA\nHq8TxAaydIHLW2jNPNPhLN+nQXbgAw9DRHpG38ASWe+UEeuWRKvjeG8KGUz/\nRb8t\r\n=sHgu\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=10.x.x"},"gitHead":"1a2e252309992f6e1c4514ad92da73dae9949e74","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.10.0","@apollosproject/apollo-server-env-mock":"^2.10.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.10.0_1617720292160_0.1853664953199794","host":"s3://npm-registry-packages"}},"2.10.1-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.10.1-canary.1","_id":"@apollosproject/data-connector-rock@2.10.1-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"4fdbb8c8e56a72ec565d93ef86b7fb32382958bc","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.10.1-canary.1.tgz","fileCount":160,"integrity":"sha512-aOGQ2t6e36KfZQ1gzoaFc6u4YTky7DS1PQx5AwrQHkLVl8LV/3usowySZxYgq7OK8TTpIf7DDEADaM5cG6vkKw==","signatures":[{"sig":"MEQCIHxS8pxBQZZqaF0O/E8LayQ0WoW2JO08+OHnejtfjKTXAiAKG6j0I00mnEHGKHHMHEfQeKfA7PnqN5wPKE4IC3GEUA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbITlCRA9TVsSAnZWagAABMUP/3ftLgjX6oDUn5cZLqSl\nX+QFo6r3C1BLfb3xjmrf3B1JuQ/e1hSlrGCj7+WaDBtPqkR64LN0pS1eABjf\nz6nSGYAC3JnhtnZJRnDEFSR+mDUzOE6tt5UkG1ZJQBL+Q7g2NcJPfdnsDmwH\niToksJq69FqDMNSF4WCjmRd4kAZn2d7ragAOoFHsFv/AqGzMzyw5N14rltIh\nutrkKnQNLJhHQAbHvd86YbuRY6evKZD/xa+ZJCjrsfufxc7yhPV+Fgx+TCM0\n3RxAC9AOODKku0bkdTWyOinFEj010x9svDgJIbctGu/mpJVWprFpJKl2nSbg\nH6n9DF8iUAnV4A5IMg4lydP206TT2o8cy3fstpRypMMx0TszO26yuztWLiuF\nhS8RU/aThC1GzcmYFbkn5CXiOBGO8H/sgBuqOb1Im1VN4l8AaN/EE7UgA8h0\nwYbsCQ4I0eRCXlHyWio6yh8Q9T+/QMLDdhALpBM5AKJi/dSzbVGgcyRCua9H\npBzp4JE5Y/XDKg+6uysD3C+1M4+oMuJdBFWr3nxZq/uIf88Bv4o56AtOUwb4\ns1E0r4yX7PtdKfVAi/xU08N0MKq0lYyWM0icScAwWMasKxQRjie35adAZaNz\nc0vGTsL6couZ7EXVaoLariZPa0lCmucywUecoLtWFg0b//yaUl9K6YFqz4cj\nu5jg\r\n=fpwl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=10.x.x"},"gitHead":"87f6dedc7dcd979c1aa96bdb2b308b2fc1288900","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.10.1-canary.1+87f6dedc"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.10.0","@apollosproject/apollo-server-env-mock":"^2.10.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.10.1-canary.1_1617724644414_0.08068240336837107","host":"s3://npm-registry-packages"}},"2.11.0":{"name":"@apollosproject/data-connector-rock","version":"2.11.0","_id":"@apollosproject/data-connector-rock@2.11.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a3d145aa88c0a27c8b78fdbd393c7444e5014f43","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.11.0.tgz","fileCount":160,"integrity":"sha512-bBilV04WWWdvqkqelD33cwq19GeH46SSC5uUXB3TXvViiCd3J6+hh2fbBBE0Nda45/1tc+Q/Ur45MRHLHYK0OA==","signatures":[{"sig":"MEUCICUFJcaNvCXwG6djQQOs4pLVUyayH+KhTraW6VQRrqC+AiEAsLzN8YltQA+qaEIFvvb3f8VOXgPdHpFclOuiYSsCVZo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdIS+CRA9TVsSAnZWagAAlXUP/ArfS1oo+apsRNe6RoOz\nRPkn2pBigJbtmPWuBqqfXSTQyhVha3fRij1V0VU8Rp19QNb5/oRDp774Begj\n+ckyJ19QB/Rwzlh6v+YY2Vtd0U24FNlHJinTiLAQF0zwMZ85JrVMXgHcnbZB\n1FK/fEQf5Z1Mp6lKQPW1QH3GCaujzCjKVAM9LRUqjzLq+nwkwaByKjBl+8Av\nTnVLuTUJEGFHPzkrADWKvnGWcqgJ2nLuKmhnZiQujNoIVkzQVavHzRArEdqR\neBnowHficlLEjfQ4VKRyxFBeQksV8Gwv3lT0rKdPVWe53x1ZwVRwa5jTE9Sz\nT/Y2808J63FX1NiPHTnHnQOEaFkFmFfUY54I5CcLXEe+f0a4BICIyHdFD1OR\nYCs4gMvADPPbL4iE0n0VA8pKpVHgnh/e5Ym3Uo+RcFsN9bumDwYVVvBvCKBO\nwURqTnjXidI54wb0thmIk5x+w9L9MrKIbd03drf9bhi5/jGqIoYXNQhpF1FH\nfkQvPClHTPlSwjZakiUh1EZ0x8Vy/KpobFL+okKq/upZCdQbOIxcR2V996q4\nOoZepeoYh6RGONSfHv75gw1Znh+UAbhRNNZU5ar1Z6II8YlwXWY+vjkxq99b\n4Fgc7ej70i4FD5VxzrvwgCTTzT3POSnFJ1mN4LjTDGBh77640jRXjAbUxpoI\nP6BX\r\n=dtda\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=10.x.x"},"gitHead":"29b07970810f5f2a566f188043c38e45a798005f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v10.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"10.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.11.0","@apollosproject/apollo-server-env-mock":"^2.11.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.11.0_1618248893360_0.2687995920490669","host":"s3://npm-registry-packages"}},"2.11.1-canary.6":{"name":"@apollosproject/data-connector-rock","version":"2.11.1-canary.6","_id":"@apollosproject/data-connector-rock@2.11.1-canary.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b5f533e01e447c98de3b47a4454b36459f94c923","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.11.1-canary.6.tgz","fileCount":160,"integrity":"sha512-gxyB0KsBaxLlxMdykWcgpv9jCNo3pTlIJgyzPziFxfpCnFhaVlPg1JITtQv72YF0AZ6CZ3wd1OEXO3ncVh0aBw==","signatures":[{"sig":"MEYCIQDaz9kE1OCkhAdsqP8tuyXWl4q4CR90lodwOF8UrtvFagIhANrvMpL6qYeD5zFFwBL2aUGXJq1XYOCNmEVF5Z3SzA7E","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdw5BCRA9TVsSAnZWagAALpEP/RT8F44nuhXwa/TFvv/q\nkC9Vi2KA4QdH2wTTLMtUlVUT8TpQBXSJyUVBLmZofUa9glBp+lV8FBQeFNn/\nP51sNpoqHg6oilKu8EVNvylduQLa0sswzgwMCFywC5hsSbdXfD+mfr6z5wFm\n+lV51fP2NjSt13m9/dYoI/AMb9cqliI9NBtSflBhO31ZTjuyL5VvS9Pp9MhS\narifGiKbxc+FDTl8jQ2k/hWo3nG8owxzebAp5FqaG+GpVQJwvG30MJLqg86p\nd1W2xfNTQpHjZnW+UJEj6owApV+u2t/EWRX2ARsJeTvKTUpFfIcbNdMY9WMv\nEn656o+Wn6ZPU2mhpiOUfDsv5+/WxhjAVFW0dPy9cf4mA4V0bLmw18uhRfBh\nHdhiV7lVvCKCKorS2YOMV7/FiNbJ/IE5qNBwXTjKWxVGCJ31G9XWfG2M0hmG\nhh8/QPx2TbTua/+A/HpxMhZY3JQ684JfN0wmIhZOacBQNTs4V0SjF9buVefC\nQJkMqygfZG3FiNaZpU6+9MYdbqT+k7Ow4D+JSjdBjDc/1PYJ0PVOmZtqFlNl\n3SEr2qj1dCRpIMnuaxU1cN0iElwhRAD5RZjfpA6LhgZw4WV3YCcS3hayHcVp\ndmdhpPg3PJWTbRjSI72DPMyncSqmnttkN+OFVxRT/m8LfzAJtQXeIHgtvusP\nALYi\r\n=PEb1\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"56c020a08ad3b6cfe8c4838ac3369878cb2999de","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.11.1-canary.6+56c020a0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.11.0","@apollosproject/apollo-server-env-mock":"^2.11.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.11.1-canary.6_1618415168734_0.04478919673976067","host":"s3://npm-registry-packages"}},"2.11.1-canary.8":{"name":"@apollosproject/data-connector-rock","version":"2.11.1-canary.8","_id":"@apollosproject/data-connector-rock@2.11.1-canary.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"533423882758f1bda018a2f7edddec8312ed14fa","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.11.1-canary.8.tgz","fileCount":160,"integrity":"sha512-gkRAhvCAFguXLs9UOQnM1+hrRZw6mbPTD0QE5FoJcHBcX6cf5b1BVGbWUMzPPDfAp8fk96cQvHU+hZHxykIe3g==","signatures":[{"sig":"MEQCID7bewcyTtp+py82PWau/JFA7mQflCReKL0li1GdfjaeAiBGZ+UQOReV2j+Hjak0otEp+Qq/wNMF5iDuDRJteuEG+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1031641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdxxtCRA9TVsSAnZWagAAcPEQAIM1Oih6lsLW4DkJe0I1\n7pBj7ZSoPSXSG/9A54Zcqjsa43YoLBv9dm7UZx0oGG/AEA/3nTmLS1vk5Upc\nR6Nu7D8IwgYV/Uh36hxPeWuX63zWFgO10IJXzJOJSJXswNKfzMCnLszKeWhB\n3Av9AYreKbkwod4mqFz2Er3o4DxX/BjHY7C9KBqrF+EGQtmMHY5gnP+sgpTP\n4ImY26B14tLoKrSToeJhDBO4m6V4Zabr8VhDQaJ1iawIOQAl96uEKBVEf+ab\nmbxxndNaqcBO+4lvokAWYm0nWTkGXTQk4kmpQvPWbkMQIAlRwJWU2X8Gce1T\nrwp/J+Aoz0wBA6pUVIFMfygTt8IJWAuOhtxgvlGody+0JPylkp4jpuM1y54m\nrp4lZUlUJTtZ4KK7YgcdCUwxtw1ua06YIkuvC6EAjXsrocgopCxUj0rj+/Rt\nfeKOe4qep+M868J5lSjbSU0RmoLQ7Y3MgjfBbpQs1Q1Tj0myknFziSiJuTBw\nz24ZtKM5Yq568PfaXjTBHvq0woqGXqX3JNcQSNZOhVFY4FOw9nN2n8h1S6TV\n2tls4JbfsDlQewkTDI+eRKnonJJ6R/y65U2+oCkDYi5M/h2euyM0Pbaa3awa\n1AP1D2kQbRCJo+zqS669I0CjM+zT+IIrqBcch0dkiIrQyyr6OLhySvR/Q2UK\n4GjR\r\n=PtG8\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"cee52b13ec4cad0e0f1bd2faa11bfdb6773e0e9c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.11.1-canary.8+cee52b13"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.11.0","@apollosproject/apollo-server-env-mock":"^2.11.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.11.1-canary.8_1618418796815_0.20476448760481136","host":"s3://npm-registry-packages"}},"2.11.1-canary.11":{"name":"@apollosproject/data-connector-rock","version":"2.11.1-canary.11","_id":"@apollosproject/data-connector-rock@2.11.1-canary.11","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9b83094e648fd343c17f70fcc36a52a725a058e3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.11.1-canary.11.tgz","fileCount":160,"integrity":"sha512-njwbZiv+posBFKIfNMj5bO0BpKn6Xh+7440oF7x5fsnOBynCbgg2k/Ouf4sqhLupboyMdJc6ECFljl+vhD3PRw==","signatures":[{"sig":"MEYCIQD3gCwvimAtSaLYjQxZmGdaulcEHvaC6k/nDVkNHltMZQIhAIJuZ39qFTZYEAqdYP/PLQ79hM0DpQBmb+69a5/Pw70S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1031512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfak2CRA9TVsSAnZWagAACXcP/jKiP5J6vooTxcK+hDnI\njU8tBJ+rUYYCUDXGJ/DtoH3IAFxr8hUZQTYwqgDOrGE3e8pZzKcdTus1nL1Y\nYTME1QCAhNWXnq/X7066LvfmD5hFEvb4Sj+cg3qOhvFyYWn8Ipk5KwUNBfZR\nMgZZQvejFeuIPXSmB+35ajLp076MVDJXThyupwMs1zFqh3H3S1aCRp8vc4fo\nJZWYkt7wqT5G1R9qiePH6lCorGR/pChlVR4nEhDrPA0RWHJo2xq1GqD5UTWP\nYufDdS9j3f77WN0sVYJmmlzvKQFEwZ/kFsu5pjc8P8P/IRIkr2gsvDEC9XMh\n60N6wzENRQ6I7XoHIEQXcXxSsoEZ9/WK+The+KxQpSfWyb2k6WID+7kklUSV\n8H62q0uKtZLjcLGJtGAvvFZ8wYI2HYYydG5nEa7uqfdO/RiK/xwRMZdGQR5n\n3qi9D7rZUfyMB0Z4L4kqhJSsRZrpHhaeXALRhBSwfkMpRMp411F/HhLZBPJU\nANgZUSGPy0Q9tTLWYFdZFKCRCbrgQxUBW5/34rwFtZa3KaCqH/jxD+14Z6xt\n5rZSCS5mBRpMhbAjEZIasCUONyPGMJQtmKacsSZAUXaMOSXqJdZxbaCrrjv0\ngJa6ZVD9PGootcD7sltHl+3xgiv5zIEAqmDj+1zPCg/8Fb2W8yw+TCNtyhkc\njhhq\r\n=J+1z\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"2e3e32958d37c5454609890a8fe82a90541b8785","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^2.11.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.11.0","@apollosproject/apollo-server-env-mock":"^2.11.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.11.1-canary.11_1618848053190_0.02179366028716312","host":"s3://npm-registry-packages"}},"2.11.1-canary.12":{"name":"@apollosproject/data-connector-rock","version":"2.11.1-canary.12","_id":"@apollosproject/data-connector-rock@2.11.1-canary.12","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"92ecbfe9d67ed08df67f9569765e3f36a52d1085","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.11.1-canary.12.tgz","fileCount":160,"integrity":"sha512-+yuw6N0eqXD4fndpMi+Pl1f21MpoSZdIcZFQAgf2QLmXv9hZCEaKjfdYJXAC8ZNPajFuvIDO0gNs2mhmS6KR4g==","signatures":[{"sig":"MEYCIQC4VDTZiEJDU7ZxPfETMkC4QE6RQenTHU9+3RqEx2U2FQIhAMJeAID6saxho85mmLZAJn+c68uoiLNRjePTB0QIH9OV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1031506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfbmjCRA9TVsSAnZWagAAg+4P/243Fn8j2lK5XRnPUgTZ\ncxv500qs9dCT92iWJAHP1ql6oKS/aOJuR4Ec6MMh2dtFtAeJNX6qEBY6YKPR\nNnxbSlnIOt0TW64jFslvMUTq/xKLbXBqpzssHt45RbDC7qmfgWQzhEhjQXxK\njU3kDlSbXVribCYR/NNXEVMWZEaIvgKWGwH7Vcr8spb6Hae6lukS11exyh/H\nC2715dLg0TXWfSlJpojdBWJ+VHiQfUAzynTgRF/G5mzuVnx/vJU3n0y+TPVW\n1T5PsR5zH92/+8hEwZymTzspBrAlcMqlN7+za59/yOFuuh8GaW3vaZJPSY6I\neUhKOyIxuXmn8vUjKq17LSYRfrAoKB53rUBsR15GfdLrcHRWjAZzbPwpo0lT\npDSaFJ8vIVhjAKS2MX1K9CssOymlFOzZYI4VRn40IR9SGdTm8UG/R4hEQQFy\nfbvKGCHy1I9BdCBGdWb8EjOPu/7a3KJtg9n8HMOtes7tMFFWDYle/zbK95V8\naR2UVnqs5JhrIVRPTd5tLJ+rafremRZkbFuGZ5+tYTky8yN5u1fTHk1jRCXb\nRPDHHggtf1XfwH6QGKShf2IToeVhFnGjW9FLJn2sXZbUA1CIgu8ViFLQdUsr\nSDGTSmz5o306Ia1b4l+EWfjKt7C6AUd2R3ERXoeHcQ7cVjzpEYhvSdylNRRe\niD/N\r\n=KFPV\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"8977cc097eed84c78106f7774a9cd315805bdaa8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.11.0","@apollosproject/apollo-server-env-mock":"^2.11.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.11.1-canary.12_1618852259250_0.5725888546436837","host":"s3://npm-registry-packages"}},"2.11.1-canary.13":{"name":"@apollosproject/data-connector-rock","version":"2.11.1-canary.13","_id":"@apollosproject/data-connector-rock@2.11.1-canary.13","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ff773e73ef2f258d003711f9d4d1a0e9f8f06de7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.11.1-canary.13.tgz","fileCount":160,"integrity":"sha512-v16MaWVRkpJ3c9sgREzhviRMOWqVTv/MZXhuo57zm2xjJvrUyrPTuDZiSQtcHIi0ak9MClagykY7uKS9gG1zQg==","signatures":[{"sig":"MEUCIQDo/jWbWBqFhxV/fp2IsQqm+bw6DWEsuT8uLGK/nXGI4gIgFNu5WvF7V9Iep+gDWKTFMxlWdXblIfRsQmwk9qtwpOU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1031664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfuEwCRA9TVsSAnZWagAAsoQP/jCAO+rsdLqi/AXRBrj+\n6Uv4j50xAS99itXXk1bbnBNMSCHKMUJVPo3+YF4N3g5+OveuNLVZieHCR2Qz\n/dqa8jO4YDJsYiRMxZ2sFb4xl1I8NtWmjhAhZe/yUcp13C44VX8qNjdrIf5c\nTxwryKioV+nWXrpjMwD+ssB7EpuY8OLEVWYsVuPDcbnTtPmU7vJYuAd0r978\nmobTWnRehmtdkaAjO18x2W0uxslQMqKwQSO05kx2D9XX350JPIeOg5KZjhzc\nYK9toxK82mqpm4JEgKzYJbT/aJochESQ2vh1U5y+Bb732Lx+JuOSGhGByBx8\nyPj+zJJbZ/oWMCHzvYrlGoLRqjQBPXg/WS9o9vsAAfmYX7ag5PZo4SmSOUHP\nKKY+WRf2Z1tK4kTafm6YOWGc3YWR8pssxsO0p8IDrZGTVPjpzfObNVbrZ7j0\nY8cUCggEP9kmnlsABH14ggxEjymxB4g9va+NyK8h9TiLlbacyBuZx0554iaj\ntVVbd5miXmBCjlew5wqDA6me8/QrWnjtZrgXmrs+9W9jagX/NmnH6yK+Y5Oo\n1gWPNVBbpIImwAM0wA350aBN4hImyKrrqyCYCOhzUS6vuB9ChcrlsavU81VC\nVHq3LOSMX++lCBjmTm7H3mRcD+TiN3eJNJi8npaZT75hy/cCuwV1rGDNNnq8\n7X4R\r\n=vxeU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"f317d1fe003d48fee422d3d0bef5dbca45be8259","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.11.0","@apollosproject/apollo-server-env-mock":"^2.11.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.11.1-canary.13_1618927919698_0.0039719424010444815","host":"s3://npm-registry-packages"}},"2.11.1-canary.16":{"name":"@apollosproject/data-connector-rock","version":"2.11.1-canary.16","_id":"@apollosproject/data-connector-rock@2.11.1-canary.16","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7bd12b0b48cc73352d1892fc2c597fa548865e00","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.11.1-canary.16.tgz","fileCount":160,"integrity":"sha512-SlvgCA3b3AVYpIV5sB7z1e699l3EdcTmrECCAQoY0R9yCoWxNH2co0lPJXaSOzf3WxCcv0LHBP0rM5OJNioM+g==","signatures":[{"sig":"MEUCIQDMqOE3MbM+xf9UT7nPTaLs23egIaZ89nR60EF0CWGFiwIgDspSKEW4TsyzgofrG2wnWyDhN/uymTZ7h2t9BAvhCok=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1031687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggFXiCRA9TVsSAnZWagAA/n0P/icOHb1PTmV5lkAXstaT\nyxG7X4oYS2sQLNfbc0+qPu06GpwPLqFboznPvdvmdGSDu2b+llvXCVUo42wJ\nGPmwq9yh5HF5zrrY1aZG1YOrXW6NVttawmXolvmewY+6gGZvM6jVHWdljda+\nJFu5u9BuEa5btUnyLikrN8qp3D8ge6J7CmmbvEytc9paJdYS5Gf16bO5QI0M\nyPtppymaCDFxMBpWL5Zg4vZMDQOwJGdkr6Ez7gPVRMdBqfCtiic/atFvShzG\n+DXWeQ+Lq5UVbKjd70ImmQpHeymh7eG4nrC6YmpAOGFXWF4OuzfThjWr/nL+\n7vf0BfMQMcH/XDYBgLyy+5yuweUEs7cy4Zk4KbrX/xywx90kVS/43uRjtYis\nyroptcA7j404oB8wCcN+hTRSSpZZW3ij9VdQZuTc1ubuxsoXXhuHie6ubLnk\nsc5k0WiMgCOUpk+rEnkc1q7PLes7m/HAFiArUZHb0/6N5yERswEQ6HZHkCwM\na6KlwnV6zqdLVXGIiYzw7ZpRH5F0ji2Ayku3wzSdVwCJ8Ye/1Dq0OMjMIkXy\nV5ylGWrTdzhTf+SK+Y5FDqmE9YLEnOAe3u0vkNYBWFExgMWwhDQzbfj3TjOU\nXTIyCST+fJlDW70fOtTp7HaAalaHaoxbzLnbxQ/ImsCAVKKrJt25OXmHU8D6\n2clh\r\n=dMrk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"4820d2f81ae489e91990ec857f97ba640703dc42","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.11.0","@apollosproject/apollo-server-env-mock":"^2.11.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.11.1-canary.16_1619023329770_0.579770469131341","host":"s3://npm-registry-packages"}},"2.12.0":{"name":"@apollosproject/data-connector-rock","version":"2.12.0","_id":"@apollosproject/data-connector-rock@2.12.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"aba825e84a892f2a80817bb96922833a149c6f94","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.12.0.tgz","fileCount":160,"integrity":"sha512-i06O50ZMdMmxtFplRhS4zbBX7RfpcUu5wP/LkzBeL+QwYg+OFnEVnsjbnlT71YsJm/SBtA2mqWH3992ggN0ONA==","signatures":[{"sig":"MEUCIQDtaeyURo4oagGSzMuzk3dXoNdvm/qCYQIs8qCSrFPoCgIgeY9xuxIk/Qc9yu5Oppa35kxzbX0dTACJq28Z3YqZrZo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1032674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggcatCRA9TVsSAnZWagAAO9YP/RyUpPh5WoZs4ieiISAO\nW+1CI4pEApS9dT7yEGWivUhy1wJdOpNuptAQyY4XaSwoSGAld+P+cHiN2OF7\nHWpJzx+qd5rogQpxdcdNKYbzd6mav4eWpcX5To3g/kzHjLOFyvLXA8k6UYI+\nmj4cq4InbGSyDQ9L+pz4VxuEEUDx7GWLX6SAGpaIfbhSrH3N/nMwtErj73hG\n3YVALpqf6WCTEBO1LrBez8ra0hFFs9nxx2ozdRXtnf2H+E2JC2rTaCJR3z+P\nefYZwkhrs+45AKofMjX6WEUa2/9ycwggQrhbbQfV4w5yzBcbIuDZ7sfZmCR+\nu5BRGHx5NMxN2+yeUxzLroHJuz314Y3JqzgJMCQ6tL/OSjE4zMUsQj41lrrC\nV7HAiA7AK+ztsiATGbAH/0p7uNz9jkff/cNsRJLBnmkmhmMAMLbBWZCYHSTF\npEPzBK39l/rTtyD+KlJbytyFRDua3gpyewcIGVyUwbwEgdFtcSLQ8J3qyXr7\nZ3f+Z8zjdil4yxmXFsKwhWFi90BN805DUVcm+fbDHiPmD3qqLoyv+SwbDFKM\nAfSxTVC4iB0Dng8HNH2jNFOg0nVy1oz5oTQ5vqw3UK2H9mYYzo6Cpb8dIB6Q\nEVzvMGPcn71JPI5uc+6dKhubXZX86TgzK8hyloSc0vaaIHlZ1gsLJ2halddU\n9cP1\r\n=Tf1v\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"6c493f963ca10aa1ca8122a4a210aef5675e269b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.12.0","@apollosproject/apollo-server-env-mock":"^2.12.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.12.0_1619117741177_0.351531151859656","host":"s3://npm-registry-packages"}},"2.12.1-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.12.1-canary.1","_id":"@apollosproject/data-connector-rock@2.12.1-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1ce1b40cf3b185b4e3a1ed816a328b48d9352e01","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.12.1-canary.1.tgz","fileCount":160,"integrity":"sha512-WLCk70Bwcu/T70iTJHKMkNwgdaxWKhlKBUyKIEV3PNDSZO+mj8v9/OL3cuN7OTjrsoHwdJbTo3H/zX9f0cvjhw==","signatures":[{"sig":"MEYCIQCfLBbGT5SsetcQjv7YwO8QK8Ae8V5vW9D0FBNBcNFpmAIhAJXZvC00zRUu1ZMSMZBlHa8tZLZzZI8cPDO7LuHoaQnh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1032768,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgghtRCRA9TVsSAnZWagAA3k0QAIvJblgS0P3aKEppzQRZ\nDpWS9Ug6F02dkkZ/Z9z+9jf4qUC2Rx0SwNMvpCLVZ60f9DUAAtESKkusBUxq\nr4F1ynTBo7MiGU/Ou163WaSjuZ0BEOVzaDHB2UNj9jwgUIBDwqlc2jNCh0qM\nQGVW/KL0d353IBRmb8Ej3SnDCQil0GMItUHqhp7ftemj0bWdFODGWQ8kD59X\nCjR0zC/tndrWb2fY4+OY/nJlqSGRjR67LYht2VQFc0x1+cU/4b0S2SFEPJur\nLxDw2sa1MRrPTCVajf3fdmpm33+iLfZcn4mMz1RnfE2j9z/5bukc9iyvuZNL\n9pRDiTT91iJ9ErK+grF/WFzWI47DhE9vdTHWOrQ+D+5KVkkvnzcT4S3Qt1KY\n+TEXZ+7/ikFhPI0gjqDVr1zdAl1O+YxHUwyC1xrkW60gLN2zZ/fmuycIZoRh\nBjb/iyUzAp0JfDeOTb94OSGbjkvUvmDwYwHDlZYxlFAtq+TZyuHIvxPv9xsY\nPfZauQzEPqE70mjP8TZxmjZZhjDcizlnNNKL93iU4GpkyRXXBW/cfjYkP2YC\nL/CTgofg9+IJjB/yTokDNWLmB8gSSsZZmX3gQCAvLHqxX0dmNRVSFSUWQoLo\nXHD5qNalRM9V15inieZedZQ+OhAgGI0xjYdSHC/2xDHqFOLBU9aSjeurftXg\nd8L6\r\n=aY+P\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"ad6b2f2455d49042e6af6213d59a7f481d39fa62","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.12.0","@apollosproject/apollo-server-env-mock":"^2.12.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.12.1-canary.1_1619139409314_0.7110156601431707","host":"s3://npm-registry-packages"}},"2.13.0":{"name":"@apollosproject/data-connector-rock","version":"2.13.0","_id":"@apollosproject/data-connector-rock@2.13.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"308df90647be3c3329672be03af18c2b1fda37ad","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.13.0.tgz","fileCount":160,"integrity":"sha512-Z7rsF2Y/yCcpZvrxYaHn58JUvV0DXEdUnFTHM7xy6faFutHEkoysTnm3qWokqK/0r0hWkjOD0hQ3pfhRECupDQ==","signatures":[{"sig":"MEQCIA0gdDjaEXjkt4JAuvZHXjGFLJxdX9SPTmtP6KQXF/7OAiB2j7Gt9qAM2ChnkOpqwmniuywSIpCU/GiQhqGGgLfYwA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggs7wCRA9TVsSAnZWagAA6ZIP/1+v5AJKhqYsI/iTY5t2\napU0VLitPMMC3bWmU7yA2mgKree6f6SdPBXtKeVPr7ZkPwL7mCfGKRugNIid\nbA/i/wjqad3rwn19C1ux8EK8qPViihvmgegK8QnpVENKpQF+c6SXCkrbtR3t\n7j7RUgZZpuhF7lbHg7lP0GGzWH7K23O8O6lBqDSiJa7FGd1isCLI4PqFJ197\nn3Cjef6DUueQgBAp26g8yTqAEgksn2JlVhw1jefzeLnHh5/IJtVpabr/6VZQ\nfNeE7P+l1xSh19GYbyvy3QfBEirIFJnptRG7jYHHBNKgeH8ImRBQXp/5uJIL\nAhtXIXvwxfKkxVfiCGT8fuireEEopk11RPmrhip5EWBXxRsSiMq0RYPa2MvK\nOhIrVLXqa0QmBL0UIz+Q+lFqiOKzIcxBR/8TWaQa1qharRG5PPHB2yf88cEk\nOfTCKISjEOQ93RFD9BY+eirUZHWOwAxvU+0/QmiF0iRMlloZT5opDGbuQ02B\nXNFroHJQtolaZ3eqsXRs8SnEC6mzezK3mlukvVPtK2+vEzvU/WvPFQIhuaaF\nUU93O06/uh4zpbqdUjk5l80os+Ts/2V7OSWiblIQsGQbhEwS4WcPTyMEPkyN\nb+CndHkTKI/XaEt6OTQWRHnXb1xDbjm0KKz+D0HZAkp1J+gCiz9CdwfUp+WY\nS2GA\r\n=r0Oo\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"6b98d8e8d65dcf56475d1d0a2ae929a6ac8696e9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.13.0","@apollosproject/apollo-server-env-mock":"^2.13.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.13.0_1619185392057_0.4274595595453239","host":"s3://npm-registry-packages"}},"2.13.1":{"name":"@apollosproject/data-connector-rock","version":"2.13.1","_id":"@apollosproject/data-connector-rock@2.13.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b7db449891e1d84887d40c8ce56c588f3c93264b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.13.1.tgz","fileCount":160,"integrity":"sha512-mdITDzeOKNnTbAiTyt/Bb9dgyZhgGAVgsP8/Zc++wYOzPUczXX0RW92gSuAPo90tujOmMIR7VGpirdyXFNE0bA==","signatures":[{"sig":"MEUCIExqEia343nucx8dw6b+a0ptYQUBdzIHEXdGEM5L8vjNAiEA0vDTGMuMnFWqys6d+q1pmHCSPEqfh/tx6jh+UZIJN8A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033256,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiWliCRA9TVsSAnZWagAAi9IQAJUZwVG74HLj162/jODs\ngH6Gx4GW6rbkXD+DhxMawLoxYZjbkW9zMwsCFNlZLBEg6szk9RrFdJ78Zs6Q\nq8UzdcbB/D4X7I+6a7SYQPtyips4/mZzp7L81MvaDC0pn2Q/NcnJ8PVVQlqx\nqYkWVlD6evp9sAq37ZuKGuIiNGUrD/VbM+vhtcGS+0/OY4/y+v8cl1jbSZOn\nzYA6eO4FcUxyY1xkiklZ4y1fVMdvK+jKNx0bQw4i4PmsB1c1tO2NjMPt8xLQ\n2ZyTB5/KhDMkZUQMS5AMVWFGIB2jX8f/Ac03FnRIyOayU8NEAUan0Vj3gx9A\nrY/HFTcpMLDTT+fC4vcuK1hf8MsalNH40dZrQnH0cCAKLQo51Br1RJ0eOWwu\nRCuh2jO0eo/j6wgqH9/EK0JOaPlTysvysXkLKFagqu8QLLZv5Oou2D40OQ+k\nCDUt8AHxGZakIT+XTvXmdOqLu6+l7/qk491V8qKwN+J2p8N0qWtlC772HGeq\nDnRkQtN0tdnbquc5RCQG+jlHCxwc8ujY2jET93UAYmZiNuepW2zg+NxiytdN\nznJKxezHbfCTAyOguaRUeLrazaW+yGAnRJ0yeA8raVs3DtzG4GQTKwcOkc9y\nPMD+CKTXXAPs3aGanGfPLBGm+nFT7g9nRwCC5M6ZNv8lmeZW3NhVe/Cy+uJ9\n9yZA\r\n=od5p\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"e79fd4fb9028cf612eb5280969a5e7804efc51d4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.13.1","@apollosproject/apollo-server-env-mock":"^2.13.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.13.1_1619618145641_0.6732783322911238","host":"s3://npm-registry-packages"}},"2.13.2-canary.2":{"name":"@apollosproject/data-connector-rock","version":"2.13.2-canary.2","_id":"@apollosproject/data-connector-rock@2.13.2-canary.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1014075f8652341ed4f68609493593930994cf97","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.13.2-canary.2.tgz","fileCount":160,"integrity":"sha512-MprF5PCIxW1dTgCKfKxfUPXHpyZHBkgapHNWClpFizX2h3hcHPnr5FrsurLJaX7658YNnIhU32oWRrJ6Y2+WRA==","signatures":[{"sig":"MEQCIC7Gglf8L5DVfy4THmnvJtiava7ICUmOWNmqRro4M4WfAiBpYvFHoAfFHUiCEeVQK1/bluVE8RgDXm03vN51R616sw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj/sxCRA9TVsSAnZWagAALc0P/3Us0WqttYcQGmLVTfNv\ntyH6os4qkGU3JjCwf9cji6ak/PZ7OkrC8uTrJuKtFDmJ1vAkgUPb0dzokp7R\n33iLkarNDKGU7FRoidutK69a190WC2VOnRZKnh7J0zAQKvN9+Hv6X0zeAx5K\n9SqGgBCWj/njS/7WU47ZJRu4Mjw0TWMgVZpUFmThujm4flo2Y50W9lu5qmpw\nzdYhdqi4tG9VI5KU9dehtMRMrxp5UYFDVVEkZGt18l4HP5VLPhjPi5+I6XsJ\nQqcgveWcS96ynHMoeJ0RzKAE2DYGULjkhyQSWBnyrd5iDbRA4StcYsea3Sbi\nToJBez+bHumyorShQ4e1rNq1AIN+3usv+3opVrZ6997bxxpKb/s/c9k6Pekt\nUHNjdgev7KDC6q7ZUc4giVG7m7WBXaWYaNlAfVy+gVpCsuxycHLN15b/Es66\nD52Gagq+e8j9lBa/jV8FjrI9P3zh+Qo0xe1EBkqDVYmAr20j8Kdw/+bF6S9S\nvt/JQBoF1OEnq18w1ELWuZVHJpNrtOIvUEJUF7ISTRvPHgP6w6ku3QhAlT0a\nf7xhque5pNB6Q9Ekr7FxepvZ35XPgNid7Fxx9a0iC1acCclt3YvSuswodRPA\nlPk6PbnzxnpZVIAE0vBz/5E4i40hWcbWbiae1+MX54SMJ6rk1SwqPZNsqJ9B\n/afu\r\n=rs9m\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"14581505a32c9c58893360c419036ebfee6fdfc5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.13.1","@apollosproject/apollo-server-env-mock":"^2.13.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.13.2-canary.2_1620048689194_0.29169275896325364","host":"s3://npm-registry-packages"}},"2.13.2-canary.5":{"name":"@apollosproject/data-connector-rock","version":"2.13.2-canary.5","_id":"@apollosproject/data-connector-rock@2.13.2-canary.5","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ce919aa09e6e59c5475d2b594c8e969221b92749","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.13.2-canary.5.tgz","fileCount":160,"integrity":"sha512-JTclU5Kz3n2XwlxnlLwqtUOQpvmD52868GaTgGiNu9YtHKocH374cZmzeK2mLROPUh1vtcZHjDgu2W4ikmpn9w==","signatures":[{"sig":"MEQCIBY3YW+2jn7pgnbV5DVHaephYZcQJMSYFiYH2ZBfVRsZAiAzI5+hksS02ACZKXePxXsmRN5mE1jeBXDLAfHcvOv9OQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkaSoCRA9TVsSAnZWagAAweoP/1jprAR+TX+6IHi3WmvB\nTU/DA6pNCO0SkjA6H7chRC4bXKWe1zDTNmGtf0YAJ6BzwFwB61O8TGg3aqUl\nIQgrvcj0qkWjb6iWjYjWpfhaEFQKBNXhgBfHyDEP+mfK/fwBW6yua34272Bj\nK/glsjeewBglknkNO/D9YmRrsM4Myi9PV5wUAZfC+N/jF+/a5yqh7FnI2n7i\nCPBHbZYVPSrD8aT7fOEWEWYQtpM/ARrzVuNOGou+Zfgvznx2cAmd97UGGypL\nUJJOtEd3qdhYcYcUksJXWZqbkQ/mjmPugkOPt9rmicZAbhxyTDVjxqmFIFJN\nH/Jl6pyCtPJZct5sgX0etWWa6IW0Lo+5Wqwx0taCqq8+dPPyzLGfwVyDMttK\n/JDxe2Ss8iicrl0YW4Ra7h4T1iW9MN6ZFHI7BMsNcj2rpabaNNZVv+8q0YXK\nvyHJT/9oghLJpM6BXA7CuXkKyp+Af+U3l8oor3zSLcP5BizFUQ6g2rJ9FN7b\nR9Ywuor32LYj6w+ZDfYOdQkcGg6xcISeOpkvfHfn3A4UIXofpEdgqLfo+r3A\nJQ0gkofGAakG1wSPrZ0mVp+kO3ibLoacy6T2D5zGqzkqu6VtoRScFVR4Fv2X\nrwg9OHTEMBzo/ZGLNNX2pcxEIxKF9CTVKHbkMbIo4f6/dMiDfjy6p73f5Qcf\nAhli\r\n=ETRd\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"cfa7237766cff7eeffbfcf02e96033caf7c51341","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.13.1","@apollosproject/apollo-server-env-mock":"^2.13.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.13.2-canary.5_1620157608144_0.23332253053507657","host":"s3://npm-registry-packages"}},"2.13.2-canary.6":{"name":"@apollosproject/data-connector-rock","version":"2.13.2-canary.6","_id":"@apollosproject/data-connector-rock@2.13.2-canary.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"16219597880421b18d21ff10f3825af5c828c6e4","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.13.2-canary.6.tgz","fileCount":160,"integrity":"sha512-3oIip7euIhWMe6jZutopF8kL73zgO+GzEa00I/fg3NOAfIvMgURn+EyOOWwMqnJ6TiHH7Jm95rPCE1Ewj5ZT5Q==","signatures":[{"sig":"MEUCIFLIkFdeyCYnmh7uzFHcTX38N/qKpU9bK6sk0cnC8ccmAiEAvJE4cNOawUIbzkkXl+e0Youvl4HR6czXbXLQ3kRpqII=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkrl7CRA9TVsSAnZWagAA6vsP/0USyA/i6uMItwHXXfS6\nv1qzdGoXoZYgjIkcqzmF1YVohrd889mH2AIiRQvB6Y5cb0DjqOMRPcQ7z2q9\nPjn4VM5eukCUEKb0+HVITDpbhkxfVjqIn/ZJ54FjxS4zGBKJL2ajhMwSXJXu\nZf/X4EOz/9rHEKVS9wqocRlB5iLbVSZeT2E/m57W2eAsEhDxWY+2EkKINfNq\ncsvoSGY3hmNfzNHkjvDlKW+Yj1qQ+D8nUzxYrLMifDUREkP8jLFL3zOLLeG+\nRFDQqeM5WIYnkWBtSvWxvaIVJIqz6exRobjtACYTqkHksvbIpBdQHAI4c+XG\n1AHSlVt6KWbvuaUKPTj+Cjep7VdsPVT/+xaOW+ZApUGu7It4/ABLspPPaG4B\nnXk0L85tqGJ7uudyAGVZx8/srhcqFs93GBfMXzfhqedcZwOFLe2EENgGERLK\n87X6NRkbEziIdiMnCoY4ITtimvRjiQneB6XCSZnX2jvOf1mCvAva1MpDMT/5\nsOVoKMWhkaMFmdKuIDylpAAzKu2YwSfZI+MKFtitAyR7WvinsyFV4pQVIxqN\na+5NclqHQJHrNOGSG5IeNWCHFIWWvOxbsfBnuu4Zdd+nkEfm+YkSZJSkjZsG\nFY+KFRKJaXJRQSfXlW/kiBuiKtI6ViSrowURe+FO179S9lWL28vuK5cREDXM\nZP/A\r\n=9ULA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"137a713a98ec69f3b6a4295646b76787c339d0d1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.13.1","@apollosproject/apollo-server-env-mock":"^2.13.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.13.2-canary.6_1620228474762_0.46805855217878944","host":"s3://npm-registry-packages"}},"2.13.2-canary.7":{"name":"@apollosproject/data-connector-rock","version":"2.13.2-canary.7","_id":"@apollosproject/data-connector-rock@2.13.2-canary.7","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c68ccb0f7a2ea541617c8b95b368642c2e506a2a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.13.2-canary.7.tgz","fileCount":160,"integrity":"sha512-h/K/0Jz6fJo5WiCyqDVerrXozpsWfs7BWHUNJoYgw48UtqH7Vav7qkCW723JJOd9PlmpOPVkTUraWlB3jhP2Xg==","signatures":[{"sig":"MEUCICYpSxbC0cL/6OG9vNwPB8eeB2nv6+as3UC59vQuXhVUAiEAnv40eeALX1iDEJ7mEOHP4RQiYAOF5quFagxqvQbfbgg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1034081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglBQ/CRA9TVsSAnZWagAAMPcP/i0KOs1HbHF8b7SqvJp2\nYXycIi8XVRtTiMTSi7Lvoqsd2srz/wJT1wcfqOdd/rhoOGo1Nq8oGNnVN3kD\nn2tGs8XVRMtuqTW7rAn7rM0uNugVulG0gsBdBwgI6fU+pQlQbpgKqPfX1LYg\n4WUD3lP1qgiBVNbdZ3pEnaAx+j9pksbsYQdhBNFDkbbpY7SxQbFyoIMd2o0j\nhSJXvS2XOGh8qlh3zQfGB8puM2KVXEmT5RePeGBR/ZOBR4NvYo/gv6z5DD63\nM7sGQs8aIREaJ7nHwWMWgYRjAzS51/HJQWxQXYSHsquBnfmqI4K1NjHepJq1\npUpgqggdGveod4P5LwKWm9CIC12J0gUmek9VxyyObWawZLTanlkzx2Ikb5Bf\nMOGJsCGuLei3WPp81u6mE9KE7gPGZQEaH1C2AAlMJLQgtFrnNpI45jF+R4jF\ncqSWXY8hDEVwI3mcyA0EbJQuHH4ahbbdQ1pROyQCWjFAsBfk5uDZO1GcfJMz\nrsGfLgWgbMftAHXL7Ayc3qggyp0uYGeuyvrtcWsWkj4kQEEb1w6DeNxvHa5o\ngLHO8+zjIYvsNsOEH/YLO6JIFr2IjflEowWxdxOK2o+eTP+pkj6m2SEGkZPi\ngwchJYsc1bxffXIPCmr+yxFlV6ng6hB/7leOEPuDLy+Ph1MKNhHr1SQvdouV\nR6Ds\r\n=6QW/\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"a914b4fa67c1b4883864a7ba8ca93596e630e69a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.13.1","@apollosproject/apollo-server-env-mock":"^2.13.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.13.2-canary.7_1620317247082_0.6026355781104713","host":"s3://npm-registry-packages"}},"2.13.2-canary.8":{"name":"@apollosproject/data-connector-rock","version":"2.13.2-canary.8","_id":"@apollosproject/data-connector-rock@2.13.2-canary.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"060b22e3cb91ba22e04ffb418249d4d9def835df","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.13.2-canary.8.tgz","fileCount":160,"integrity":"sha512-XOg2PwIBWse7lLci/2qPBcuVW0uBIFpIRlf5kY8lwY0gLzEwcFW4vlaRB2Z69ythU69mlXV9qTqSoO8XH/Sxhg==","signatures":[{"sig":"MEUCIQDBmNsoJR/CiMyAkRqW4UiAbUTCy4GG6Volc2qppAhlegIgNrlr3bsQ48oLcL9DW0Y/q9nJBRwvq1NpxXtozFoJx/g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglBjGCRA9TVsSAnZWagAAQwUQAKN2peVJJ+tELamsIk5/\nx6U8iwQ8QdZkc0oILxiPsCrQwq9pxGOcumcGB7BApSSQ+wp8hjeHuEDEN5Z+\nj0N/9BEhBm400To03VWDvWxYEN01zfTLMtNB/gIPwCtZ/c6zI/ddcPnq8XEg\nlHkgm6+JnEpqi6TaUd9Lq1a8Z/67vJKEWTxAB3RGBVzzuER249j9U7X9rlyC\nIhYABxBWDW2n/lPwVMeEIspptOK20Ec2nOjx4xvlgmvcnXTkCmuo0siHg0h2\nUry45K9x6eYZ+e14KutH8VG0DqMujxwSBNARznKm37vgEYjnPft+XqQRhWj0\nY/dMZJsUhK5LjXgoTcXlcO2rmtaSOoAoYx63++DWAI8YFFoE7cd9Ppa02gIC\ntec1Nu4X6xz3MyBDHSdaExBAH6DYgRfz6vvbDB51vqYzmXaUQEv50LStDWxD\nOASwVs2AmXjFSMM3fDCno928jwEZF+W64YyQdkpgt/jezd9980BDFbjHISiG\nQWfNJxauZ9J5fP/wknjUWYc9/rqmKAum1c7VyBuWO25kizmPJzz79cusWYgT\nvBglAqbDnTPL7oylVwnTvZQzodF4urKMDI4zbWGS76bNyVBaSPEpLFVtLQvu\nu5/atsRJvNFuPHgX1xMNiRrLSX99vYVxWW5oC5N++1ScOpZg/LRLV20CV6zw\n9dz8\r\n=DvGb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"901a1f71798221df51a93726f6192728bdda72df","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.13.1","@apollosproject/apollo-server-env-mock":"^2.13.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.13.2-canary.8_1620318406431_0.4056493490288702","host":"s3://npm-registry-packages"}},"2.13.2-canary.17":{"name":"@apollosproject/data-connector-rock","version":"2.13.2-canary.17","_id":"@apollosproject/data-connector-rock@2.13.2-canary.17","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e9535eca30240c50e09a980e702c821a06319c69","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.13.2-canary.17.tgz","fileCount":160,"integrity":"sha512-xoth+lU9KusUS8NtlZoGY4C4l1kTTD80nyLGlzkqLUhmcbJwQxCLeZokI07Iv9JtktndN2ustZvh2spt9N/4Ew==","signatures":[{"sig":"MEYCIQC0OKjcrxe892GMLFgz/QbWSDcd6oIl7GHQhfC8kK/tVAIhALmwWVoKrEBplVT87qKXNzXtE6Z6W96/WInqIzWFzhaU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1033416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmUsrCRA9TVsSAnZWagAAcVoP/RPGHbDNbU/H7ZN6hCn6\nAWuIKs3Z6SDj7uLZc0tg3O4nwRychcLzhww57CwsCOyjA7ytjVDjONxpJgZK\n/OyNerKwf0fpNOFUTXoS8n25KbKUr4wOpBK4v6C07W+Uc4SPzkstMBsBnC0M\nmf2N6Wxo6ZJ0CSginr2v9NZNGKh4npQhbDlcpxZaU8XLLJMY+Nu6QB61bkW6\nmpbd1SLPC8tEzdxt2CpivkBZNWS2tVfk0+UQ6r+DoN9N0STw/cObKH1BvmUc\nAk+6f/MONswI3Hea4DpAmceYYAhpgpXufItcvAS1Gdd/2AbRE0OiefB1hI6Q\nSIzBJ9c8jNWjrPRsAbnA6lry4Z0Fe2KRmPZ0JOdbwN1NWSJghWS1mWj+bdYr\npqp3zDPKpHDru5EGmg77nseWi+aZC/1mhEPU1Wo69I893p+UF9lMbX9l3laO\n/H2dWGpKf9MGzxsysmK3eK6DOQG3OyhdxkDVdOG/mO6KbXTKFhXASUzZoMIp\nq4hj52vOP009/TCbv7E5V7NWoSj8TSxLv56MUeJf7uhOPC3vQEQLUGIkMkX4\nLNbtBQcLFhfyz8DL1FO3nJke30++kcn/xkSKuuL5N0O5Mmcp0cO3TZ1vJznn\nHCYI3AP0P0yHRoTy5VLgs/q5IaxYgzkCW6cU2KDYHpjScMmc3yXHGNjI3ax0\njWMc\r\n=zQW1\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"ff1823d07b0239c09b7647fa731348db9e29c866","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.13.1","@apollosproject/apollo-server-env-mock":"^2.13.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.13.2-canary.17_1620658986955_0.8428037942466884","host":"s3://npm-registry-packages"}},"2.13.2-canary.23":{"name":"@apollosproject/data-connector-rock","version":"2.13.2-canary.23","_id":"@apollosproject/data-connector-rock@2.13.2-canary.23","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"190482e4e215a3b02bd33862c4c510867571a731","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.13.2-canary.23.tgz","fileCount":160,"integrity":"sha512-uhDPr496z3puKQWrvTbBZNWqgFFOXcet1YasS5J3bfVuEIdv5usU2bokwgr+25ioeDE1XhLBfODJlQI6oFEWtQ==","signatures":[{"sig":"MEUCIDLHWO9nnMfC44FaaKVN01iZL9Uxe6jFYJTqDsStPhJuAiEA4k2cJCI0F+8YkNBerHdta+qtcejVjq0+vTnGUoa0De0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1034419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnmsnCRA9TVsSAnZWagAAlDIP+gLc7VxDQSq513m6t4yY\n7Y+mfz1MqHFTe1X1Rn3806NGIIiThjrdRfrKQ0erd00tqQDLpDoin+SGXoeN\ntb0Mh2g/dFEt5+j4AjV8ZT/JyZ5G+vHJTlx68ODTqtMcEKOTKuMm3QdXwvzM\n4kfOXTY/lOKXg3KmXXvfEPbSjiAq8fjGrPfYJBfQqxkcUu5Or9TYq8pbwA6q\nmGrimS8twVbSobxV8C28ODMJfl/Fz7yDe2sgPjhY/A3pqDDGDSqSoiNZrPXA\nf9/KenbSkgpVEwTFzHYsrjLihca+ZWoCbF+I8d9K3ew9v7GuRGfLCxgxdJS5\nLXfkVd7qoC5L3FxtQFO95csCN1wSltU2Z8gKTe0514jhescDmsF/tiAG2YKi\n4NUIN2aAy1orIzR54d5umY7v6/Yh7OTFj+J1DRZJQb5jq0dN5HswMk1yhJVD\n0zlpyyyoWnAYL9jsn2b4UEtY0YiHTqqQtRX6ptkp3cvCxwjDruCHLObdbA7b\ndlZCTNo0BT/FlRi3NkpVXjeaWFGjQEN0/+oFFHJyQjaO9AuCD1GDRW+TbfN3\nILJourKBsJFSP4aZD7u+KEbitXN+UKoo5eIytEC9iDYAJzOLuKGnbNNDf93g\nHBTfSwrGItI5Om9sBfLqnT8UT1VOIyRS+JFC5iuZY65gL3j8iHc/Q810g96I\n3mO/\r\n=Joe8\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"844f67786d9a2b0814c9096ea89af42150910e20","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.13.1","@apollosproject/apollo-server-env-mock":"^2.13.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.13.2-canary.23_1620994855124_0.4693769878580638","host":"s3://npm-registry-packages"}},"2.14.0":{"name":"@apollosproject/data-connector-rock","version":"2.14.0","_id":"@apollosproject/data-connector-rock@2.14.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"61778e268eb2330ff7894fe67075be7893991051","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.14.0.tgz","fileCount":160,"integrity":"sha512-EfrajCKE7ZP4xFn35V5hGq0r8ROeYXqOJhor2z2ol07y0BLIMY5PN/CmPNK4jaf/lV4XdFb2xFb+8/pwQtOr7w==","signatures":[{"sig":"MEUCIAk2/zTyZaGwk/CbIUwyiEh8J3lFY2A/Vt2MHWDVA8vOAiEA6jcpljBXgKonHgo4VRtC/7h4nmTgEZXEiQVJRzLjrto=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1034721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnplECRA9TVsSAnZWagAACBwP/jDniNTplFgpXtB6+nUv\n0mbomYIIO46pKM6yKiIdOXczeLfv1h0zdv5c8ngyZqnreVFukE8n954d54JC\nRxqXDCMvOG7wPjpnIOGrid/00g/0Gxi7Vkf6T1zl3/JskGY9o6L8VMvnsl8k\nmcfO0Vpmovuv9dgWBGRGmZYD7SpazTRMh4Z8zjque081+w+dgDZRTR1ulWFf\nsYS8iKYJVXLerfxm/W+D0jk8s6TZ07vnq0Wmq/VpKr2v2bCN1PVs5BJvxfoT\nRSN9F+sAsfO8kQYikUy/IrzyxH6mb1F/wxxdwumjqjBUGRSVAFvkPr8yfrRZ\nQk+5i/pGr3vsZo+C7gPsvNAm308Uu2jP6h/Ct5OELi8Fp4WwpWfnJb+eyejM\nlBJNYdY8ark6MeX5zXRzDAXXfQEiQovUPHMWUHCnWZsOjAoaRPaVSZAKC6B8\nkeFw5RFdJZ/VkOebodSMCMGAktxdYG7jwH/g84Zl7Z82l1L/vrSaumImM0eQ\nay1hmznexTwqvqUV4fRa/sd5hpsrRIpyWv3QWR7QvmzZKdxwpDjAjlOMcypj\nOnIGVJJd8fLHrxDQsxbA9WM/7SrehV+IFD7Gc4gHnB5EquN3Q69/Q+gxC5ho\nw/OaeFAGQ7/Nyr9x8Qw7FrBa2uYJRxyp9PCsmPReUrQ7PxcBcgqmOqNlR4oY\n0etB\r\n=M1yZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"a967877717651f0ffc9f03d4bad3d27fc2433487","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.14.0","@apollosproject/apollo-server-env-mock":"^2.14.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.14.0_1621006659757_0.9956506364996425","host":"s3://npm-registry-packages"}},"2.14.1-canary.4":{"name":"@apollosproject/data-connector-rock","version":"2.14.1-canary.4","_id":"@apollosproject/data-connector-rock@2.14.1-canary.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5b802a81acbdd09b4e9aa91cd51a46f9011eb066","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.14.1-canary.4.tgz","fileCount":160,"integrity":"sha512-Glba8BwwaMvTGxBAObgDVbap1DhPT8NdX/WppznN8RaW0nmoau67jSzvDzoPXRyokRSGToyVYfHtDLW7DUAZxA==","signatures":[{"sig":"MEQCIE0eMJ/z4adOWQ6ThdaTn6M9TtSnS9AO1IkUZ0JHwIpHAiACYE3r1SUUhIouH3YXVA2B5PpVvj6acQkQ6xRkbduL/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1037761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpAKtCRA9TVsSAnZWagAADdcP/2wQuo2ZBMiCEFA3RaUc\ngheTqc5Ue6RtfZBMgv7qXm/Zf/VvmLf/0fe/oU5x5kL/RRSG2PMdfKdxjTHG\n3mZjQTZinTX2uvrbrW+EFvhpOMHbaj+bGNSWC6dalD8X5fsQDnXCUrBtC+gC\n6oT5krYLjSeagKB0pw46kVP7N48yqC10Ol4eGG19A41dmt1SJFBUcXN3JvVL\nMAan5h7q1UJ0g+1oQeFAwCt4rximT6DQQ/3LBhf+l4WLlxAiYRMZ37Sma2vi\nBkjLPyhUBQ3H7pnXSQmz9+7eB4ZQM50UzbxzokaP0Bylk2R37Xdr+R3A7rZP\nbeUswNwR2AdnPd0RWD75n0mzhPP8Rsxkp0iNyWnzH/UMcReU5z0/nrCYVsOT\nNwuDHrqcZd8rBXPcbxExb2wd+YnqCj4W9xi52qaWpAIDXjVJNOElYDoSiFuo\nzBhA64AxLC8PQjVReiZQ4wrJd+17cid5JbLm3WdFqGXubpWImMbsM2R5M3G1\nuqb0nqCqpIlv9nNsbBpbbLaFCTPiAtbmbt6WiKcsoux8z3LImpMPuYC1ak6j\nzYVy6kI3jjZwVVbCSAVV0EqgzKvX+DyV3NmqpXwIYckO9P8HlOuYR/KSXaMY\nwQR3g7ySaIDqe4P9RnHCugsHlMf4LPyPxT4UtWDuKT+LHNjaOotXD6eSomUl\nD9Rw\r\n=EPb3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"f038a8789615a77f135801557de6eb06ef3825b5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.14.0","@apollosproject/apollo-server-env-mock":"^2.14.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.14.1-canary.4_1621361324512_0.2921079521456429","host":"s3://npm-registry-packages"}},"2.15.0":{"name":"@apollosproject/data-connector-rock","version":"2.15.0","_id":"@apollosproject/data-connector-rock@2.15.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b9ccbb4e37a95f21e6838a2e471f4be4764edc0a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.15.0.tgz","fileCount":160,"integrity":"sha512-k/69UU+32pePQZLTPMGyPs9AELdLnnFmYwtGO45TM3t5EBCGSU5e1nBxQ2j1mHrEdNKFmZLH1IjoAGbX1588Pw==","signatures":[{"sig":"MEUCIQCUI+qyxThNt9Ln10/nIDHg1OCc0KHsjktEbOdTavyj9QIgIEGjdGIWfmY1pRKJgu5lWg1q40vO4quJIFL/FYmovjw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1038064,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpRsVCRA9TVsSAnZWagAA1nAQAJDDKHeydFcJrOa4PdX0\n1if0bT7sAafnAIVLwxmGDoa9Oz1APd9yupo4kwh2lcVgAGZ/VWJhqLpAa/qB\naB6/HIOJOVfJYAqSeKpIMw45CbSmPbBg0P2FhyabxKe4gGrsB+blII6lW2lC\nRaLArkZDhfxlfnW8BggA93YuSsxniwdxa/ycfVfIvWw9ybi0CpsmPJgEb5jk\njGUQkZ20GVZ/1q3EK7Qflkaz5zJSD/GEaU7eEUr+Tk59hLnefzLpMwkx4qed\nTPY6asxdgQLW1d8kak+HgHPZy6m2uBshBy1AXfbVTeE1uTLDNd9m6OWG/ZjM\nR8z4CGlJzebsStwe4++x6iJE4CsOtVpuS2G9E96CwZJc+ixu2FsG3PmnhIYn\n4syZmyBeB02OZ0nPKPJEs4X4FI5yv7QMpOuXG52+3mC2iA22R1TpioLJ1+Rx\nL03RMgZe7iXm5lfoq3ya2fQGF2k/YwKoPaa61SFnqIztKz4uJMlzoVb5qaS4\n7cUSt6TVA0e6pi7pf7VVJw891mf82Zgyh8VcK85DCOcb3VS0HAAjjkQiWVUy\n0HbvhmSHXQZzogY6Iob60c42WAKRagDMISHDDYueYTUgPh6VhdEi41rLb8tT\nutB8BbMUosGQS36DNR9FXssw0g5xuohmJNxddj21/T+B3vejTYN0cMTRzQ6f\nrznQ\r\n=z3kw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"cc1c7061fdd962d1ba4c987743a6cc6053d365f9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.16.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.16.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.15.0","@apollosproject/apollo-server-env-mock":"^2.15.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.15.0_1621433109330_0.7929222649826626","host":"s3://npm-registry-packages"}},"2.16.0":{"name":"@apollosproject/data-connector-rock","version":"2.16.0","_id":"@apollosproject/data-connector-rock@2.16.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"235a1e45903ed69d9cfcd6c7279f17f06d16682d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.16.0.tgz","fileCount":160,"integrity":"sha512-kLv0AFvicTcn4VPzi4F6hBFooEs7vzGybQ8+1PliPIdxMqF9/bWQB7m76j8Nf8rsf2cPeFFiD0KtQzJ83ANIUg==","signatures":[{"sig":"MEUCIB6dfkGiFu40Cx4yMTLs531l2m9whut3ppEw3rUe4amKAiEAnXHLK/IeWj3KEQzFYqnSgAbhXNXqotBTePWz1fHyIKs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1038245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpm41CRA9TVsSAnZWagAANcgQAJajHpSOg/cvx6cQjJhr\nMnksAQOobgjb2VN1qSnxgywH/NgU1FB80uA41o78yNr7kmiD6S/K5WN+0R1w\nK2aqIaALc+w7N7GcmPxWUCKoJ8fTLC6p12bhDHg1jMgUPAe5zpXKiHMchZuB\n3KyXgdrjknwE6MdLL86SJquZGOf4JWcrBYwreGwgrV2ccLaRpXKsC+d1zDi4\nZCvmJhzW7Jjm3W9oekzjBzOr11VmLS4zb4BXGh8k1cX9WjMyBIxeeNHFzHBB\nExckzX3Ru9DC18IZsrpfiLchXBqbE11fn3ZxUGt78/u6rA86QQksqd3Yik+l\noVmrL5iu+9wcPxQ5Ngb+9o5m9tF4EGDY2rohhx5mQfFSaiD14G9i6HuJCvrW\nO7PXAzJuXkBxx827iLrcPsdKvdE5fUEC13F4n6p2XesPgKYhWhGyKUlpUbsD\nVdlNdat0oEcioo/pJJHbSXarI/CF7F/Guwu3JZbat7PtvGGSdK6qI8VQ3dHA\nzS0GvKUEKGO+PQLa9959wUydArrD0xpQDXc5mJ65NycU+kX6I3zRjzHfpOXA\nZCf/14ONlOZngKOmzaeejutxKOH0AtWQJj1+W2RhMFgU1JzDB/QikMAUoYg0\nwYaDAcgFVgzcmS7X23N21Oef2533svtu58VF3/+F+B4v7L65QPG2B35kUdmg\n55IB\r\n=GOBu\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"ad284a0df6c7802af069bfaef61e51789697a4d8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.16.0","@apollosproject/apollo-server-env-mock":"^2.16.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.16.0_1621519924621_0.9738134409709229","host":"s3://npm-registry-packages"}},"2.16.1-canary.5":{"name":"@apollosproject/data-connector-rock","version":"2.16.1-canary.5","_id":"@apollosproject/data-connector-rock@2.16.1-canary.5","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b547112c01df3e46dc65ee87469b11c349956227","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.16.1-canary.5.tgz","fileCount":160,"integrity":"sha512-VABtSmUEdS/ls9wXfH0ZPVHMnAZ1c8yr5tuOAWlAjWjKuADL5gMDwofF+G622u3y2hd8qJHubrzAuxqK7/KTzw==","signatures":[{"sig":"MEUCIG+q/HZnNSYmO8tMs1TJ6v+331Yli0It9SMepFOrtMfrAiEA6A+zK/2LZau51SQLczyKTi/SRxvhRGqzhyWzs+I2Xsg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1039089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq+rpCRA9TVsSAnZWagAA+VUQAJ+aUJRfzJNQjKPRKLV0\n6EFfgV/qVI1eCpZfiuHA9PZu3dfnhQWoWMs5FBcvxqvgHxkS1PXg04kacWCA\npw4gH+/l/qqQa2bH0WUNai2Oq4H4Z9THxQd/dpFTf1MiVB0tkMMTQxkj9kYT\n9hNx+41waYv9aHpUGON6/dIsfx+EDFcpWteMM9uGI6Te3slh7h+8XNMf/Lga\nG/4qHP6pNzCO7Yce2IJuwCG6A4I1VJO6OGbWJgi1ohXwxj+wZ4uUB4K65R4H\nkS6mWmjFv3n0SorfCmCtHQyRz0OzOD2cyaPmnM5sYGckz+6y3RaB+WfJ9JhG\nPrmEUzW2QkS4uku4YWTTdTgaZETunkd+CeYc/XGvAXAGEWR13fTXdwGuckeX\n0aOn2E4eGTva+j8Mf2oqLBI09AUGmX8t1N9cL6rMkU6QyFIZDdLYSFfJ3kDq\noTg0r9ZKGdL42AbTgNyl3zZE+QR++eQqX4Mi9rx2HylhoS6bDS9Pi/1mJ/yg\nL/kslYjYS3wL6A+p/+oXKVnB8gh57eN91WL1v48qbWbjpKtzjBTM+YLNAjDx\n0Sd/hpKRYe3W57om+nscbVbwtmEIS4ZCtAVz6TeZu+wLnwoUIuR9E9aEgZ1s\nJXH32EonoEtn00C8EWbk4SDfbmDO5/PV/tR28Nw780srbTWhl5xyDYlg+J3T\nhvQD\r\n=PCpj\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"98a57225110b1a8290ab93e41c63461f152a65b1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.16.0","@apollosproject/apollo-server-env-mock":"^2.16.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.16.1-canary.5_1621879528727_0.5369497933235925","host":"s3://npm-registry-packages"}},"2.17.0":{"name":"@apollosproject/data-connector-rock","version":"2.17.0","_id":"@apollosproject/data-connector-rock@2.17.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1e1230bbf0098462a34f30dfde2df29a1d4aa7c9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.17.0.tgz","fileCount":160,"integrity":"sha512-4lX9Gwu8eb0GOTHatxc/OB2KcKA/xJt9OGdLzvgl90f0NPddz1qxxHMimuUDjaWeiiaRF+f42wymP8jg0NHOaw==","signatures":[{"sig":"MEQCIFMo03XbsnEQpPSq+SDKCwqMQSmg7ngbwTMJjnInLgqYAiBbjNL5M2oanM8e94z8Ohq4SeLRL+zJVPJQeRLF7nCPHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1039252,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq/NaCRA9TVsSAnZWagAAEfMP/1vpL6ZCgWAwPDEa3xQj\nGY6VY14epHUV+QvAIpcWKzTjvbqAba0ws3JtMmq9dyN5pX+nQfWldVgkDcSN\naYnDxpyGI59VjUOQdWNnZcGY3wZXTRjRq1oS0dCuEw4ramncuIhuDaWG3oK5\nDGl+FeuO1defRBWYIw6j6TsuDeHOU+reQDORnYwhAniGvsRbLv2QJx0n8oh6\nNy5cBD/j3mZwdyaEqPAw+d8+cb3xazdasg/a2ncI07rooVZTYFfpueXKPSjP\neJxFJtQcf9t6dWMvARdKaVc4rdXIQlfZDvqDZeBCDZySXcFMvWMUSXt3OlOv\nJMBFiRwBtkfUR4L16mIN7P+4X2kTemBle1yASQTlZwvdRxlgOFaH1KfVMoxY\nEQbtHq4iQW4JEgJEMiTVcg/79iGUNBBrwLpitmZ/niMGr/YmXwItFseehLQD\nIQcIOZYgJGUvRitidWg6u/CEd4n+NeGKWLrW2wyA2hl/pvUSNIMfKxWwZWP8\nwGM8zjRYLteBNJkPY3/UhrEEjgGQ24GrKbL3DMOClyu2Jr3nwiSbxbyJipKS\ng0qTTygRdUO3hfo0BVmXg0QpuS+u93J/KTsPE7jzfPvuudFvr9yV/2UKQH+/\nnBBs3WeE9FHt5odqlsl0T6OP77c3vnAJChElc1ROvJQR/0gF9gVJoaoR3sUJ\nOoUC\r\n=QlqW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"008f0cb96c1a1c1ef39a35216e906d6eecd3f11a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.17.0","@apollosproject/apollo-server-env-mock":"^2.17.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.17.0_1621881689857_0.5213541762170375","host":"s3://npm-registry-packages"}},"2.17.1-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.17.1-canary.1","_id":"@apollosproject/data-connector-rock@2.17.1-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f97a82c50ec796142d8231c2282f82a8b98685ab","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.17.1-canary.1.tgz","fileCount":160,"integrity":"sha512-yoT6aROTL5um6p12HbqTFre5+IJ3Gby9+2qtP9VMHWIVQgZpifC91KkEe22+1ZhtnWM/lV8M9dbaEUrHbyOolA==","signatures":[{"sig":"MEUCIDlRiHr9PR9etQQl9ZwVdOyupo8pfZSY6Oj5K547dOgbAiEAmdaSOoAda19MowxyjlQ6t19g+vcK6VlfAD4ymeYI+P8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1050948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrUJ4CRA9TVsSAnZWagAAY/gP/jZ5cTpjaZs/DWFFNPic\nzUdYm5kGv6bdq3nxYsB1t6eZ86uR6NuTSlMZwVI89ijNi/ztWUPD0L4CN0KY\nz1oO0hSzlQvnp7njTwWTqVWEJRfgXYx9k73pHa7xzMldHW6YnbtJ1wrhWbIo\nJz7ZpPCHkr4tiOo0j4/jMM9mXmUdtbZQusKEFjLybzStXVFP1TnKVJ4b7HVq\n8ZO01KT1+R5bDpZR8hTssTSZ/TsV7MpoM9mvSD5m5jgYNtbm9FkT/tHCFe3p\nkX34rBXwlMMlzjLHwIGswu9uPf1411wGwhIQt/Qt7Z4mOxxpejXhdwEKdym+\n0P44kUMmf6udUVrXVqtiH05ZdWyr/w99Oi4vd64HU1sVeEDjGMebFsudbAMY\n80scOfjrd7JrCaKfLCwJwpn7B4sHOKqirXR1wEzPr9C3EIxWe5s53Za6fmjM\nzLNCkDRcAMjVcFx0dultD0+1wyQ9iFm4yMt5XWAK7h9s72bTKtbYZnfrKqnT\n4BFNwYurhmx/LSwZFhhbbJC16HvnVrv0nkvufRwSwB16IaVP0pG0ZuLcvzay\nfATsOuQWWXysPxwaOAOT19tuJLVBNJrlZ51j1tHRdCe4rOpixqNo5ld43WLV\nUGp0G1oNPqEGtse3mjOJLCFvgX3aPGyu0jx2DM9gMPpFckyU2hLZ2ucV3P6p\nOZ9X\r\n=1AyS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"5edd840786180956124f75903daf000da9d82ce1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.17.0","@apollosproject/apollo-server-env-mock":"^2.17.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.17.1-canary.1_1621967479977_0.22723293740213313","host":"s3://npm-registry-packages"}},"2.17.1-canary.2":{"name":"@apollosproject/data-connector-rock","version":"2.17.1-canary.2","_id":"@apollosproject/data-connector-rock@2.17.1-canary.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"af792a7f875e8966f1e4d092fabd5a70bd834f7e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.17.1-canary.2.tgz","fileCount":160,"integrity":"sha512-EEI9Mz38vKuSbSv5quK3DaOOcsNDNyPYkYuJxI+mNEN5gaPqCZtnxKWtKHLcGKAhVR85+3fKwFI0wqC5Q1JjAw==","signatures":[{"sig":"MEUCIAV/Lrwghac3c5P8PnY/c2VXDJlmiqIK7i2Jm9M60oShAiEAmj71V1PIsAEe6pN24rL4NqbPVyrZqqVeVx8Lir7GJY8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1051065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrV8KCRA9TVsSAnZWagAAtTIP/04U4yv0m6r1ef/LE+kd\nbH0R/xmvrlnXjBf68O+cuTS5UJi5ZnITNw0oq9RvNZpVUQna7bHvcq1E96aO\nqocM4BwCRROzBTNR44Hc93fey35oO6GVf9xToVBJIVgLgANuLcN+qMJwVZtZ\nUsdZ6/vvne0eKSygRGcfpct2t3Jcpat6S4TP4BVK5d1u6O4RZZ6myv7R41Xq\nq2nWot85DERhzC9ZXL7yoW90KIWq6hVE+ojqoLHGscJXUYm8WLVq3bUXkSYO\nV7dG67+7TSCq4nLfrbH6d9xHFg56lDdjshjlUM+SKz36jtKOgET4UH9fOWzj\n5OZLD7EFDM5fsom6g04ZqSF/mZwCKMUXVuAXwdPo10LXdCACTfX1GG4+XtG5\nU2X3DLDjqe0W6DUi/VzrBBCEnpKdJOiN/vMeszRrGDxneiSfNhgwnwKg9VLr\n0eLXnFqg3dGNIUeKsXCdcg5Rpym38o4B3kH/owSI4tqTVUy3L3SrGxwnR9qN\nVU6uwWwAw49OThbezXUMi7rgc+xmszP0K0VrPXE+K1dZJZP4FfD2LEJgV3U8\nDw7SNmt1y+aE5kiPApdBwZuSRMzX8tijhUTRWMdF6zzBJ8ypOY2XDf91aVtf\nxlpVS0eGFghkajjkdVjYhFeZVp+i9f+16L2Rs8AKYpDNhyzd2WCEnHH6TEZL\n6qAc\r\n=f+Bu\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"8f57b119b66f04a48c3af2a154be3fc50a553ced","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.17.0","@apollosproject/apollo-server-env-mock":"^2.17.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.17.1-canary.2_1621974793486_0.728201386892513","host":"s3://npm-registry-packages"}},"2.18.0":{"name":"@apollosproject/data-connector-rock","version":"2.18.0","_id":"@apollosproject/data-connector-rock@2.18.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7199e4725911055636d52b35405bc10e713ae024","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.18.0.tgz","fileCount":160,"integrity":"sha512-f3Jgeg9CMkg6EO+L9kb9VquTiTn+e2fmLLjVzrAOlbyIpBVNEnZ6SutMu2U/TkEMXsmbQu2tDUbR9Tvy+M8y2Q==","signatures":[{"sig":"MEQCIBLunMDhW0CxUAQOQydDjru/bhhBDKhlrPikXr+mcuRCAiAcgl3D2vIUWJZGIoLXuCRtvX9c+E8vIrcK3dSLShfZTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1051378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr+N6CRA9TVsSAnZWagAA1PIP/1PaV+ckN0ZnIGuI/iaZ\n5HuCNc9oKfZPEG5e9WTDsXLh1e6IOaT1QeJVv1ZrSdhYcGq3Kgq85s18GmdZ\ncP2VH9QFQ+twc/Q9beWU8xAcerADz2aMSccXpjhFjuoimClaNbCjMyUw/0/W\nT0N01uYVBlkiENbMQCkHm3cGBP410cegfWcdbOWkuU005aM25hCygOPrxFxj\nY+MW+RaD70sKc5XzZBlt2bBZiWcfYwmFX1Jk/h3y9Ua+fT3PRg18Ltye9hEK\nE2vtOBrnwVBDDGuD+QPiLBlPNWZOtyUNUTamwBj61RufRs0UOvhs9O7TocCv\nasrCcl8oBaE1f13chAfx8aECzrYeUvAYW1WKmyphnO1L797lMUFo/AbNvPqu\nteiQarUXoMWVVcK6mNgU3qLaFV7vwh5J3vlGoKjGoKIsO7aUrHUiL3eRiXWa\n+4S9ADDpU9JFKy8a/ZKTVpjdHqnJ7bl0N6nanJM7ZA55n4jHrKvMbA4nnowU\n6Rr4naRY2ho0UKXlpKJk2jLd3Rh55Kb7K5DlkrNWwHLRgWe+85mJ7c/M4qss\neuBIpIGT6qvkDUnwL14u275BViIJ1K4orRYWkilMSLKgTEtqxgNw6U9UzeTd\nuKfewqMwtgUObnFRXF8ZOugvN9Swd/V1pytf/71CBUIFRN46GGbb/pc7ExBv\neJxa\r\n=ZRLv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"ec65d9c8d6eebaa1f85e64a980e8af7e5f41e6fa","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.18.0","@apollosproject/apollo-server-env-mock":"^2.18.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.18.0_1622139769788_0.40935893786253974","host":"s3://npm-registry-packages"}},"2.18.1-canary.2":{"name":"@apollosproject/data-connector-rock","version":"2.18.1-canary.2","_id":"@apollosproject/data-connector-rock@2.18.1-canary.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e325966821801350a91f5f2aaf729694e29e71c9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.18.1-canary.2.tgz","fileCount":160,"integrity":"sha512-CDmx+iGmTzCvMX061Uvrpn/98xt0u8tKs9C9LzPi4eGmBAlh0Cp2mHcgS4vBCUcDY+iQfOblcSt4N7fA7v/DGQ==","signatures":[{"sig":"MEUCIQD/3gapyvjQva6JEsH26476BCT6kiqkQ7f1VApFyEveyAIgTknAKlqvNSRuBLOKZXff3ZJ1IKG1NfGhxL5RwqIa6b0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1052086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtlFICRA9TVsSAnZWagAATBwP/RekXZzlaZJbjrH3MVVS\nHHUKzn71ZhROqkc8BIz6p0uiicaCBdLyFuyaTTjtNLsMFi/ydoD8KZ+nlYSC\nGn8IpNrYdZJ1ASN8acOjQxO+m46lSxvana2gHwT1/T0cxJ8+mVoqNA+xSsRB\nTkPtzJolchgvG8FryhisjsWmCRGwhxU1Kq/83xamcMdVu0IZK/Ep45pfCo7G\nwmKkwpt1DASCHQDJ9bbnV6hJ+d2bFw0lJ1p3fKk3Vex4kjcQTJP3RyzUKS/c\nZ4XzyNsT4g4RFw7nDUEAHsaG6WJ4T9t+ZwyDoaOJYFPvNPQlma/SoBsCe9/I\n62B8BXwMsvy8T/dQ2Hym4XaxEUMsvUM466T4jVESp9WV0pZxRIPNZLOKGS9Z\nIMzqvnzAY/U9+bpYikMSa/yGEVn7RpnjeYhDf573xSlCOcl0gQxI5ykBfodK\nze8HcyChln9Tasr9NCmLgjQVBoqCPLbt6RG05GIsS6lkuFGGeJhGJC+4y70L\nFHeYb2Z4fWnVUqfwlZk4q8EoVrjNNezAqt5ShekBObLaebhUzOcgQUglp8xT\nBaFxtbF2eWxCixCNBdHRFOHUOElbDNLBYMawm1RPIwj3PxdMZ52CmxT8c9Af\nK2ZDd94PxfCyWH0lOkPEl3AZI5rV4wx8ITBqLZcR5WX0bgIrxGjVRuFzZ7Jn\np2E4\r\n=vt2t\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"02e82d2997360c2dd23dae4b3a37c8dcb544140a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.18.0","@apollosproject/apollo-server-env-mock":"^2.18.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.18.1-canary.2_1622561096232_0.41934569958117174","host":"s3://npm-registry-packages"}},"2.18.1":{"name":"@apollosproject/data-connector-rock","version":"2.18.1","_id":"@apollosproject/data-connector-rock@2.18.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e477351d48bded94809cdc42b90fb38e4ebed110","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.18.1.tgz","fileCount":160,"integrity":"sha512-N1TyO5jXUhrvTksAI/sOLg+TeLVu4t30ra1hG9vAHmm9Q2VPFiiZsBufJnMGlei+6ouqnZLoCgzeT9z8gtIHbg==","signatures":[{"sig":"MEUCIHaTqWPaCajr3Gji5MZFwZyUshQyC2+fHVap8aQ8i7icAiEA9xUjJ+/ZmETjr8z24L7ypmk83bKILNnl/CncGROzA/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1052419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtnTWCRA9TVsSAnZWagAADuIP/jveWrZV67nMnC06kb76\nDDwWfaXo0+3kVN3q4cFFJoAq4/V57AFVrzUfpp5tVsTvWQAedd8Wb+e8hNQe\nbqXi/6lBZmvhfBnBZ88OcMs5PFlbXZvs3yEOQxX3cgXR+mPTRE3/Lb4L4cy+\n5/bmkTymuWC+IdQG59rRzgKZUHlSNErRDgxOgO7BY0nNBrEsUtdP+ZZav+BY\n7NKnk3Q3bVnSYb1k7ylNUIZNRW0vkJ3MDIfvJ13jI0TW5GCjYFKsRVcQ2s7R\nkGWx0UdMw9z87ufVBABvb1aPkHbIBEsAjkz0HiEvdqygU5U4YWxYRcrb146i\no44pHdXYu1Y2oiQ68A7KYH0YY9xJQCT1GOq7R28H9hQD5NLVb5Pq9rpjZBY+\nDEecsnfbTGIQ5bb26+QCqmoVF8H2tj/PpytnQqhw+/uyzFPyMVXjuoLIFex0\neT5ciGqZMyYHAF/ja+c40sVCv81DlbaibGut6eVToZTFlx6z5shKALi9JWRD\nWf2yTzK3bnGCzKolrR7mZQDQZ0ShcgzxomWHsVWxhXRyUSF9gtd4hABkIUrx\ngD5Znm3y9839HMkqU4V6PCyy3B54RzKNUG1e/DH9GEZpy7ACl9VgDmtAGgv4\nImUxwh1o03EyR3Pa3bvokjdz4gNvWxIku4LLDgNPFNXWCHH1p20SrSUa8B3m\n9v1W\r\n=anp/\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"94fd41c7dea0690b83e5e8796a06c7bdf0a7ab98","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.18.1","@apollosproject/apollo-server-env-mock":"^2.18.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.18.1_1622570198247_0.8288498815480267","host":"s3://npm-registry-packages"}},"2.18.2-canary.3":{"name":"@apollosproject/data-connector-rock","version":"2.18.2-canary.3","_id":"@apollosproject/data-connector-rock@2.18.2-canary.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5aca4e54e08abbdb9ea60576abef9442edd4e4e6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.18.2-canary.3.tgz","fileCount":160,"integrity":"sha512-oPBquNGEREwr7FpVH2pQFdKhDljQnTElX25glXyiUOCvXSfwc8XRQjnogWK8EmvxsuW0xamverDh5kzyRUOsaQ==","signatures":[{"sig":"MEUCIC+sgn8YJRGkNpMVNlDO+ItrFzipQS3qLNoNMDAtU9z0AiEA1RVYgMdxPX+RGHPH7OHKh3YpM5zCGvRwgazHyuO5yPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1052906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgujghCRA9TVsSAnZWagAACqkP/1ULQyz/dn/8p55Kqzz7\nFSU1MMCeiHbwwHtsx+pXRQgO4RBFiFhfsTtdmcV+ZClK3NpzeOFQTtNmcgu4\nID6jhoR8Gh/fPIsTKg3fci133xfVqwUqKrHtNRkZ/FvFdChPik1xiIHbvvNj\nXFVTivTo1wjxiXfwcI6gRcg/5cV4Av7kF/+3J6V1jznlUqKSiU6228HwzzJv\ncbOB32sWrh5qezD+/PhW3mCVyUW8X2CzVQylk51QQcn10XEOxFenyzPsFQ7c\nCYjHqqGuXKfSOE82L2TOCGKzUBo6KDD0WZ9M+wkqrpeZEZaoVevrIXf3m08F\n21tau1w0yh410EPTl3s1zVgbmLrPv064mra0/J6+ppdmWQDYoo4tgRzN1Mvc\nvviBXITgiRd1E5GIeVWTGcaUwYjg/oBcp77CJIhRHTgE83gYr8eiZKBMnI+2\nIGwYJ+zSbAlSfIuso4WlTlu+4vnfQqisk4mEuZ/zOCImAXTL4WnFUvmQDm9q\nojkC74qGgZQLlE4PhnElQAidkUclKFl2Pj3QqqAtksZgISxbNmHHe9znorfl\ncoa0VSCf+jTN0NgunlkHJ+CKMQYoiwTrVzAFBBMx6WDXVduzDtAGEt1XjMeT\nG3vMC2VXnMIHTPooPMWJzSZRGqABTnwHMaVyFyH40TdfVjirMtoMV+vpXnJ9\n+y5S\r\n=z+NR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"f688eca545423c9e1bb09b238db402546173dd45","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.18.1","@apollosproject/apollo-server-env-mock":"^2.18.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.18.2-canary.3_1622816801729_0.16908355501222605","host":"s3://npm-registry-packages"}},"2.19.0":{"name":"@apollosproject/data-connector-rock","version":"2.19.0","_id":"@apollosproject/data-connector-rock@2.19.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6bde7e2285379f284f00e9251b168c753d0f4e7c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.19.0.tgz","fileCount":160,"integrity":"sha512-MODyPUDrg7Bivd2UHn1dMkopcKEjIs7QVOVDHmqobcD4vJCJLJPy+F3dzDuxS83Fp5G2EWao+BOJU0YcQe+q4Q==","signatures":[{"sig":"MEUCIQCXUZLJCN8h31w4SfbAiL59+dIww+YPSM22Fzgm2aI8KgIgX0khALjzR9VTJC4Na9TFR+sjlV5qdLdWKyLWGPZJioY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1053069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgviRLCRA9TVsSAnZWagAA3o0P/3InQcXehLm5ayyTnz6l\nvvC0KfivDfes0NTGMDWkWFcmikQxxTed6As3J3VVz3w/4hsnay0j+AQSwESV\nELVdg5ymXTRWI0yaagzIJM+5MZ2yAuia8JygHFJeGsXd9y5q3SjSWCDRhKkA\nK8+bLhISLozS7ksxZrULyC5nzJ5epHCEW/kcvH/ScMwK0Br/RCLEYvk5+POk\n/868jOcjE+AJgEFnnGYcuRuHeCE0H/CpyOA3KBDxGXvhWfPN28bczF12ZtXq\nPIeSLjqOEkvKJQQpCLDp51ZX7DkBpVBLxAi0c+aSgeqgbYmztkFLl91Fu6QY\n3MdXOfp79a20KhN5qRDwHE/vnNLwJ/wb8+Bewm2SZ4dwhywgSBsn85RtQjgE\nd4IURHvjNJQqoX9irIWr6pjMrdGnMqcVz5POndqCWmdO2tF0FBpPlzvkocTw\nnavprAoe8MhhnInDh97Jvji4VbRnnxOYtvWVTPkg+JHx/KrwIiwC0Mgq+fz3\nW4wVXzuGzs0hHwOxzXxNSubvszHAkOzqPVP1K+FF0zgZrG3aL/QIJrH9MKvs\nh4A092DRhLo9mTK7fnU18stp+Zt/fYxP8MEJ4queQfGFv1LoE1t5kWc7bDir\nLBAxio7dMKcAwmReD+9cc3WkNpFAMNyfreSv95GZ0Uo5P9GeKFMm1gyKfTHm\nmTXf\r\n=Z/+F\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"9ee85feb3e1be9718c6996ddeef78b2a5aed34e7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.19.0","@apollosproject/apollo-server-env-mock":"^2.19.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.19.0_1623073867176_0.019120435082018217","host":"s3://npm-registry-packages"}},"2.19.1-canary.10":{"name":"@apollosproject/data-connector-rock","version":"2.19.1-canary.10","_id":"@apollosproject/data-connector-rock@2.19.1-canary.10","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"4a38e085e9e008b492bb95ff7c8f28cdb864e170","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.19.1-canary.10.tgz","fileCount":160,"integrity":"sha512-KjmeIj1yywuLRD010tqhsnTIVEoHENp+MPMGkVlAiZXSlzrnWEpj4++bu4g+UpoLeLrFJBPuhqcFO+PiyhAG6A==","signatures":[{"sig":"MEQCIEQcZ/BEhsLOweLAQZF5/Cyr2AS7S43wu97+mfYEXBtDAiBJ4S+2WvUcGfDYyPAJyi3sZoba0bpMjwEL8jh9NGjkuw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1054058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx0RDCRA9TVsSAnZWagAAkOYQAJ0N3XnH3Pf/pK//vaJ+\ns2/VslaPvszBzHyDvdowc2jK/djl2dhr08VufGYjlun2C9/eNUAhSOkDrwBz\nWS7CtoTrEdIHvIt0iS57yJgMEP/F2Is4ZGNI71x6LqVlDQ+fjwC99vQE0wCr\nDaY1b0pHj+OB4Eo0jZkJsQePzbcnQb5xUYVlJ7xDnLHkCqG5gLbQTO4zCb4a\nGMC9FHVLV3GYfdS1TRSOpexAVLneymyCv7OC7GyJNsTso8Nt6PQkAHZikccZ\nwqTWDW410V0jwP4w9mN+r+EEWT+ViqbF5NA0QkJRIgiggpe11z9HQNaIwSf9\nVXdjh6TvQyTKJd2qSqEn2pI98GTERf2cESugs5h/7uoogOV1LoMPj51wdQr4\nQCSLIYkgQ/mgn4ExXoleriIyDSTtaH+RQtW+Z2pUkfnmVMZzrveGsw2JXyL1\nxypJj2llAEMiW3DEIAS7WsbSMHfZZoFPvgK9NzN75lvWEqlWFR5sIoiQbxlV\nfpgf/ACHOkMjNmAzE2WVr0PWgU2udH/Ydx5ms6k6JQSnf+RJH6aELDfZb56E\nM5yhT1VPB+s9Rnywb+g9AD+Zj/A0aDp5Nkt64GRqlwvbD4OCA+Wnpus2Rn72\nO0TX8wxcNeAtThzaBjd9UsQpdcVJC4rchIZIDyfnpBFbQt6bRnhrnSbVqgQI\nt44B\r\n=ryfI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"cb5f8f1c0b24f1b215b2bb5eb6f9a8e16d728ce2","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.19.0","@apollosproject/apollo-server-env-mock":"^2.19.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.19.1-canary.10_1623671875499_0.18503184236448078","host":"s3://npm-registry-packages"}},"2.20.0":{"name":"@apollosproject/data-connector-rock","version":"2.20.0","_id":"@apollosproject/data-connector-rock@2.20.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"feaa0b37c2bbe0fd0c714b845b62e7852a850c5e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.20.0.tgz","fileCount":160,"integrity":"sha512-I6wvzhZiylQFUDm+nfoNAGhaDxq1rW+CZxN27W01CXNL/OyGTh1btMvNYpioGlTD/7e4hwr5qS7f8pgo8w4+oA==","signatures":[{"sig":"MEUCIDl/QTiht3+2xCHIL5Izj7/C0GhTDnL0YXLHjNSfv2+/AiEAkhh4OGBUnOHXs7BLHtO5L+g37lIuLNE7Qh1vK2aGvrE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1054371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx08eCRA9TVsSAnZWagAA3AkP/RTD2f6THIgZOnl701Rn\nNSbLIDBw8sfSHw4pCHU9kkmLtuFQaoVh/0L7nFjPXWxG2UtNinLL7FB31QoV\n8I4yRdALXher2lBgtyDpgpbZHN/aD4g3RUN8AP/THb6VJpgB/m7JK3kIqCop\nlbPeG2SI06T1esRVG5hpDfD5B+AFtxbWeTpM43Choormw/jOag75u7nZV5zm\nd4JhSsaio2h6i6tNYYZXqj7QFfYH/1PTXt3g971zxQ0v9Ekra9wIOrc6fFGC\no6112Drr1wB8xYfXAP0lPUqo2pCNhcqek2ieruDLM/wEY05WiYlMGr/ubaB5\nDeblPJKXJjFalO8r5mX1QGvH1rThjpIWn61NKIaeGrRmtXbVkqi9/qWuTGAw\nVMxaS8tuPoWVdvhdncRbP6RV2fg0i+SH65hGW4I7rln3q5p8l6vee0oMV3cM\n9+xrZ9b7VzCy3UH2bRsTZJmfJ2/mNSBS1jKKxl+nTIWxlsNxVcz507Th5/46\nKLUTfgEg4H3Cylp18eX5pX4hDAMOWZhuOsF5jinzGMwM541waW6ffDAVmBW3\nw1afteghuznHxfQDT14ufoepxB4ZvyNE6GUzDpdXM2Gb3rpIJIlwZTIkIiRk\nyhs4Co2SjGyf07ZNN5Kdr7sH1ReAYsOyU3x9nTQI12DRuL9qlK0kq/39JIji\nmxKf\r\n=CJcL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"1495867f88c35e8462842b7f09aad1fb29d896c4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.20.0","@apollosproject/apollo-server-env-mock":"^2.20.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.20.0_1623674653904_0.19543442900271346","host":"s3://npm-registry-packages"}},"1.8.0":{"name":"@apollosproject/data-connector-rock","version":"1.8.0","_id":"@apollosproject/data-connector-rock@1.8.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0000681c099af4f444dd8c9315ddd52461856190","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-1.8.0.tgz","fileCount":158,"integrity":"sha512-QVGTUYgNkM01chRXjzFoklwlXf3ORXQ/6S/pVuq2x4qwQcIbjLhYprTbFBz1IDdm81XVgScoP5N8pdQFNmsg/w==","signatures":[{"sig":"MEYCIQCxeHS+jTzHX6JkitqShj0XR+RYvhp436BIP9UdYbGdsgIhAIC851pWpVxMcM+vbKNocc2ZGB8JkmRS9PyvhfWfFDql","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":980807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyfZ7CRA9TVsSAnZWagAAtcEP+wQQ0y+QTJHmXsNIx7b4\n+0eUU/KuMAKS/WEug4qoRDWYNOh9kTAWWLOuQnckrrDbZ0B40qLp4czGioux\njRLg222j1lerj2TNtSvejjGsEU7uFE9kz+UvurLPOuZEz3l+O236VIXosESK\n0OtIlsxpIvaa8tzBa/X6vQLffW0oGSzXg/7iZjhkspVQe/XH44S1p8iJJoSJ\n+9mIJQaxoaFxtywqw2Sg0kNlVURLzGNm+LHOhRXO6qYWKmru66DFh2T+bb6v\nbhZG9yqLc5QnaXG1tP+E3wVweQFmbhG0IVBOOAs6uFIFSvastnXa3k/CrJjF\nri+4a+fwNfxQ7CwkCoLW2sGpF2A2BZP/TsnW2HwslSOmc0dji2nSq7GWV3XS\nTq01os9hlqWGtIX7p2z3G3z+RUOWSMj/UeLn5N3C5c7O2fxwgPhyORJtMJ0n\nKkuDiarcXeSyZJSIRabDRBXG4hREj+txEY9dkCeGADMJXKPen0/F/BVqMpNA\nJojUnyFRQnU7rgfv+RBWyoJi/PqKEL7Dx8swZVzF1JNUqzbHVEJF1opwizPJ\nZX6sk4Ao9HyK+oxjSeAC7VCiYZYLbrdYOHytKFNojCtO6iNmIP53Swkz53nj\n0w/Up8qKQY5/L7W1U33FuwwB6c9YbwNbeItDMMYOsngpin1LJdNJzb4DmW8Q\nCeFT\r\n=i8Me\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","gitHead":"84eac346b4d986a773a06bb8a9cca2c3ddc54245","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/3.14.1/node@v12.20.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.20.1","dependencies":{"jest":"^23.6.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^1.19.3","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2","@apollosproject/server-core":"^1.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^23.6.0","graphql":"14.6.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^1.8.0","@apollosproject/apollo-server-env-mock":"^1.8.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_1.8.0_1623848571586_0.08068769535596587","host":"s3://npm-registry-packages"}},"2.21.0":{"name":"@apollosproject/data-connector-rock","version":"2.21.0","_id":"@apollosproject/data-connector-rock@2.21.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"05e098b782b36ebfd18d06270a82f3410365f8a3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.21.0.tgz","fileCount":160,"integrity":"sha512-qkoxrE6uyOlu2z+DUx6+30xr3x4Keaas8+D4Kc5pgwTAyejWQVuTfR+mXMznJq+IrcrqD/TnRZyDkWgMvf6lYQ==","signatures":[{"sig":"MEUCIQDQ3ttE91cM3rOszcQN+7U1KNfMGR3v1GVLFXdX5bM3jQIgAfKxji4qv7RrdGcbss1L0/wDLPHfKfhN+TeEZwymye0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1054552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgymQ/CRA9TVsSAnZWagAAB2sP/jMe8/oMY7KMHPl8T1se\ncc59FR0vYB61UaRqnAnGLtxGoT+OJHlLMYpPexxXep04JO/8w+UZAgiJZspN\nqXfKeTAY4Yvbp0ezlNZA+sSqaHQbktrff3bRl6NpfMfoNF7CwR5VukD/GJnM\nNlfs1/kPyoiEdpjS22BAOJCvMzO6DRroCCPCYWJVKafPtc/z4IucsotaVoPK\nbkWhC1QwH9NPgB//OFbPabL4ILHyZ1rAbVgInrNhs34TMLSk8E50AmrPjHqI\nNu6GefXShGQV0ldAaccztscX0CItmo23+dSMkGaBTQv7M+lngVz9kk0AjN+d\n52T8qFiTtjeML6IlrJa79pSYAnpV0iFbCxnOg6OcDujvx/xCnEldWD0XHXGD\n3STBBMUFsN4J9ZT0sdrROumitOvanbgz1+aSnf/KnyPfaGvSL5T0Du9dWmev\nB2OxrDBdO/Ji2lhpC6YNWPDjdUrL1afvs5OVEK1abj980SEdqw5/hHNVbfce\ndNP6lFmrRdFPqXpdFpe8yRpRjGuXpt959bkhe1BjPwoWXr9dnm3TjQRJCpo0\noOafio5VF0xTpM7ZofsG02VWzC11Bcnj7YsEUPDyHK8l+boMcIXZssIzg+jX\nDvWYVQ7gFdpPUNbnjq0jLl5Ycq3AQyKahiQ5sB6/csXCDDKBbT6V9uB3hbCg\nGTOI\r\n=Jqfe\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"e005cdc1709f1c91ce3ba308aa65ad2532a08630","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.21.0","@apollosproject/apollo-server-env-mock":"^2.21.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.21.0_1623876671013_0.899265277459312","host":"s3://npm-registry-packages"}},"2.21.1":{"name":"@apollosproject/data-connector-rock","version":"2.21.1","_id":"@apollosproject/data-connector-rock@2.21.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5a4fe596285a8a34fde2ce88b1e3a2e8dcc7a63a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.21.1.tgz","fileCount":160,"integrity":"sha512-APiD8MPSalnCUFgRnUBabWwhMae66s1nFeOsda7x7odJ9UbX+Rg/uHGOZQP/8yWnyVHmKt2uMqX9YtN1afuO3A==","signatures":[{"sig":"MEUCICrj0DGqOGj+VtY5vuXXCIwQsCN+Zefy1rHUsvWAKxNQAiEAxA7WYzu3UDn17zhcjPVljdAOKiuRQKkA+auveRuRpYs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1054734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy25PCRA9TVsSAnZWagAAxBQP/j3OgyJHVesVYB6L+dm+\neOF3WUtWkgsjdmi6WVDztSSqn+LIhRBzfxF2pl7PKT6AYS2TcBnTvSgYfpDg\nxHEgnImMdqKFbZrB6l4VbNJ4cATwCcTCOTTKxY6YmDOjnEJzhfU5ttWD0kZY\nm8KYlKy6L/2p2IdSmMaJ6KtuEtwT6VvqvK6vOdcf3K7rW4X/01z1ymHBMeNW\nc+F7C4DH0tLHvK0aKVvfjy4nPDeW34yF/wstnGcFunsA6MOeY9UHk4ICXS5R\n/RebOO6XexKwG6JcZA2qK4uCQPMF6mg7akO9ZBGy5p0dCZtfZGkIIck4AgHB\nOBFvXxCjiMNbUk4JmqIKo0rzsFlDvvR5Rg25kLzAqFSvT2dYcr0jzKztJZRo\n3k7jcqFP4NMBqTz3JNrTTG/ygcFmpaO/YzMYxHZxg2ttTAfBqtaePObQDCYr\nUrJZWyVDy2gq4U86ZBFBJtL9Oa2uv2gU5P63zuMzowBu/wDw3KeOfuN4L0dL\ngVzHzj8BmA1YD08gpW0hS5ySAeB092uMPfIgVgzfsKxz/783TkIUF9Eq9y7E\nMymoZFCw7KnHIar902zDnwvfKaQwQvS3MYghkwQFzBbmjTdNuijE94Yczyii\nTdIg4EVM74p/pNwVh9P71Kyfuu/06vtURaUwzKpv0NGJ43CVmS/BX0u0cjR7\nGhD5\r\n=Q/a2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"ea79f438b8c422ae19803d793f96d44a0a4d98af","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.21.1","@apollosproject/apollo-server-env-mock":"^2.21.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.21.1_1623944782552_0.4100218277316514","host":"s3://npm-registry-packages"}},"2.21.2-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.21.2-canary.1","_id":"@apollosproject/data-connector-rock@2.21.2-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6c09172514fccd2e76ea05974f62bd1faab5aef9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.21.2-canary.1.tgz","fileCount":160,"integrity":"sha512-P2U1IRhRk2cBINcaKLRpxhBFPqVR5eof+P+uN38JqHoAm+kkKE3AQtM8K3LgSVQrSBOp0Opk7p0v4Hwv+DUyFA==","signatures":[{"sig":"MEQCICzrr8iwEXBZZoj2ycvBB+7kjgxXWyzkR5OP+g6iqfqHAiArXfHIzKYlr6a1wQSvJAKP2D5iCciQLgce90CitUEzyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1054863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy6JLCRA9TVsSAnZWagAA5YIP/2yr+ZnwnxuaYyeU3I5m\n0v+DSlGft1qTgoZ4IebNqbfYEtsbOHU3CliWRYO+H3M3PhLmBcYrty01NwjI\nnHURYgMhR7wTJ3oEYwsE3wdP0g3CRy3wbJj/vE0V542y1/69zpNq2zDqprGN\nL3A62wdKGR4QQADNg/JYc+HsBniqrt4VGpn1MH9Ppj6sEMMqmTW3bGFqwwkU\nXLir930oa8L3J1u0SKTdgRl5h/1R6TCYrlJCoFJ1a+0jRNl+JnjJklbcqYZr\nAtVg8RJYfSiP0sPs12Rz0HpSplStSaP/8xB42rWiYb0HNl+wo5m/6hk2IlM7\nqeY1BEk6umIVPElC1xv1JWvAqLfuH106D78zLzdGRPsABvjfdpBUH2yO0Mp5\nJo/trfs+lHW+gJx+WeMLClHVDY1hkjTjZ+bTT28kdsoHpchpmh1vMQWpfqJu\n+lNyTx6V0g5n6tKE2yxQrrtn03iKbkLyCFBVqbQ9KiUOUKhZXjVKjuNAXheL\nLYVFUL0JgAMGIOd0fEhv87xy6v1v3kZYuYqvaT5wOiU1R6W3//msW6H2fUO6\nMrKMpznoxTt4oiwq1yxBKy3Aq4Bq9/FUiflMqiTpgjeAKP/3cqlTmXvmzH0l\nhh5oG3hAYDYKJ6XW6B1gAVc3vBwJFqcCcV//8POsk3khjesr8JXoDf57Km5W\n1AnQ\r\n=SN+9\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"0de8ca3e013e81d097264f8809abca596ec3ebe1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.21.1","@apollosproject/apollo-server-env-mock":"^2.21.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.21.2-canary.1_1623958091032_0.2702919603457621","host":"s3://npm-registry-packages"}},"2.21.2":{"name":"@apollosproject/data-connector-rock","version":"2.21.2","_id":"@apollosproject/data-connector-rock@2.21.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ea6ab7e4667648c93dc53a8f9a43a2fed0c8e870","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.21.2.tgz","fileCount":160,"integrity":"sha512-LXyLguxTp+FO2EZfYiIaDuJfkdch8wN6/kgI0Rza8TND9eqasokLexD6+6VHtPQc+9J5wCZ4gybLkhHffMo5Tg==","signatures":[{"sig":"MEYCIQD7949PMJZNssxcq9PYlLKCICpoe8UUBWppUuYRlTf9dgIhANKoHJsFtNuGNicxVUPmeieGRwaPgvZRv/YH98tutLmI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1055184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzN12CRA9TVsSAnZWagAANWUP/ieecEJZcW1AAKl38alm\nC1kV3Qm2OULE+5JRm0XJTN9yLA0y9RiqMD7ffiMYT3zFF1r4XoydwzefvD7R\nC0IH7AnJzJp0tGXEGhg8VgjCmXz4NhnusoFzx+R5FXKuxwQZc4SoqeQ+7VXQ\nYXy8z5QaX2J1CNUeBa2ljqsUWp60IXtX58pNfUiFTTMPsAPFdIKzD7fZjkOu\nkXBdqmglolNXlkKnsW7vAlS0hl1rWgRdl8rbFqJ/7KoM5xHRIM2tlb1a2pff\nCwck/078dDcVmfhJhsTld0EEXrNwry0j+0ZHGNeKUScBMD+0TQzc1sz5TtNr\nmbyhleUP0FrBaJv47StdtdbffSN7K6W2sp54xQo3d65rdIBwdsw7vW3TiqRM\nh6VArswB77AagxjPfEVxUwuAw2BSGgCXWgiJLC7X7T3dyd7pjHqAh2yOoPn7\nqqMKyZ2voAMQCkxZZ8weOdGr7fk7v4VGtxyQ4S/hT2VUWouYZ93bB6WEnzKF\n3noQeTp+p4ZOqYaYiL+hgYixkvCuumPhj1zI8n5l0dsYffbv7VuGygi9aKBb\nipXEgV2jNW5BDB6BuDSW+2LuYBKEVaNKwNj9z91KUHTmShpkwAL7nHOInjbQ\nJNa/h3+0IcPGK/P4XBrUMSWxvbE4V9aWbhjTubxUT+Z5AsxjTnMySYezyexQ\nfPC7\r\n=Iliv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"92fb733c108694c7deed1f564b3eadbb19c84dd8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.21.2","@apollosproject/apollo-server-env-mock":"^2.21.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.21.2_1624038773837_0.9770631053935275","host":"s3://npm-registry-packages"}},"2.22.0":{"name":"@apollosproject/data-connector-rock","version":"2.22.0","_id":"@apollosproject/data-connector-rock@2.22.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"fe5bb240a91d1e72bc2ce5f48db5f6cb63d787f5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.22.0.tgz","fileCount":160,"integrity":"sha512-jTAf8JXgsdZJGC3TxjUDAF41f58b9Hg5u9akP3cFk10KtZSraKAWLnM/8hv2rizgXAa8YjaxrZHT3POgPUYztg==","signatures":[{"sig":"MEQCIHfmxTcSa213qAOa6cu2hYwk+sOpAh5mC3rByf6LVStsAiA3mMNKw+WYVCwl9qQWTgjwZ6Yl8hdnhilMCefk2GiM8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1055365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg031GCRA9TVsSAnZWagAAXV8P+wURu9/YHqkBLuVLy3nP\nk9lg9c2FEfhn39mYO0598kQ48hMQb1zDXQsHT4UC66h7aSDOeNI9kFJyACgy\nXss3t+9SFF7QQ9ooAfT2ffnqUQzoxh90PLGYDQEe8kVSa5VVr/CH3zF9Mo0N\nkXSYIX2zIlLRha4qMS25rjo02yJ1/PN504uqrkLdH67i8N9oOCnrwe2yEW+B\nVDzPpfD1xu1ZBCzsippf7YH3kjTHD5in0qjV4uEOvebmLTFLtRBK3qRU0rm+\nj3NSkrhiMwxOnPDyJ3cgEA4Xedd/SH6PgsZbWsspcmSX913bMwUCbSrs31IM\nf5eE37jncCuxkC8mfNXSELBTyaIe/wRpmjNbdD1+BZ8a0WqaMLdpPtlVZuNx\nJix9Uygsf27BrMmCbDbH6Xb6prX3baoGkaBmy512Zd7pSQbkqY8eXM58Tgwr\nuOWs3LOcxT9DXypknvww2Z0E2rkwcCAk28nTxJXSyOSiZhqCl0uWk3vfhy0P\nPAY9BAJCwWjvfhv2vPzXh2VpGRxFCKSqbDTnrcR0YN20kcGUA8mHefOCH2uh\nw88PMn1b+crQ6+RGR7EyG1YVM7xohWwGWmBPxE+y1FnztXIGLv1LOquxYX6k\nIAXVgHDJVqUtejDqe7n0u9HqbWNF5hstkEFxuN9mfZxSOS8KFHFc6+eaxhKv\ndtI/\r\n=IEtK\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"cb462a535f0424635319d010a8cf51aeebfa2512","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.22.0","@apollosproject/apollo-server-env-mock":"^2.22.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.22.0_1624472902101_0.5446201819057721","host":"s3://npm-registry-packages"}},"2.23.0":{"name":"@apollosproject/data-connector-rock","version":"2.23.0","_id":"@apollosproject/data-connector-rock@2.23.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"086903e753014b568c5e13b4e9371d8552c1e2eb","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.23.0.tgz","fileCount":160,"integrity":"sha512-GwbRc1cXiDPSWBtg1q1DTr7mrJrBRPnErP6kUBRToO5RUeBn3lu1Dx4RP/gRKCSY+RoF8DH2cHNcFaCCQSvXdg==","signatures":[{"sig":"MEQCIDiJF5cuwAAoN614wi8r1p/31UaosbqncSkTy6RcZbwJAiA4ZMGR2/DkLCnOXqHsx0G7VIULeEOyXhdrTCKK1YvMPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1055546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1MjxCRA9TVsSAnZWagAApcAP/1oxKecwInlNfCpUm4Qz\ndh+klQaS71BZ8B/mjaiHYYAPmMuSJbWpnit5RlEdDCcW9Vgyh0NJulJ2W2AW\n4Wo2pbayH2HEmOpqLuc7Sg9YcaMkd2esoYY1hPeBhQx274iaA4WTiQ5a9RGd\njSVlT0VnPJwIIhaMNOx0hUooYnWqOMBQhj60krjQs8trn6ar7y1NnJ9caEOt\nZSnZqklC6c9E+0iajWhC/SWQH38zrt5UmkR/xq+BrcGsWUu9/h/xTZDM/+W3\n/T1wlNNlsPksocqvKMjocH0YgKBsUpUBQHuhIHYtNLVBveE7rLTW/x/UJpXZ\nSJk+FlukCGH0vwhlIFX1CXX0YD3MSfeNnov2upmS7SGnS75LUnSQcvDkrAe0\nkL9cYaEbcJJoy2EgZTn/YcwDf8gGwNzFQraUm2BpMLTQrXYhOzkTmp0Z3L5q\nEFjPU/MP6lQgpkSViUzPPJ3hHzc47Ik0yUnO+ZqLH0+hqs3ZTSNdYDfJWX0o\nWIPD6locWiUzOD75YLnlzVEhWYvOEPKNJfswvAxjGEKY9ue7AuDBnE0CxQBj\nLvWr1U/Po1d4jOPqpCwb9e6ZljkdJf1fcczwDcjsI6HHIwxaASylLFgA0Ezd\nv6vv0WbeFFMyZbURYeoXt2M5xLAz5AseU03cYKtgdhn67UbXToiIgVzaEJa8\nMKn+\r\n=pXUm\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"de9125d2b9149891aca6804689dbadfef767568e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.23.0","@apollosproject/apollo-server-env-mock":"^2.23.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.23.0_1624557808392_0.28141296589366416","host":"s3://npm-registry-packages"}},"2.23.1":{"name":"@apollosproject/data-connector-rock","version":"2.23.1","_id":"@apollosproject/data-connector-rock@2.23.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b6c17d5a150dd56b44215e5c9081987e3ee3dd91","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.23.1.tgz","fileCount":160,"integrity":"sha512-jjexj9zh0nyOGwh5hgCg+qRder3muBNuFjZ9XUS8ArOxP0gnEoWzi38V6RNlwXDyLPSLQ/B8MGls1nFPmfL+jA==","signatures":[{"sig":"MEYCIQDwhf29jR+RmDzMPB+l2t47fNVxQr+7fHPfF8dTuVTDMgIhAJSuTtm14hYSiH6EgSP6m1l3S8PxzYfAPudKgJtpIZOh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1055728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1NSmCRA9TVsSAnZWagAA7gwP/2dLjTK31hCcOOtLn/AC\nS8ajzR3bhIKDCe0PNNIo3LgbkBBwBmZd5is2Rv9Kfv6It/ZFGSVnwzRRayK3\nv3yWckTnKaUmqaZKlplHts3AfBThIq+J/cDsW7u+kx41htCRig2NiS/mQ2fE\ns8YJZT+Pm2xlbqkFg0c+vuoujbWYB4uqYe2vKV/WtJup4kSIK2KImxwE/oHZ\no6Dgh2pTNBeB8tWiqgKHzp9tRQJ2TZlijLbXkRVLksxQqqgvixSuQplhSQSW\ntxwMKv5c/qlxFmmmjx94KeukF0lK0LdfTZ36kLd86A3qTGVoHhRvwS2xXeu9\n5WQBo6zOr7UU96hyVfm1Cg1/N07IZ/jaLoDEwNAJnHg3LDQFETnjo2CDGRa7\nEGwMZE63mGqWt0wzjbesH3Ji0LZXydzPzwx/MRUo3kFq0XsETnbsBJR3vMcS\nbLfsHd1b3cDhkyPwvh+QmDWrrNX9SHKiq7ND1Rq9N3mGLIcM/fc/G1MuWgNq\nXtYwZ1jLKWCw+DawA0L5H9DDhu07YMSQs0HwDtutq1HV2p0wgquW/nRHLT5f\nVKuBCyKpiIAwCR8PxYOYQLIdkQcfWAJc44NVfR6/eppb2EFVVAjxNuhMrHro\nvuGntj/QVsp5YRGGxbcZOYPL8GqVCzCYk7rCA21kxYU6c97D/6D+ITdvWP0k\nWFvS\r\n=nijw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"2a603ad82333f4f968585b971e9fa67de2d59726","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.23.1","@apollosproject/apollo-server-env-mock":"^2.23.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.23.1_1624560805701_0.5950230546761865","host":"s3://npm-registry-packages"}},"2.24.0":{"name":"@apollosproject/data-connector-rock","version":"2.24.0","_id":"@apollosproject/data-connector-rock@2.24.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b8362aae982655df29b63c8e0e7d4f1e90803bd1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.24.0.tgz","fileCount":160,"integrity":"sha512-fRVmSL/GEL3tKnSX1d8BCHDZEvStxcdNAsgp9P6WcXBy/5NZkRwXElouhIKV+NldJybyWcQ3kdNsEaRfbAM4Qw==","signatures":[{"sig":"MEUCIC/PjeCg77PL33LZIyu422oXGOlWlL80NdNzMm5V2GIXAiEA7s+6P71sZhye/3oZFf6fAoMxn759B6fmoA6sDByuIZU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1055909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2drCCRA9TVsSAnZWagAAPTYP/2CM43JIv9WWpcurekpO\nfvn3OkgEtdvzHGUWmGGaOtXenalJB72odp37LZH9CMQ3bb4ZIan+tLmGYxfK\n0P0qpfpNh/KjpS+ZDR5jmzkoMjhG84NV3SgH/Ex76fvMFQYIIOjGZKLL+Eix\nZniCpnzii9+5yv2g8976FG//B+CfnGNt1xOlfa+EnK4g7QwjcEGOJu5QOUMu\ngREJSAT0G2XYU4XZVMZnwLPwkNCOs3bTDLA+7yx78uRuer036blToZvqGm38\nrdcf80JbWloy9eFua/2DoIiMqR+vZQlar9vWquAO8E/49WMTGh/VNoPDuFZU\n2Mo6F2M2HVlk+9HgWABh/Lqkv/xKZEe3z/i3hez3pz3h9LRiwLvmBUbXRQhn\nC7oLoXRV14gQ0cUDnZnvv4dxrLDvELxzBDxoUDwoue+YuuZoCa/mw2lM55tc\nkDNoAIFmNFYjD3bjHX8UeNRAL7XnUu6kZxl4Es/pIBn5jYXXQXlYdI/Md68X\nsME/kH3qQ47RRlXfpZ/xIr9Y6wqJhP0T1YtFyD1KNfTK7s4EM1DEHb5WFH3m\nnL7TTosKkv1ObgHzgYE6ipxy9ZvI6J67CBLDiLL79f7KnqQwxw6tKiaSer4t\nYYLtSYCzdyUm9kY5JkxzCUkrzOtPES04X/LM261XU0DSWP4qXjRlJ7FMgQJW\nEice\r\n=rYyD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"750290295526fbfe0a2c6b841233acf7c998c2b6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.24.0","@apollosproject/apollo-server-env-mock":"^2.24.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.24.0_1624890049917_0.4704257343255893","host":"s3://npm-registry-packages"}},"2.25.0":{"name":"@apollosproject/data-connector-rock","version":"2.25.0","_id":"@apollosproject/data-connector-rock@2.25.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d7b0e8343b32ba983b1b06165b7997ed42f93617","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.25.0.tgz","fileCount":160,"integrity":"sha512-ZwUBwYqXHssnYCLFiLRRWuNf4a891x1LWBygqMQde8gOLSnJug4QoQy+6ga1XLnZlwyV8puicSWC86aGtJzwgw==","signatures":[{"sig":"MEYCIQCACJWwHp6K1dvpzVe2AhTHlWuqQSVH8usM/Od8wnuhkgIhAOJEhiwnsQZrHt0DcK9bxYAgKB8//9X5AJ+bpEmw7dAV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1058343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3JroCRA9TVsSAnZWagAAvWAQAJC8/xJ10mXGJGn4jG/t\nXfsEINu/WMqAB0/5ixXUsxDQswBkpMM5DGUp9Fe1y8Awn4e2K8kUeN/ZtmQ3\nFqZ/xf8gk6+0yYW+vP5A6pwjVk0mN1C9sqL0hG1zrVfdV/O3FJNziNbQzu/V\n/kJXhI3KW9tF6ZdLSRs4o21/jJ1qZ/P+2qFUCuv0Ec13GeVyK67f9HMtVR1/\n+H+7qZS3pnF9kG6fd42xR3ogun0Tn8z+HywBf60yHESMTKZFuFeTk8b2R3Fm\nExzRwEsqxmVTCN8kaQGmsKBoOHLwxgb4UWK5HvsYKGjyspIXtvhK7EiEvgbi\nPcfl1pYHq8xhUh1pAlj+Uacb7gY6FoGxbzWP/yxr/kQuV1qiI+TVbxk5bmME\nRQhNutXTti0pRmwJFCi7UspD2B5tzsc7rj9fwL997l9IOfZbf4AStbVwlHNk\nlegZqntqoRxFdgDrlvQdQo7N69HKnJxcU2XmOQN+buXJ0dBn808NRKOt7bpb\nDZnTLYZWQ4tl49EBzTKK2nWHjKxvZNw8DPU0kebPhRAc3FDh3JsT3Ztq1oZT\nNtZ7Q/HnkwedDLMnFKVacvOPeseYwj1JWmTkxCdXdv9ZKHqqMeQuTaDOy+Gl\nrOEP7uC2naDPuf3VpljVH9OTgn8cdOc6LPS2sZ1Q2xlSc33kuCXg+OEFeabY\n1vF2\r\n=FI9A\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"ea7f4cc1ed49aa9a58c0a4b5116ee222a9cb4fd7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.25.0","@apollosproject/apollo-server-env-mock":"^2.25.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.25.0_1625070311624_0.5857393278262049","host":"s3://npm-registry-packages"}},"2.25.1-canary.8":{"name":"@apollosproject/data-connector-rock","version":"2.25.1-canary.8","_id":"@apollosproject/data-connector-rock@2.25.1-canary.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c5728bbe22e2e41161410cbcacc2781b0b265dda","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.25.1-canary.8.tgz","fileCount":160,"integrity":"sha512-5ifedEVEWxQbvIz53QTSptxxXUPqOf2W4umm7huqs84S23feCBMtbKPEfteMmboNImGvWLntTZlrQVwdosZ/VQ==","signatures":[{"sig":"MEUCIDJEShSG0xidy8xm2ImQfAndyYcNAEJkPZUQWGYeJawVAiEAtGK5scqDwj7t3P5L4gqi0I+5PwPjTycXjBkBe83039Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1059901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg32r5CRA9TVsSAnZWagAA660P/An34gvXE303yq0hCiLA\neWQpT0kEFTQXvTILldxxB+9gl93LsGH68RbIQcWbgRf8UzcfAJqvb/+Rb/nO\nPfqforXfrEv2C55J2QQcENl86SYWzth505J2NUa81BA6PguNo76K3duFe3Ma\ncipl6SJ0+t2OVzTozD7+7sBYahO7pSYlkV5KCvKT9/l3Gh3IOp5i46ba1In9\nGEeS5No+AzBAe8qs/dMGhUJkoBDSnHwG1h+jEIF/dS/EdLHT+TFMud256HSX\nBGjgBs5mTY4p9uWGNamHIJhdBfJEaoCgbwHfvUJ69MTIC8nWvT6JltiqE4FW\nzg4WCJrbo25kIgxvhRKANz9DlcQN+7kSYfNlp6b5yqrtw4KhuW52vWAxc4CP\nCLzRrHTQqlPjLBtWRKfzVcKpj73OTKLGZx7RNF7BsB8BUhd22J45qKbqtbZa\nn7ciryVn/BZm8E6uF2uKVGLhdJo1PzyBrTgGF4JH76nI9S/aH0ZS3F1MNfIn\nXohjEMQG8o0mJrLCCM9pGrUCTx7liWH/rDEE8nslH17hg7OwWGWU0EBKH5kY\nms67MnfhSP/fiQE4UtLWRATR9gg2q8N1h7hYcdvqHBIP+1xcPQgxjSFhHTdv\nzHHYQ9/rrJg4k3OwKp+uA2BWhwWzJQEcshe96GakSQWHDMp3WXxkQnVWmGNi\nrSQ/\r\n=XxfW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"189b822944d146f9e1e97d67fc6421a01f371c0f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.25.0","@apollosproject/apollo-server-env-mock":"^2.25.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.25.1-canary.8_1625254649350_0.34607361360720246","host":"s3://npm-registry-packages"}},"2.26.0":{"name":"@apollosproject/data-connector-rock","version":"2.26.0","_id":"@apollosproject/data-connector-rock@2.26.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"4fc4a329ec15764b2ef33cad9c86797f02870c81","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.26.0.tgz","fileCount":160,"integrity":"sha512-J6czzJdT+OO7UuLqieg7aSI+tYc7wKQJjh6wkjrRUd2aDBfVZEkAmdAOvj7Eacuiq5XO8KbnKxlribVB6TqjTA==","signatures":[{"sig":"MEQCIFi3Um7n8fAwxD4rJ44YRP3lurQEhSKAUjG27w4AbQczAiAPNEXh18S8NXvhrhvpXWzJuLDysMom77z1xanITdPRxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1060064,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6JG6CRA9TVsSAnZWagAAgeAQAJKHbvV4Fwr0GuIll1HO\nz46idfnOLdRCHDDleeUKhyBAQcEeE3fz5vRP1ipVDwuxs1Ey00Gq5bA+orNW\niYfSyyxIpsUWm5yUnp8+SgGsWxGDuiUCOAcvzomS8k9TeSbaQVtkpf/tbZVl\nb/2BEdK4mf5lFHn9A0RVUwu+QnbbyN2NXKXYdylh9IRJtmNzjIY1Hj6dYz4y\nmiSGfybmXbsJSCgr8RU0rf3ZW1UiSHoAbOJ/927TYBxSxQaADjoIVbVrLdlu\nxtV2DeDbC0UaHCFD2Xzvn3UUKUQaSknZgLRHf57/hGgWOwsyd4+MY5KEI+/d\n0cXzNv9FDuOm4ZKZDjFSGBVRuc68aIBqiKEuiInYxRqodGU+Iq/O6vgfinbu\npmZNUwixWGO2j/MFM8KUfoHhnksCWbWxF8bXR519GomcJNUYlnh4glsHpUeW\n4S4YZrptSDRcwiRa/5LZ0DSusySbk9wRzGhS07DI7lHw57Sv4bAgpvJmQLnD\njRPuvu2TKH48P0tsG6gh4yyWq5VGemCoIp139DvQRn9ABMEsu/fxiSYDdgYy\nIILhVcXdZBI71uY8xFAJLtc7ed9ic6FZ70hXNQFJIhctIO5l8t8ssEWXE7gL\nU7VeduNbcWh7MrBU342M0Ua0+oq45v4v56u5SthwF5OdhyjauAvwIU1oKWvv\nfl1o\r\n=lIbv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"d2fda542fd8141b27075ea03cb637270428310c9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.26.0","@apollosproject/apollo-server-env-mock":"^2.26.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.26.0_1625854393789_0.02373086644721556","host":"s3://npm-registry-packages"}},"2.26.1-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.26.1-canary.1","_id":"@apollosproject/data-connector-rock@2.26.1-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6862f424307b655db913643a83c268176c5a0f73","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.26.1-canary.1.tgz","fileCount":160,"integrity":"sha512-qF3h2Fi1hxWfPTGgtcvnHrd5giR4o5Qn6IcSx+03yjvK4dIfkjdkx/4uvqyiEc5q9Lu28DCPLXC3XtLoRxT8aA==","signatures":[{"sig":"MEUCIH+jS1ubfDqufTGJ58oMpU1gr9611Y0J+jnGDcBmGM//AiEA34Vxx5hVNRRWqChd4mtxFvtYpzSLA17/f9TSUxoWHcQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1063356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6O8RCRA9TVsSAnZWagAAGzAP/1iIU90sZADmUrGiTWQe\nrjGNdUoFirCe6a2rl7hEgA2iQc2ofsW1ijO9Ph3V3FpKVecDAKypLiTeLjLS\nCpz9jAJ8Xu2SRO+ujEhoLEQ4HnoMDQefwmZMZuhkFFgR8u67xcTIjI0qEkBx\nSYVyxC8A4NfZEDc2dV+xG1SaOWgM6DKYWoCxba2c9fclLBAsZIfhw6WjqV4A\n9CEZTvqnsXQETwlg0QIl8mZtv2A4mXnzJ69Zu83mBZyJdNHVrhyU/3voerJx\n+yZtGaFS+BlOJtdD6HiHqaiW5+7q7lOQ4ZgsLgUgAXnc5FAM2+NIKbY3GpLU\noXWpZ4SExU8e9vqswu4UaXg2MzYIweyiLBmg/ykfcJV0tBd5Ph/Qdeorf4NF\nrQqfOVnzRDPEMOiuZNkf+sJHK2dXyt6w7fjToaS6JkY0/VowdmJ5GYymlNrf\nqkQBJFLFfAnO/HAa+GNYMPumfeSonEarWqye8Vz5JSTpTuJo0yz8VJdOlYTG\nxWmSaq/7WK5MQPA47L7CfZC9N5/SvydyL9Ac2eJfdYadZDwz3d9vQrYrymhj\n8+KBBGK8XAUPgXuJP1kC1e8x4XqHJefB54q0f80wc6bphFTnIAgkSqNxLOJY\n+N6jYkB0qdBQ5RHZtJ7BaxVR+H5JemRJjAa4eWyrwCjLooG2gTNaqUzky7sB\nOIWS\r\n=Ff7W\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"8475c3602670706f76df978811c8c68dfb2f7ac9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.26.0","@apollosproject/apollo-server-env-mock":"^2.26.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":"*","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.26.1-canary.1_1625878288887_0.7074342905603093","host":"s3://npm-registry-packages"}},"2.26.1-canary.2":{"name":"@apollosproject/data-connector-rock","version":"2.26.1-canary.2","_id":"@apollosproject/data-connector-rock@2.26.1-canary.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"13473b2447a424b8f3872c31ebeedb068faefa89","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.26.1-canary.2.tgz","fileCount":160,"integrity":"sha512-iJ1UCwV7rI0+JzO9hFPmy1e23z3JE6AznIYJJM2/t6wMsxt52d3uz17tkuhY12qsoQh1LRuak/Y2DO/RFLA8AQ==","signatures":[{"sig":"MEUCIEwnQxQB3PQB9iGwMBtdkVo2TmRwo2IaFiM4QOT7UGOxAiEA5oNckBmH8YezuvWvsSrcm7OxnfIvcKNdepfzJbdZh/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1063363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7GLyCRA9TVsSAnZWagAAinoQAJQuDvk+Xps5EettK0+P\nwyUYUDWbJMaG7V54p7bBg5Rwul/aPE1OIdQUfUZI/5TO/V02hUyjdBt9DNwv\nsaDma9tEVvFgT8HgrJO5Lm6jzdaxFyN9lZfyPt0TbqIa1xG03NlEEAjng9YW\npoVX0LBa8rfKI1S1kxdd3oIEgbK3EFOaYP8Lpgg37otbYXJUuJYQKrAAq7pI\nkio6cdOIOJZbxj3+M4HjVXlwDtMbp5l5qqHfALSxKpWIhGbCqt5rdrupIpGU\n+kh9uu4ALoAKJ1zIQmJ+BBtt0bpILaJqfMfDm9u6026BBeNg7LB+trlkrQ1N\n5zg8oUSzlHO0mahU4P5iUqGCIbjKuDfo0exB+TSUjjL01r4Juq5jhJRYud+W\nIb48juWXjFbXuACe2RjV5xXc+TOCkwbIgGrWueNrM2KiYiVCiKGi1eFDIjMf\noYI03NIIvo6OuUay79fbahe5xDw/zFFAxwmBfASWl+tfD/a8c0M5xCMrzwVZ\ncjx9mT0I5X8Tr3hlx2cvHMpwcIvyqesAikgYGC9ah52yOQp7Jh2L3dGiDp+t\nPhUiTYE/WrMhBf/1Lk1uRcz6aVzSIaQEjBptEiEWd1ZoeI7DSOMJfqMOuuZh\nZ2dqJeFdJ1QqcQuGtQQfKYrMOWBpln5jKx9kzBTYfX4fWjetXhfnBqwfwgEg\n6fpp\r\n=113t\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"f9d5a666a4753415d19fb5c20490a39f1cadac32","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.26.0","@apollosproject/apollo-server-env-mock":"^2.26.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.26.1-canary.2_1626104562262_0.5098268103021575","host":"s3://npm-registry-packages"}},"2.26.1-canary.3":{"name":"@apollosproject/data-connector-rock","version":"2.26.1-canary.3","_id":"@apollosproject/data-connector-rock@2.26.1-canary.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6185db49a7ff544d35dd871a862dad131b2b21b0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.26.1-canary.3.tgz","fileCount":160,"integrity":"sha512-yxTLJgAoROEIweQTt6YGvn/1Zj93oEw2UAOL1ZWozKFQhf+VWjYswCbdRIzooHWkfrDAMQKFmYjEk7gjqydDUQ==","signatures":[{"sig":"MEYCIQCloBgkoW7NPEGIRAmYE6EzGY2JY11eMtTq5T9ksrw9AQIhALrX8oS3d5LVk+QzTqJ9//mY+ZV+WuZJ+PN6JwaldNhG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1063965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7K7YCRA9TVsSAnZWagAAPtsP/j0Dd+lyHWVEl6m+3IEm\n0eULgQ2bW4dXmZdqjg4jfiCiWlQ7fdMJvViI1nCic0x1GjG/s9pcK2M+WOkY\n6e+xoVcK4F9Mg6T5Msn1thwOqHkUTfq4YD47ctUmgD/hgQyZAjUMQMXKLF6p\n5AY9VeSX7KkLBHK9TRDvsD+b/dt9axqCfUBfPXr/1bldcAF6cZx5ELijbSft\nWZOEUhK9/c7odhGYo456RvsNRSR/Jycn9JCB3QYjOubUWOFYbUAjxQJr7Css\n8sFKOgX7uQ/h8odTPYxogID7YjzZd0XXjRT9WDHYuM4EVrdr+zbBtm9zLsP6\n3SzTwJcMn0wizgWMwnt9JdDUXc3+RoMp2Til0gQBcVBWUsgsw6yb0xeWaPKk\nLWwhjg5Hnd3eTDXlpPtyCoE/Oi8T/a61Qvq/x+aFHBFHDgfOv/zvLRFOUXGv\nExrKf5r538RnfshEF05/bkWu+pL0Zut+f/BWaeJu9NaXE1SAnt1D6TKaK4dW\n3GqEg59empXYvJiqZqPyS092tda5E5/OM+tuyfw7A7yVbKTmiruh3wXFM8bE\nZg+t4yi8uXmqBobTSFbNDIoz6rsJh2Ru/z39OCzran4eTRPbxbsz8gaSOnYN\ngsylHscA/z2p4D+7qmeJr6cCVkRqgkmCsJduVcw6B7kF9Pi6OCx+GCFW4EyV\n0i2X\r\n=VMk9\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"55fda54af7c622d92af76975e1496dc70068d00f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.26.0","@apollosproject/apollo-server-env-mock":"^2.26.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.26.1-canary.3_1626123992348_0.38055707163857444","host":"s3://npm-registry-packages"}},"2.26.1-canary.6":{"name":"@apollosproject/data-connector-rock","version":"2.26.1-canary.6","_id":"@apollosproject/data-connector-rock@2.26.1-canary.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f51bfb5f3d4555fc18b847662fb7acfa087bf6fa","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.26.1-canary.6.tgz","fileCount":160,"integrity":"sha512-4iZt9l+ciw6e50mPqMeqTRM+N17NV+casYIsuTcIkG+eB+gJpctuKgCfyo6GNwLE8nPvTe8pAqxYA9aLlZejFA==","signatures":[{"sig":"MEYCIQCpeQ/dW3eOgEdY8dAIstEZaLiAvPUuVHy1AzW2X3hLPQIhAIrms9Nw0C814gFAhd/Zw97zrQtM/Un1tqAAh+b09vsB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1067452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9bIBCRA9TVsSAnZWagAAvCsP/jGkCyFV6zeyqS6POrbT\nl4wIGJESZvLsRObDGdRb3clz6Y9dv01edDmSUeXOOWTCtVAx0J/mF4ksymLz\nr68SYxpHGxiZ4jCP8t2JsN+y/4EI7s3RR9bd2dg2+U085hQLINjAO93jywnt\n8WQpxOEXp09p/aiUUCG/RqhQKgo8ZCuj1hupYQtinNaL8+PUcG+sInTkC0ki\n1uzgnzGIGvKX+7YYPOOOH6sut+GXbVFubULPudNOLejpeWekAN6yQZ0EcOo1\nI/OYC5JfqIbgKZhvwswZgWwDToRM3cAsHHtxg5ArtaqWNt8lGBi7DO6oB9T6\nrQPfDoGgPsGtPmtecTm5otjdb0tQaPQb4oRDu+/WB92xEyg/4ndCJQNIAMys\n4QdwsR2rI0XuorknJiCl2ElH0R+w5ksfTTKX4LGooeSpDhB14YVq3pxZiuA8\nGlWdAjyBUTI48wv8kzHAv3tQ8AyQWPjmzH1+JlRV4ziVjJ3TnyQBByRDUf0M\nBISobuF/+sjmpqEUQskLHu30U2u8fpYBb8XvaEXiy84BRHBnKjcpiyco3JTF\nwJIwrMS9/8WSnkQA9G7bR8L5/v9n4XDh8GsLcR32hWW0QrsUabWkistE8u56\nOw+80Br7klUqa+QW+UTb8xZ6QogszsvQTKOR8+7vwi023Qu39aOa4eCFJji9\nqjwv\r\n=/okX\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"51c297e60a8fc8aa409d0288ab534111eba208d7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.26.0","@apollosproject/apollo-server-env-mock":"^2.26.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.26.1-canary.6_1626714625116_0.8681924843230628","host":"s3://npm-registry-packages"}},"2.27.0":{"name":"@apollosproject/data-connector-rock","version":"2.27.0","_id":"@apollosproject/data-connector-rock@2.27.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a8714eb03796adf9df282cebb7d5f2b70455b2fd","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.27.0.tgz","fileCount":160,"integrity":"sha512-WP9ZaE6a2xalI7axw4AE4w4DkQDRfc6w3Q8j2ngBnOTx5ZRCOhKwqlIi/rl2ZHa+4wLrJNp+Q9w0Pbo4Blg7TA==","signatures":[{"sig":"MEUCIQDD2I4jteKUDCYpnQavm4kHvvleeTw67skfly2MZ4rxpQIgC1th0SWKMig7QCrWMyIMYbxFt2kyU9KoMxS135h8ieE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1068188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9bIyCRA9TVsSAnZWagAAitsP/0GAETAlVD0Mr7qb5m+v\nyglDZ1cb/MA8zkJtLiqFpQ7s4TgVFKU6UKXqy/gR9+4UD604QIHc1q/afDtv\nqgmQkijtMrTqduciiQKy1c8WuJWxqWKTHcIoAqFa6bluGX9RLO8Xa7rx9CY1\nJiFXVLrCoxDDeWMWf4AWTuR3exbkPkaONXe5V3X8Ct5nk2qOjxb9Jp4jK+YU\nBMi6KEp/F1Wzaa4gEKDe27S1y961suYtHqQur6UmPQvTF9OilIEIrD81DI41\nzbq42FCbNP84wfLSBuYDtV3MSy0N+3FMOMJ9ZCVckYT+8Z/twLIB77i5Pd+h\nJKqOWsKRSRo81NnYlKQ3DdetYWDWaYtlDNHVJoQmNW6CYykV5XLMIN6XThJt\ngm3vaer7vBP2Hwoc2Jf9MDT5Lc0zvYiSJ8lpLeoRWsmMxkn+VqRVPidgO0eA\nAbIj2YyK5ZQxlr7s9mTdgCaLeUwnt3oa29W+dUoLzpZsDbzKUTojXIVU4yk3\nNhS0jBaiD3DJEQH4DI0TYRLCQLSZhIBrJSV/rpXtpui6UnVmdrAqghU5rQWJ\nSvUsLjnv+swzXBGBuCl0JSlLDVZvVhQOZAxiaCNKMfADOdSB9hK6SQK4/VTH\nXUEfiZ9DmgmGAgtCFQ6iC7NrRKJerGempdAQiwA6IHpo6zJAMnUqIm2rjcyj\nM2P0\r\n=C4kt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"616ccefacbf10c5625d559b564880e55776abe0b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.27.0","@apollosproject/apollo-server-env-mock":"^2.27.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.27.0_1626714674258_0.18018045002576422","host":"s3://npm-registry-packages"}},"2.27.1":{"name":"@apollosproject/data-connector-rock","version":"2.27.1","_id":"@apollosproject/data-connector-rock@2.27.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e7372c5c666ea577a03006b9486c27b93c76e334","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.27.1.tgz","fileCount":160,"integrity":"sha512-vu/h7WMLovcs72Ro21im7Yk1hQdmI6ANsO3BGVAylcy/Pr0VDCL79rVEwGmtBcEEpi/Ndwa//zimgjLgPcArWg==","signatures":[{"sig":"MEQCIGml3u3bHMtfT2q/4wJqKscPbH88/tHBvpQwqoidBx/NAiAewyZW7RAlPpnvniyRyNbJkudq4tk7/VfY6DMTDNqm7w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1068370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9s4PCRA9TVsSAnZWagAAWlQP/0peTHoAud4GTX17X/g3\n8zVrKMVQgT7qMRqUUOVLpTa1enHR8+3gbvGdaff9oCfkQtNH1ldzANjQ0+Kl\nPZJvgYaT6RXwsgtqOjF+TdFB+mfk+tV6nH8OqnJQxBP25BwcmJR+9PDilVFb\nxjfDSLshHzHIoYSzfb1ryvy3D6zl/AvSYE2pyt3M0c/9zU0dEgHU9kUI0XH5\nI2ysBO49zyLS0TLlTl2IR2EqqUYcbkcY9IooCeBUVaRZr4gGPZ5Go7BQLxg7\nn84lmSjmuYehNdChiJF8MvPpOqwLpIv0ePmO0qjK93aAtLTx0RxZ2c4witvb\nvQBuYYp+KJYPCjBFBAPKiKb9YrLJ4aGgGaKjIcBy8Lg9ngF13GrN3bsiE+Ns\ntvpEKUuPh7vtQjOk/ZfgzDn2qxh/l1/ijyXrGAzz45svOpPUayO4eNLN6P3t\nj3rjJmbIvZgt+OOpht6QxEYAkXZW0xZYsRNd+nHhZu6G743E9JPyCkdAL92H\nFvVQ7dTwFj/v59d6woBVoBubNImgfceD7dDuhXmr5bTUXYNn/myxlO02IRLd\nVPqOXd6zn2DclOh3cn4+cxIax2kVIHyYiFsZodVl+QDGGFlUYWGKjIsFWTTk\nPtX8Tme6BJ9iYPbHipI5x5ft5ykDsAWqv5Ixwn26b8WoHSwzVvqFVZs7OjgO\nQ0kr\r\n=Iqb/\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"b0717da516617733c322d19be561ee402c499b06","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.27.1","@apollosproject/apollo-server-env-mock":"^2.27.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.27.1_1626787343278_0.7975435589547442","host":"s3://npm-registry-packages"}},"2.27.2":{"name":"@apollosproject/data-connector-rock","version":"2.27.2","_id":"@apollosproject/data-connector-rock@2.27.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2925ba89d4c5f8ca971a7dc435600d485d26b289","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.27.2.tgz","fileCount":160,"integrity":"sha512-Sqii0v+OgLVo7DxsL+MAQWfdTE6fluNYo8icKeeYLQINKoHoE2T5nNcObmKbq1xJO2LbcpVuO3bK5wVa0PlDsQ==","signatures":[{"sig":"MEUCIDCfwVBLVshuxTWBACSJ48z8IeMZ6yRrxFLz6sPuvkp/AiEAzu9eo1VsrC0Og9TwwLHy9G29WE07SpE8tOg+7lXQR3Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1068552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9ybPCRA9TVsSAnZWagAACNsP/2Q8yuUKuXwybKso0Pgj\n6RDJvCi0vIuDUj/GwcqIJjSrz4SHoP5S+0umuf+E2GQ0JhNqTaGiK97DvplX\n4RW7HBokJPFAnQeGgnykwUOGhOOr21w8D6yRFZ9tCMeOMOSHen3ZWHdXFEtz\nOaiiQm529L3u+h443f8c8iZx4Hm9TTqa5RrF6K5nfIG2Iwxygd2ieaFte/mP\nSQUNzDJWq3cIhqMksLBJX1gavVwiwt45beE6RiN4HdlBJGPYGANhMxZN08Zf\nlbi3j01e+RFRRb2PXT0U8v+Z6fOWLa3pn7uZKK4a7cTV8BZilNl8/mgPRiZQ\n3ZZoEFuRuY9uN37V1xWBH2BfM3KQsn00aM+wsSq3LiutxN9IwM+XeI14zvsC\nQZndU3XqkfrBwWEaKkNkFpiXtYcwedGdMg9S1m+ieOLH4b5wf9znP2ZkHJ7F\noO4M2eu7SrYzh4i+viB/PHjV8owp1yVAcFwLAie1J96V/k8INDdU2t2xdear\nGh2yQf0z3kW2/WUH4X8Y1HBp+zycTHsCFRWvUfReYGnqlT422s6Bf+DZCjBm\n/HEaoeIH3zX6JfwlFF4qCgVmvYysy6hO2F4IItsToFMRdEhL2Rf8s3bczhU+\n7RwCBTI9qjO41k+KEoFHTdSFjCo6AnAHsgGBOJaRNB3jEyo5hRSqwTMhSfhn\niUWw\r\n=elgB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"fd9f79cf8876c862cd6a50abba490916fecebc5a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.27.2","@apollosproject/apollo-server-env-mock":"^2.27.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.27.2_1626810063125_0.3650187893724688","host":"s3://npm-registry-packages"}},"2.27.3-canary.6":{"name":"@apollosproject/data-connector-rock","version":"2.27.3-canary.6","_id":"@apollosproject/data-connector-rock@2.27.3-canary.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"940b3f17db11b5aee345d7a76121f271717a02f5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.27.3-canary.6.tgz","fileCount":160,"integrity":"sha512-mGKsFZ1nJG2uocMlyRg//1g/hn4f8FK+3bHuHOckP6c46etcyLcOVPrKRauH7KtN2hsBA7yt5DL48OpfkITAtA==","signatures":[{"sig":"MEUCIQDvDRiTfe1rN9RxPrhj0jLz2J+OHWQYw0mQi2fcvIVp1AIgcDTGvKwxoKZRpz5ptraI9CJsy8Ciik0s1l8PI5YsEfo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1069471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAHLOCRA9TVsSAnZWagAAQbwP/jqk+2CzZGflM6lX6SOp\n4NoKQAM5IBdde6yAnbTP5j4ymMGzrktVYPNOUT0WoW8uWiwzMg+c+g1Hc+uQ\nHcKxnmLGJdrbR2KgvlFgF9otADfscdk1ZYkucb5M84P6MJ3ZEW+r7alLPHVS\n2ZVUgpWynRsBXCWMY5hOySulRbRnOjSu9ofNT0P1W25L42WFlnkNxddQddG3\nNZIvsqaxfmv6h7zvtCrWTja1GZV7UdQ7s9sosqUb3XHj7TdZ4nJXphY9wQBf\nxf+T0yMHNff4hhvmBVIsPL2xtVS19R3K7RgGjrAoSjXzrvgzHOJyYtPLLtM8\nzbGN94qeSB42zSDerzzfOugVdUKrfkG9eSDCUtbZz5SWy/Jo/rYiGS14a5cI\nv4fDYEH0NxJW+SwAUm5mZ35zxRQGSoBZoHXU6hIiDdcRkZg3Gng1vgFH7FF0\nH19pYSK6wxVYzTX1AzAvgAhay4Fy2jkwG5HkJpTRE7T0mMma7QKsAkZmF5/N\nOgI0dJ7AccoyukCc8gdi8DwQVH0f1cebvDbNA857JGP4fpKTcieEdL8S7vQ9\na/r48mEh1DEuGTPArihEWXFRaKT8Axwgvgusss5N+gXvx200UC/6cZ6pAlqa\neYNU1H4SNkSQZ3OTH1bzUBNpq6umW4k/Kq7tjBB/5fFLVXmDzgRRz6SuaZee\nW9H7\r\n=iwlw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport gql from 'graphql-tag';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n\n#### 1. Create a new module.\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport gql from graphql-tag;\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"253ee937c1b83bcd4de60a6518bac3f4724da61f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.27.2","@apollosproject/apollo-server-env-mock":"^2.27.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.27.3-canary.6_1627419342228_0.01083392015841178","host":"s3://npm-registry-packages"}},"2.27.3-canary.7":{"name":"@apollosproject/data-connector-rock","version":"2.27.3-canary.7","_id":"@apollosproject/data-connector-rock@2.27.3-canary.7","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"406368899cc17a3623991dbcdad95b8b5c75ff2c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.27.3-canary.7.tgz","fileCount":160,"integrity":"sha512-vXcTUXHtCQQp+S4bynhiQtCs2dXYxSm1g5gCU3Vx5kioTbw15ePytBAywc86CTz8YSQyL0a7mjl78TTnP6TSgg==","signatures":[{"sig":"MEUCIHXoELVrjryPgfk8ggagBuWi74NrRePW92+YnY5s/DJ0AiEA5mAKYXXX4VYKovCqMJ7q0QvUsm7acBCrId5935qzHs4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1069495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAHgjCRA9TVsSAnZWagAAgVkP/2M+wma7SVmwcpcz/LWf\nedPlRGnHF/gIoW9Fn2qtWxlX6zJHrGcj1rm+0iPSzS/PM5nt31MVbFupMhz9\nugehqZUOiPA7wIGx7dLMAbqM9aOS+G/FGUv+6Gv09z+/GTAIWwJAfZKwDW/c\nbSs9YDSIUl/zAr1eQBlT527Y7EDFWTe1gzMK5nsypn9iQlcavrILGw8wia3G\n9NO+OxrZoHACYMrABSYsPdGFCr90aI1XBifdymazq/gYdJ9Q5mFVvOl27Ex9\nePQ96zbFpAgHyUZ0K1+XSPNectI9k0XBkoRnH+XyW/4ucfReBgR6DbR+UAmD\n25F/iuwJZ0yJ00EgGG0ifVmj4aw/DGSUVfzwOjOjwxDlvAGf8tt1mnmmYnHi\n3/zpsEU+lxKijb9BR2out7pi42Dc19M0kNkuTGwFQ3+1f233x83XQ0djH/qd\nxq00rXYcfOq9GgzdYMoEvtF0ntOIre1z9WljIktsNGlEcnebX4nNaswQcCG5\nNkpFT734wFaONUxpGEuiTR8FAFg8VeA+wOeBVwm22s2im6VzLSH6d3DUxc4U\nyfPMBIBPKFFMAMmK12zeX+jaMQVfI8pxAEk4hAVJVCWEyBV/+JLPBz6V/auu\nMU4HdIsUav0llbJKp6YjjaZS6VDAx7R7kLQsXpuXsDOtjsap0L3LHUQGUcGe\npX1H\r\n=hVJ9\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"4946de9242b21919af8538c204943ebd5bac8ec5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.27.2","@apollosproject/apollo-server-env-mock":"^2.27.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.27.3-canary.7_1627420706853_0.05812177927380846","host":"s3://npm-registry-packages"}},"2.28.0":{"name":"@apollosproject/data-connector-rock","version":"2.28.0","_id":"@apollosproject/data-connector-rock@2.28.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1554a702d0dd82627df32c4eaa3f4c65cb2821da","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.28.0.tgz","fileCount":160,"integrity":"sha512-Y4w0cU7dQ7T7uExO4JcdxG1WM9VZeoKK12EUjFnZKPT9288LRyWlw60LkHRG2Xxfla5LSef8ffcuAut/aje+mg==","signatures":[{"sig":"MEYCIQCqxQ4/QL/fh8aw3H3zaC0tiC+Dzmm92+vLQQlYGbfi6wIhAMl4JLEJ4pf7dBPYeZ1L3ONKm4wqcKdCOlwZHaYDMEfS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1070039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCqmDCRA9TVsSAnZWagAA1r4QAJUsx/osrvVCVnfPIxGp\nIXHfh85fxnYDOJShJUqXcytorWy28v00mEOXxF7HO2hezKwlJMGbLXWbQQfm\nXsUDaJ+cF0ZUR5bnYMI5XY+C6f8HTImep7M9UAHJIFbrpBda6Q0F+u3sRUL4\nZzqMcHsVntSYaReqpNIXecQ0ovsAAnhZvEXqEck0OTygPNoyvhobkvRFyFJm\n6Xe1NvEH6z1MBBVzQMmAMigHfDylIEdiDYObTjudOGK056l8TDeShqGILS4u\nj5TczPa03mPBLjsPdzAQvRl4aHdl7CfuuqgEPucGy73XHyDfeyCgS6uCI7/u\nGfIsrwyjOFB8JTzXB2CNLCUgNFINxG0D+rjBqZLb9ROw0m4K8umUlJx7GDCU\nm5KoZDBlLKcEkiTz6+hW+SA34N7APsKt3j4+DP2cg5DZwoh7jlcGMwlQBzpg\n7uX2SmX7WJEYZvVemeIYDkkFlE5DZfnfIBtu8/z5NBX0XwOXr1x2qPJcSbzI\nuPuJR3w2oeEKyDshtQqPVemLJ3yvqHiozQKfxZuZZFfpPLkz1IoO6VCe0j9d\njQ4PpZWij53etCZu/xBfAI1vWwMAAsi99VQykicHxHNnEpBxgjbGzGz5o8Ea\nxKt0wYh7s9M28GHZWxPBvrN6G6lJIu7lVAGqJBW+tnMIS9BB4BUsSFyVEzTS\nMYm+\r\n=caGx\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=12"},"gitHead":"b4af302d4bb5d8fc2258638ad0d21c7c8bc5da8c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.28.0","@apollosproject/apollo-server-env-mock":"^2.28.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.28.0_1628088707091_0.7534963696332917","host":"s3://npm-registry-packages"}},"2.28.1-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.28.1-canary.0","_id":"@apollosproject/data-connector-rock@2.28.1-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9f731fde4335e51efb26a4e7d22efdfbcc0901b8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.28.1-canary.0.tgz","fileCount":160,"integrity":"sha512-UWeWUJKhDSl3jklL1vtByzA+uDtN2wxXL/6Wt9yRRmalUfweZK6c9AMoRZk2EsqAMjYgUNlm9sQz6hiBI6Rbhg==","signatures":[{"sig":"MEQCIH6Gphg16VIwM0r4hSQKOWUoM6MeqIVI0c2K1qJmcH9xAiAW6yzSqEI6gD/KMJ9d9qoHTWMsQiK8mCVcHFUxZbriJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1070093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCqniCRA9TVsSAnZWagAAw+YP/0Q3THMufolqd4EsAuiq\ns6r/XZ+HNYH+bykKG2vv1XCYrHDFVkzyGGzRmzURI4GB6m0wmkotpTbhCHSN\nz/0fFnfng2YZQeBEB16pLwyOmjVKpkDZX4bqALvdZK7DKYq1pRyx8pV/5b8B\nM1YIc1PJhjnB4+DBiDHWisemdsjKQ0hmDISU42BVGQBdJJMfIPWutGGBskbn\na6ff69MdGDoN9JITYHr2r9+45WEyDFzaSy/zBu0g/hrusaD41/HWbzcXsUWV\nJVIjRqCmnzsK+RHHKvkhaYnJMxLQZZhVvZWVG0pSl4a83qB+0MtinMmbOxl7\nOj6/JTjodP1bRsITvg+lfDHcx6tbwEFDQ6xiIW8/A40j+z6C91oerjaiD0Zg\n00PLkCGSfnWXD35lOhkph9CPHFGj/PZiURKw75KKlujy0AsSFs/uJbYoSPnt\nFSo4tvJy1D0yx9jVtUh2lJ21DRbfIaGkcV22aAjNfD5ZjfP1y04+nUtPdZ4o\nRF6is2dmtqSeXTe/dLQ9N9n95jyA++bILbp6BacDPDyJ+HbpI/+/C2bxL0/Z\nhCsvf0MHWb64zPSNVrh5oZPXkzODcrp33Qs/WHSZIJJ29dwbRjWstjisc/Yo\n00MT9hpbJJoatuxF1YLXDNHhho4L4KtcTQl0hPOWok8lfyR68OjvgrpLPvsL\n2Lay\r\n=UM67\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=12"},"gitHead":"b4af302d4bb5d8fc2258638ad0d21c7c8bc5da8c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v12.22.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"12.22.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^2.3.3","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.28.1-canary.0+b4af302d","@apollosproject/apollo-server-env-mock":"^2.28.1-canary.0+b4af302d"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.28.1-canary.0_1628088802516_0.5099009843719455","host":"s3://npm-registry-packages"}},"2.28.1-canary.2":{"name":"@apollosproject/data-connector-rock","version":"2.28.1-canary.2","_id":"@apollosproject/data-connector-rock@2.28.1-canary.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d4db0c861367bb33e0a7142facb2757b6aaf1429","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.28.1-canary.2.tgz","fileCount":160,"integrity":"sha512-qh/SjIkKmxOMuiSppg0QwFIiz/GpV5HMwNvjU62vQona08gDFsN5Tw1thHaOonTXdqISGaKdWZkzUBcfGTiufg==","signatures":[{"sig":"MEUCIQDhpfCmzY3N/giZ4g0Br9Gwt87AQZueraOWCqAnfl/ITwIgSqf6qe8KB1qinHxa7FurLUWQSHCFuCm/irBLQrBDc4Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1070375,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDBu0CRA9TVsSAnZWagAAyh4P/3KouMSyfoWcfaM/NVVP\ntzyDZ+jthf9zAfaKw6CfXeJdgl0et5WgkdnTQAdHgoSWyre1Ob8h8AcohG/U\nPQMIbBj4/zex1OnuhqWJ9Ytgfu0PvE0rNbc3NxnO0ssl9n8hpi/2c1P0KPf6\ntxX9WkmUqSZ+XE/OoVYlkJS2tSeUT5ngoGheru4bZIM2VFRTHVy/SwUJPQtp\nnjKyGNBu824e0iHGQo+vgG3Pg1jUlqY47YTw3Vkp/EviGOMJ9yE/R3oSNi/3\n9fOlv5VWtk7EYlXk6CdmVRkVRf1O6oRCuws8+Q3rbhG4i9LoUqTC+gac0OMZ\nLBgg80Rbx7UDiBAogtNNnuUnlmk78AR5YxwpIJIIsH1CYWF9rcAtjjKasmHr\nxy9rO9V4eW866KdFLsfjJRit5OZJ3oCmvB+ApH4KsomaSNJ+aKZpalPdQBtl\neuONNet83oVi0qZ1syueCoAD5xRP7dtBmTBeEV7Zfqw0CwhFf1W38cSQ4lWl\nnGbFu6Ma+NFj/W+9LKGQ798NZxuQ0emXigs0rTs8TADZC3lFYhWmj3hmQb2+\nJdn31YAfvLiiZVQrt5b3ESBu18KcYa+Ac/GlcG9536Agv/RrhZeTKVovGqY+\nWNicovLelJ8Ai7NmKLCm2/CVJiRV4vmUQq4RrET33O6+obhH3IHeSp4C0LN3\n1oJj\r\n=Rdtz\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f1a4e61af5972b84195b71127af8003f8d516806","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.28.0","@apollosproject/apollo-server-env-mock":"^2.28.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.28.1-canary.2_1628183476362_0.993016877900013","host":"s3://npm-registry-packages"}},"2.29.0":{"name":"@apollosproject/data-connector-rock","version":"2.29.0","_id":"@apollosproject/data-connector-rock@2.29.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"76097831c482d2b2f0010b7b034edd9c96600d08","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.29.0.tgz","fileCount":160,"integrity":"sha512-xOlOOj8yMzQtiZxm3yDloaBTG/yd/ueUsBFJFf03mHeaolqgSrWPFi/qrA5ZvojMdQhWxfceTqAHOrSlz9PJXQ==","signatures":[{"sig":"MEUCIQDdZUZWRgebE6Gnjx3CczEwuWXyR0WCyiS3D6qDq0UDcQIgBJkIUyV6GCfJkeP5E1ocVoyD1rugJx43EJhjqrKEEc8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1070927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDC6PCRA9TVsSAnZWagAAW6UQAKOJMzico4xvlcncu1/N\nmajKJo6MXTkagGmBNyJKOpCykrNS5TjU9mB0ExZMRiGzSApxNRXuiR12QaxB\nS/QgQQdWI8NAl4dhFA5CoXuhyBj/3fVP6bkun+tZeKWrncDjNSSeKvwjirdX\nApyiS4XxAiZAqCYKTQBYYlrlpI7hBBXF9onbsKa8nVYrsvYnQd93AsAO6hr+\nAdOIQQ6zJrCcXqirEkQMbyZ0Y41SMvgTOnJQXu6ZmSxDLovFBgQ3RKmEPeWI\nUi2SjXyX51iD0S5mPyOFnO9E0SGfnYHuJxUhTX1TeXvKysC2ol9Lo6mWNs7Z\nUz7gKexcKzZ2VZ30i20SgmOPTVvtATmaloj9J+NWl67TByHbd5eA5+S+vfYw\nQU6ats6wlTQfw+V1jdriDbLCsSdAtTRfHsQpKvn/2oe6BLggp+5W1uxTtQD4\nI+CHdes6SykAzahF80TU/aeHTD5K6sD1S4w6/Rpy3D+Sb+J2HhYy+jTpU+ES\nvdmj4S7oZvzZp1xi9fvSqJfebiXghfC0iQX03ZkIiDosFs/0ySpQFVLtuKDP\no+DFP6n9BDnwyBpHP+tff8pMTndXOk5PKFr1BmGIbSylApT4RcL3ZWybg5uv\nvBiT4wO2SEpqYuXtXHdNpaEKfZYZPkB9MmLfkXBYCxS2y/scaT3KZXBdxDRO\np3rj\r\n=5aDs\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"ae40e735efe0280a5cb7f334de3c5e6e87ed2c42","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.29.0","@apollosproject/apollo-server-env-mock":"^2.29.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.29.0_1628188303025_0.44052272163693407","host":"s3://npm-registry-packages"}},"2.29.1-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.29.1-canary.0","_id":"@apollosproject/data-connector-rock@2.29.1-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3dd9715da74b09b575e6e41fff7e15bfc664ab16","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.29.1-canary.0.tgz","fileCount":160,"integrity":"sha512-0YqkcXv0p3qhYa4kkYaEiR2QcbDxaZjVG+LHKJuKK5NbTBCO4A87pUZ5G4gqSZbfAqrgIZYiOwf4+ZPJsizUKg==","signatures":[{"sig":"MEUCIQCcj58KYW/XK/ZiIrulrhP1VveidcDgqyqhsUVM8lKYQgIgWbAMOHtFE54uaQdTOx4EcWxU9HA90/0SrYYRugjqfiA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1070981,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDC71CRA9TVsSAnZWagAAN3QP/3MMr1sOLZCRhDp4CmFl\nrTzyAS9AiqtsLTUEgPfczHEyb0ieQ1QRdQifJO+6xIIChOQKZtydgfPbKHlW\n9HLGT9d3j1oRE/gYONZz7NlC59x+7t/GyqZ3BfPfXdS8mqJj8RvnnBq6NzQq\n9uxMHdEy74j3xHVJqkBZVaSsFUgwkCQD+k8uWdf4LBhVrDucvWcZAEe1GUNU\nr8y3kRh04UR0CIQ0Dxn2FlFoUDCPMhvQ12dg30jy6pImppvm4vG4EsAkYyHB\nNFoGv6KUo55hc6GBUlPLdDIblyXR3hzxwkS2L9qBRG07biEY19BOwDin+QJC\n6dUJ/t9UF49iVk6YdMDce1fBcbwJFo66u5V5yB1J72KFgdwmQfcdP/vpM6Pp\niANmC6hcTHwryYphK4J5hLwd0b754FU0iK+fSqfRHVBQk9YGgeE8hQaY6/5e\nse4dOKYNEPLkGjJg352LfVF6riX3ctHI3eOBsh13G72SH0Kkh46PkaJs9+Iw\n3WO2lh4FFhVSCLLRq+WO/mkQEVXG9jTndi7MmvyQHSnDsCDz9R6+0Tl/ce7q\nsvI8M5DjAdTJi4FWEFU1n1zI2FofBlHbfMnSgqzJiUE1CqAU/v2PELjqC2h8\nNHRiekIN2+8rZ1xgGC/ajCJSbeH6LxS+tHthx4EKqaDfyFjQtfRr5Whvy+i5\nIx8x\r\n=f5LW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"ae40e735efe0280a5cb7f334de3c5e6e87ed2c42","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.29.1-canary.0+ae40e735","@apollosproject/apollo-server-env-mock":"^2.29.1-canary.0+ae40e735"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.29.1-canary.0_1628188405052_0.9558432850927681","host":"s3://npm-registry-packages"}},"2.29.1":{"name":"@apollosproject/data-connector-rock","version":"2.29.1","_id":"@apollosproject/data-connector-rock@2.29.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"cd821b8e3edefe8841fee54f1dd2a7a2624899ca","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.29.1.tgz","fileCount":160,"integrity":"sha512-K7Z1lWkih9FloST5ytZ0tIe7xHVVV36lb7Cb72gPGEMDWA9noWWIwIrkUsfhJkTBmjYPbrWb767+gBAPbQj9Dw==","signatures":[{"sig":"MEUCIQCAkgvs1qp9bWhEPsmP3J/aqQFRTkPQUBAyWaiqZTXrIAIgWv7x/pJIl2tV+yZOrAsSKguj9M0mQVXwA5AN/6unaIg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1071109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDURPCRA9TVsSAnZWagAAOSoP/j4vN5SDkGhynHgomspj\njXhZMLIo/WiNq7uBNUa7rBrEXm/S6x2GKqma0Fa6lm9FUFvZPh6Lm3OnVgb3\nmRU4BGuzHQ3JO6pRn8HcQvBsnpUiI8eDpJPGlPLkfTspdN2hfoS+EOw3oehW\nAounhsdKVobST1FRQFWjhB4DEgEgPX0X3jjk7vPCNMeJLNQeYcf+ujl+8cX8\nVM7jTyPFgzSGl8ygQNoHe8okAbjcC6k66suAuzxwKBbNybVaIfLcrAr5kCgh\n6P6BrO2neVYNAq9qWiQhLrj0mp05wt+Yl5JjO/4+832v3xkYgETGNkXRQaFI\nrw2Jo9z/9MyhWDjqHdFZbJfp+QDe228xf83F9mrefMURz9Q3W/vVSIBhVf2J\ntvkRuDyCnV7+1PHA/ldk+/UGdAK18fVIuy6y8R4BY9q7CAO8WPriUKb3qcLz\nOLJyoePp0fSiV4ofqmw8qDtDimUIt6h+NEWqPAzrR7U1f0O/e54v2qK0Zwcg\nmVpcv3AER93d4G7rb6ELmqm9Uj1rHFSTzMGDPJTl7SsgQ6V3yG79+TLdhjak\nBhlXgnvBqAVb6DRIRcRte1U7HCFArVBsk5Wvq46G1TVInaTPFDLODIGu6ILb\n6pAhET22mflqomjUSglcLSdMmOLFiEm8xXaZTxBvnXM2K0UYXWijearS9wpg\n3Hwo\r\n=zE3P\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"14660fe240565142e750f775dcfbc98b767f656a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.29.1","@apollosproject/apollo-server-env-mock":"^2.29.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.29.1_1628259407478_0.07512314639089768","host":"s3://npm-registry-packages"}},"2.29.2-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.29.2-canary.0","_id":"@apollosproject/data-connector-rock@2.29.2-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b5285119d8e8f4e3ee04f5ed35d97f0a5744ac2e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.29.2-canary.0.tgz","fileCount":160,"integrity":"sha512-zIYzOn4t2ANqR9r3MH6W0wSEXN6319/LjWBpqvFpCIN+SP7OKZGj0SOuX2Rrzldb/+StNnpGLaXL0yrNTs6cWw==","signatures":[{"sig":"MEYCIQDqoIuH6PTPPmMrXtd43AGoq42pxfbJ3aDl1h56RaICRAIhAIXmiWe7/6FTjdgjUpjD24nx1HAQilKN1dpQaSzYQFHJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1071163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDUS8CRA9TVsSAnZWagAAqFcP/Az0vhw5ABCOztsP/121\nLv/rTnJSoqWAM2+ztzes+GqR1ubxJsNzAsxXZdJ841RndsNxVcAhs7q1+kIu\n5m9OJvwbZDrmxX2u/vDKJrUXgVxLlMI/NKB1jGGqed8QbCRFOpgi3gQKKRyJ\nmxDRS7DaUVlhrhPIno5+vBqdWWT+xqQAbXlZmStrDkEA/sOClXm5NP240gt6\nnJKJ8B8SRKgd8OZI1Hw7VML/CG9tGAXZFvs30VX6lYkQ1GEPcFtRCt2ipCP7\ncWhq46RoWTur8g+9mspunMn0bE8HQVnLn6DS99BSZa0hXlrLDJb9b1afmAa3\nc2UGaDVa/zk77QmP8yP1RgqQ49ItPaq7IWjCczoULo1ZhZYMn6px0BFq6iWi\n+ae/hq+arwHgPaD9S6/Q/uLWNWRZRA9jkHO1V6xooGH/epWhO0bKj9pe0zgy\ny9wlwk/sB9s77PZmM/9WTzwT/1I4x9h7A95gvStVNzyJo96sfx0Kz0d/87i4\nRq/LwQce07ms4KQuOqUuFnhTzuZZcvNK7qlfRDENsBGTIdChlWVVuCpv2+J9\nHIemjo79o12dZEoBdQFz4Y6GY9TxCgydkhv4LQJv1ibH7Ydzhj6sS/ydv4Lq\noIc6tmKW0fc1rhob38yPHUfeHvO0EejQ2hmRrEq6Z8TvLm2bZ82Ou6tdBX+C\nF2DO\r\n=hPJY\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"14660fe240565142e750f775dcfbc98b767f656a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.29.2-canary.0+14660fe2","@apollosproject/apollo-server-env-mock":"^2.29.2-canary.0+14660fe2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.29.2-canary.0_1628259516625_0.0909659205360247","host":"s3://npm-registry-packages"}},"2.29.2":{"name":"@apollosproject/data-connector-rock","version":"2.29.2","_id":"@apollosproject/data-connector-rock@2.29.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b8a1cb45fef2c48a08d619f148d1383c7714123a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.29.2.tgz","fileCount":160,"integrity":"sha512-2i76KbPHFPN4Q5NOHbAnuYnrM5sw30h5lExkcb7dmy1/LCC0+zBuSkbjwrOki8MWpJjmesbn0mOgKkc7Ysuy3A==","signatures":[{"sig":"MEQCIGjAIC/GXuE8NXEzSJc5lSE33CKWsS/HFrFWMCaBc+2+AiAVNvo2cObpZg15eYMlZ5jpao4zvMPVspT8vetucRtNpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1071291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDVdMCRA9TVsSAnZWagAAfsQP/iYNOCiCrbB6gC47jIVb\nyI88YrI6e1mbujZMeme4xLZhs063Es1SD/7+VGrURFY0eZa3pXNoyQBBnbFh\n7hECsXWVXmxzy6fNqXpyRhP/IN5Zkoflg0to0LpVeg5oFHzBkbCuj0GzNn2y\n0uEBaUxwIF97V11PSGuaNU5YPX1ViAO2FKggHJUW0ILoVve1Gikx1vOZ5G79\nuV/1s92Qjn5mcdtH9fFEcwLRm4+1kOtS1jzBgA4pbDs9doBupAzM8NyOIjwI\nw1FVwSQRfA/W2XstCB8eKG0VLr3d5nxQTZDvnkgE9K/529JQC5sC/dTkKZFI\nL9+N4yWe7g97xBjbobBcQfNmvNZqyamxqyniPJGkrxGYVX+LiVdVGJ+b4MRg\ndKs6tpIrMS5De4Iu8PBTE/H9tx+SYDZL7AxREFcmtu9TAPRvLrxwYf9Qpblk\nOluiBtWEKmWn9t8NNah1LQ9/rGvhSVDbdUyz8BFxeLzLtIzSb6CzwAxEBs2s\nk+5bqdJjwbT/3JhtAnhBcQg6tKkgwGXGl4vDCRBu8/R42xpbAfaGPzYzXNH3\nBpzq2wPqXjmntJqdclm+8xVdGGJlD56TLF6yWdgnLsoT8AVZc8T6KfVWojNA\nc5g7M9AmWWjfa/SAd0hrdWKfgcqcHl4Jf4lsosST5rwEqJY/pqSeaUGqdKry\nQqWA\r\n=lIwv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"aaa3a9fd7ad5254cc06aa87475ea348cc3294da8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.29.2","@apollosproject/apollo-server-env-mock":"^2.29.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.29.2_1628264268295_0.033739823409328906","host":"s3://npm-registry-packages"}},"2.29.3-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.29.3-canary.0","_id":"@apollosproject/data-connector-rock@2.29.3-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1a6eb9a62d796ceee4aa8d7504ebe28f88b08f80","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.29.3-canary.0.tgz","fileCount":160,"integrity":"sha512-wvoxF//DS1RUBeKpnJrNbNVzcyiKC4D5/QeV2GkDdWCMBGlOAInZlnPydQ5pWwpQ2Lx/l9CBX3KtVlFb+77JgQ==","signatures":[{"sig":"MEYCIQCrrYspBYpTu94fuYlJGg+SUMS6QbRRDQa7jyRCa2+HPQIhAJcgnpJBhoPa/tOq7Rna143y02DTYlCE6PwV9Qv0mYox","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1071345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDVesCRA9TVsSAnZWagAAcV8P/jiNP/goCHZChm92ys2J\nl7ED6VvJlCOJEWiIgJTkgHrxC8K6bO6OkCBi6Fi34CCHRMxhRgQ4UUJ5GuEz\nFfnZlbQRsG8fvad0ggFk7Yhua/6fkKJ8q/RqvkhK5Dqeu/cpnIxLkd1s6nVT\nnXxt2kl8bz74EwGbhQIWAsvDhNr8dp41kNalVd8/W7Vkm34NOL9w3UDd7SJz\nNw3adCFH7Jubv1AnW8ly/begGSPKrUa7JSU8MKSDbWg+ysvzR5QGiuwjAQ3R\njcMI0A9LYvEGDIEigdFIyYdyzdomYGc8IDHw7bvpmYrbj9Mv5tDGQzG+c7DF\nOyMxHn+YHDoRW5IS0vi6nBjSuGp18KJf5yAmZn2HFolXFU50kcsXWWH223Jn\nFtHhKAPEOTewzsYmEHu6SrvHjquOoYhEnGZgRQKlCPWL+eOVOVU9D5Gskn9p\niFB/Z6+USXZgz1EG4NFFNHRo9OJvOUa6toR3JD4suJPEoYlpUYruK26aI3tl\nLjP4K6mZT8nyhHIBN3shJ9AyFqQQ8qCpy5r8SVKoBoSiM9Y5mUUrT/ylUBgG\ndr/ygM+TPSGEqd/5BqlT0r+qGzDFemp2Z6rjqRxG16fSxwwwlhDZo2W+KL8Y\n53tL7xJtyk7u8mirooM1ATA9XQLWEj367oFX5LtbprNDNcVY297Tjy7oQBnl\nbRyw\r\n=4D2b\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"aaa3a9fd7ad5254cc06aa87475ea348cc3294da8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.29.3-canary.0+aaa3a9fd","@apollosproject/apollo-server-env-mock":"^2.29.3-canary.0+aaa3a9fd"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.29.3-canary.0_1628264364667_0.43944883346699704","host":"s3://npm-registry-packages"}},"2.29.3-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.29.3-canary.1","_id":"@apollosproject/data-connector-rock@2.29.3-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a80306dcf82b98fd94f99324d3bb9f3f062c4fe7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.29.3-canary.1.tgz","fileCount":158,"integrity":"sha512-HeCEQ1Go6XibUr7Pqdmovl5wCtSL1FLeTOZOpV6bRd7Px8jNbvO1q0yYHtB+2xdF3lzVPomSs5ZA8SN4xYBDFA==","signatures":[{"sig":"MEQCIBfsmcEwoiNF8JIKBC5ZmJRybM/gih1Os9kLcAK4T6xbAiAVA6lBRNO1GEY4aK8+LpZ2lzxoy2fSOD5m/xaFMM4jvw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1065587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDYNxCRA9TVsSAnZWagAArQwP/1RkyWNfs+GoNDm1WhGr\np9xSbjbG88fvVzUvVhtuQd4E3Pd7ykgavKsBQZe6celc5ZUuCEfYJXS/dnAK\nyUas4769omS7GedPIk+T43Z+Bb0VrXex0nX58zy5YO6vQS6oSCi+OSDy/XzB\n8PdjhLOsvoLfArJwWGkkzYHup8E7LXBMMa0SOxrNAueC48iF6/lAJ1K9spC+\n4Ld3Ujii4UUkXiMr8H7K9TVfmXiFo0GLTsZlOZ5CMyaggxiw7frYCKBuQQis\nJgnyrNFsS2eIdTTqD4FqLK3Ely4OANfIuCCXBCSNC+QrSKWKUbdpArphfaJv\nHVnm5/mFCZdL3BKseARA1bucM1K9izOyEVpdS6wckBpWVa8gsBqAKtvUnIsP\n927wvUuuveEiCG2pL0+6UpqxIruGhnTKdU5mdTWaQ6wHDEe/gKT2D/sRTtP8\niwa3IrIdMqG83GutmU5jx2/ABeHCMn/hoM6Lpl1HvNpAYEsg54P0Da0auW/M\n7wA0b8jToYti2bLZkCZaBlW4mE8N6uQMKI6XoLAhol+9fNQH81L6hN0a+V8S\nEBw6iPr06s5biotJUWxrXjM9a2l3/AYh+C3lAtHyMm43q+cpjqrhcOgCg877\ntgJSRvrcmITAwYpNFgkqbtH0LtanTf/vjqJauSM8EzXHCLP7EW29P1/YNRLc\nkpog\r\n=sPjU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"b1a3980d85226ffac3d95847607a9d5947321ef3","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.29.2","@apollosproject/apollo-server-env-mock":"^2.29.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.29.3-canary.1_1628275569468_0.7655964340032129","host":"s3://npm-registry-packages"}},"2.29.3":{"name":"@apollosproject/data-connector-rock","version":"2.29.3","_id":"@apollosproject/data-connector-rock@2.29.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0428c140c38e9f4e11f453c723215fcd025ef4c7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.29.3.tgz","fileCount":158,"integrity":"sha512-B2JB2iSUuGEXE0ZC4U63YeYSXnSz75AdhxHlJM6obgHFot+PrBzyfhEFp7EV2+kgAzV7tvGIcu64TOIYxaND7A==","signatures":[{"sig":"MEUCIQC45fLX/tMna2CyyD6YE/r8W8lZ7rPSEFoBpkvubRXYBAIgBbZW0PMF7zM2Hi8NPWaSuWys42MRZBF846VbVVNAaEA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1065751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE+PoCRA9TVsSAnZWagAAyzwP/AmnnZCIP0uJ1PvDgmwj\nctUjcBYB3Io0/CVacWyoAGwDEd2ovU6ae3JpkHwbP2h5j9Wt84jG4yot0/Xg\nzl2qOgQ1IhfxMufJylolQVBSbTcbGy/sHyMmKXT3s69tt3Z0RvoJs4LFZ2J8\nz74ESRb61slHmHzconR0XlBI5/y1LS1qEtDI83vCAnT8W/OeDS70pD9Pmd9z\nxt2cDW1JgpGYvQs+3xEY6suybc+9xrCD2dD2OJKHn2csyjm3yQpXulRib79P\nCurqk3o2szDjjxeZ5Ane4iD43SbsaO1U2XmvFNqMzf/iGe27I7FI311ozfaP\n15z1xvMyHyB5pIzfuT5JbYJBZxjxTpj2ccD6Yea8momkvJHQ9/AaaFkwCDBP\np0r43VrUvSKUATPvtG24zcGGqO8Bh+vrKFpqEdlFCZsYqHOLfuxjzHOURD6/\nNc4XycS0s6U3nQSJZag99po5X+jOW14eW9OgxbY5vqp7DANjdqQWxQIrEyh4\nEeh0k2nycaaso9i75ZR/EsM4thVnQa/nJUrFXDpPsMIDosEOL88IxU6+XIe1\nPQcIgl0/J8yntthgEU8TMJfbJKdim3q2fFBszOgcv3NIbyLB6CQkniSsIVR8\noPQCU/lSqBEL8EHU07mw7v0xrFu4lzj3iB8gGZXH2l2iHqBWz+ofZNxkyAGS\nZLuA\r\n=UuDS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"2cb71a7cead244ac97af58a89e4c82b4ea6f1aec","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.29.3","@apollosproject/apollo-server-env-mock":"^2.29.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.29.3_1628693480276_0.5046274050635162","host":"s3://npm-registry-packages"}},"2.29.4-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.29.4-canary.0","_id":"@apollosproject/data-connector-rock@2.29.4-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"53fb253dc4d08376eb3a018ced9ecc5e248c45ce","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.29.4-canary.0.tgz","fileCount":158,"integrity":"sha512-hpw2Kcf1AwyhHJHjas/CCEUa6keVxa8j36kT4Er82HBbysa21mgpP73H2pZ4Z2oF0JOLfKzUAvyjF6FAnbxAfw==","signatures":[{"sig":"MEUCIQDejysLXKc4vR0Yl04Gy5BGtnbCF0G8f/WG1nKzCVaC4wIgXJIoAcNHIb0dW39i0GtDM7CAcj3PF+YRRrJo2OqnthY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1065805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE+RWCRA9TVsSAnZWagAALAwQAJwFyuttqmnFdoYKamnG\nYJseK/5oUm1nOgXquHWQwxzs/HuIbDL4IydWHrzWowoIEQqzJHkLIjDODF1X\nyy9GWbsLLboQRTpgLXniQw9Oca40aN9FR3E7LXV4GwOlrTGvcEfhXV9MRFbZ\nZapik6B8UDG+2DdtLmkRhMSDYAkYvjCoWdg9FX0PIPJ9Yhxo9lI7AowwiHhR\nyhtcqMjjCWEBKx74AAh2sMRywjkalOvHWINP25XhEZ7bZGKwK3h/cqv7ksCb\nBX5jEK1d3hHbnBFVJ6VeCbimMPeaAgYavwd/gtdPZxaM3hpMTb2CycJY6ZKy\nIHX6gn2iLsG31DK882Nde3YHAB57Xav4KJ/8kRVPYqHaD/beEvrOCFCIjn7w\nChagaN8wtAUtImri++PE0382S9g9B13qMKj3Xj1uzq6lxItUlbLRzVw1l/VC\nsAzimr9OLCdCKKWRZGhZL8ObSiGDyZf2bTPfrrqGoXCPzyJAksI8ihbiWXQg\nIcBOg5pTGgLpLU4yPYVgcX+cgdd9Ic3R+OwYZBqu/1W0VMvw5mz82g8fYY7d\nbRnqBYtf1SS7VWBaAmVDSZGCMsyfgtFsjQM9rCNi0JUYLlRFojZlJqnX8l5X\nG7GBBVMt+Hk5znm8F/i6b55I8XEfxYD7+hHFpclgrsdiNN0vJf85bSCavm7m\n3Dms\r\n=PJaS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"2cb71a7cead244ac97af58a89e4c82b4ea6f1aec","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.29.4-canary.0+2cb71a7c","@apollosproject/apollo-server-env-mock":"^2.29.4-canary.0+2cb71a7c"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.29.4-canary.0_1628693590328_0.48973632060085603","host":"s3://npm-registry-packages"}},"2.29.4-canary.17":{"name":"@apollosproject/data-connector-rock","version":"2.29.4-canary.17","_id":"@apollosproject/data-connector-rock@2.29.4-canary.17","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"bc2abdf2f56f14414cfa95d92522610e8c2c7ce2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.29.4-canary.17.tgz","fileCount":158,"integrity":"sha512-Ki8hh1olNF6dhPZEVyGx3+ErqPfQlrh+rCTFjhpthVzXvrPkJPvWNauP+BPYdbRDY/kHszumW46tVKMw/ftuSA==","signatures":[{"sig":"MEUCIHunP64StcwHlycWdaATPL8vmK2labVbPNdvul11LckzAiEAwU4E1jJliY/rHDAgSc0XZmJQg1kOR06MjLLTES621tU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1065774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGyUhCRA9TVsSAnZWagAAwvsP+wUFB/A7UGARiV1uax4V\n9yqkeSdLYr2FfEF6sndVuOP/BdmIi2L3eGmR6oPVewAzkvix4Do4f98L6cd/\nqApMdAwItHBfWc2fqf3nKnmTaWzRzIu4aaYh/qsMujQIhJ1mirT0a3FqKkwb\nvRHL3vzwD6g51RxlyNUR6dGFxJvbmxUWYK5IjKrc+AEQT10LAD3oS2R6tF3E\n8+31FVP1CMGOkGjdoIoVXmjvGmQQU5MYG3Xivyp2XAO7FI0zgcFgDfXHjFNE\nqnOU9dESHoDSQ/N0/J7zhEn+3Qe+YitbFMGhsMRnVCqCqRQzu4OZDOkZrBly\nBAgvN0Qjc7g9FBZFETYX+8vUjdd3GFD8IfsE0FX3RdJK7qHxZrN+a+hdEiEo\nKfC6If4co2D2RiHp18Wa4/vgghIUCNngqrSgvHPENfm/q2NJTL+Z4rRgg/oh\nWCmtilT53/tvyWkz32eW/ikS3HBPaoGW81K2tqH/j0tbNfb3K2GhVLbcwApD\niM80TF7oCJDAmZHGu7gj3rN6LLGn75B+i3bNY/vw45zCDIdV88uvNa1XJv/M\nRyfXqBU78fP6JzE4uztKIK+w6NYBi9S30gTSVDWoiDwwkAzIvAkF7ksjuBZ0\ni7/Yi1kHbf3RxI793k30qfVo/QMGBlqGjmPoQQBqdHKM/IjFYIz6EPmISXys\njP+z\r\n=S5CC\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"47a9910545c79f4d37477d7716f4a275f7bfe320","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.29.3","@apollosproject/apollo-server-env-mock":"^2.29.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.29.4-canary.17_1629168929400_0.6102726081048067","host":"s3://npm-registry-packages"}},"2.30.0":{"name":"@apollosproject/data-connector-rock","version":"2.30.0","_id":"@apollosproject/data-connector-rock@2.30.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"23a6ddcd6a06cf40bdad58cfe51949084364db3d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.30.0.tgz","fileCount":158,"integrity":"sha512-kQYpftbnZ/WhcRx7TF+ABudxEEiUhiujAuhIQwMcJ2TPAfcPzlz5HuPFa9laFJnfd+PYDMmpNIoT8Z80GIHcRA==","signatures":[{"sig":"MEUCIF7/koAzG5cWP137ams2zorhI22qBIruYcT7U12XLWzNAiEAn2Cis9TNMd9vIXFYRQEYPxlmfLKrUjfmjnipVEyDm14=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1066088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG8MQCRA9TVsSAnZWagAAZ9MP/RR6HLAHGfe4D2ZITXAx\nr+ODVXU+jTX1dioGDwMnnGWMVnPNc2D5BmUn7E0hAESuR3EIJudvUAxpgSg3\n8bYh8GWAsM2Y+VlR3FhmgTf4MA4d151nNzmroOm0Zl4+qJios6dvfCmHbR31\noKTser6ODNt8C62+VF87HWebBiCdhawSYflFI0eEPYMAeja7LlpwBPfHMVNN\nM0uYqLPW1k5VTGbRbulJ8mshbYDP9jHo9rHrInfPVsKShdS4sH3af7DglQu4\nL8qrvbgfBYVke/2iLMS6tsEHXtHpVRixpMOoTW0uJYbknyy2MBWktRnot0vw\ncuWlstIw/U76peHlleN7m9+I1/U2wzProPbleuyQifvAQSaylINHiLzqHoqI\n8dtjMax0luAaPk0UlpwbqYBNPouDrvR1YH2OfNNNnPAvc4NYwgU5/wI84WuY\n4vZn3VuLKqeCbGF+tT2iXEanIPEtSka3a6yHtsYblS+Jt/M4Rsl3zUdA/s3w\niLIKlouFxpNksI+XPvooVRJftkYiG2YLgSKqp9Y9vlknCAvE69vkS+NWzX6I\nZe9XbLd7g4aGQl6mF8qMY8hIDdANF6onwpxYZikEo3y6QHo2KTcFmAPcm4IU\nfgVj7Z7p5FCOR9hhEG4k6x09mmP//xKP5/JtGuynJzB1cKACM77cZJkEasLF\nXwBv\r\n=keqY\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"c5d25f7817b1cfd686beff43a3c31685432a0f03","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.4","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.30.0","@apollosproject/apollo-server-env-mock":"^2.30.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.30.0_1629209359940_0.44595025385455944","host":"s3://npm-registry-packages"}},"2.30.1-canary.6":{"name":"@apollosproject/data-connector-rock","version":"2.30.1-canary.6","_id":"@apollosproject/data-connector-rock@2.30.1-canary.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a6b3fb91644f0059cd47ef5188d7d63ea734b385","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.30.1-canary.6.tgz","fileCount":158,"integrity":"sha512-5e2wEITB7xB6DK0EcbRTPTyLdsTDt7rMeiczzW93Nv3hADPL79+QQiMhLdRxnbusekF/KEgfGbEJ6lHlCr+9Iw==","signatures":[{"sig":"MEQCIELpQWBRHsWqyjQvA2xPDzFCXcLzruaGouOIe5oNzeIjAiBW0lQTESYfCBSDLlAk4C5pzimnmtAE3bY4v2YX/ZwBRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1066561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhH8ssCRA9TVsSAnZWagAAgwQP/3UzRIsYkHWNWtPaVhBK\n82JUnrO/mi9RfxKP5Rr9CQkatNrzDyED9Pyr7xvkWRysx4ntANgkgLjecmwE\necm3eNmo96tgEjNfpRpylSvWO+u3rAq7I45zXB15VfmMuxftMWsslGcxFcmy\nkfOB65ikP1U2HfNoZrzt0qA6kyag9uUkDD041EuU9szhFEIi9VIFGN8ro8aC\nwfgtxbgbvAEN67gfy1IasXMBb0NEIg4mpS4L9mgn79XkMEDh39ZGurwg+aTn\nXTPPNsf3//3EqOG9dI8SDaRu3dRIBfhDgmHeLLSXPWn+Ue6fIk2lnUy66hDh\nRpdgrr9fKpdHp3rAcDeEBf4D1LWb3SDsPAP4WM9pEceHIPMB3ryTgNnNNc0J\nBUiKsi/qUX5yRGW08G7mjW4geOXPIi+EnWvUmXkR5kEWtvDsT/PifupmzE9B\nHIiHLW0lDwr5oR570Q8lWWNneA9JtKomPE2yh+e1YoGF7S8OGm8eAPfAwL0L\nKGzoyswcIVsVSCIqM/nltpJZHLLFS3UhgiDt3qkNaogcWAFuwmbZVjQhbyut\nO1DVY9xn7PmxoUYBleT7nxx9iIODsfLm4fMw1xLmr0WdWsQxtZOuQdyiB9I2\nTIe+hSCJV8N+jOHydSgUQgwc4ABwMT793aHf5sAdw9ERmfHiC2kRPKMXVXwJ\nYQhh\r\n=MZkq\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"00d7e26b73bdc590bd66aa9a89ec1e2e5f706c73","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.5+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.5","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.30.0","@apollosproject/apollo-server-env-mock":"^2.30.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.30.1-canary.6_1629473580743_0.052867536466576937","host":"s3://npm-registry-packages"}},"2.30.1-canary.13":{"name":"@apollosproject/data-connector-rock","version":"2.30.1-canary.13","_id":"@apollosproject/data-connector-rock@2.30.1-canary.13","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"40c79e800c35488a84898cce2d7e7f5a7a624181","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.30.1-canary.13.tgz","fileCount":158,"integrity":"sha512-KUpZ4nsyTIvCqTgEJlewbFc9pBOhi56NrwBGBun9ULOueu8Mf5xW+AaAJ+dkHb2s6Tab8sZiQCVw457wk43VXw==","signatures":[{"sig":"MEUCIBu/u/AsRkU/O4M4b2Tam3wsuSV3y78PRwH16F9VYQGDAiEAiEBL+4y7Pi4OaoQlzy03dgQmyCinAV57rd1SOvccDi4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1067165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJnb8CRA9TVsSAnZWagAAziEP/RfNjzpNKqyNiiWzn4xk\nkd0UbABVgWCjjxk9U8FG5BzX4Ewbt/r+IWVR3dzXah6+EU57TOwNTyVK8k6m\nhTsHPRroQ6l/oraCsLky4lnirTA+TVPaqgZ0Swh5GHM4d6xUH7RfTm+HqI9y\n5PTlfus9UMvNyl+ITlAwqwZEKV6T/nJlQPooQHQYpDXuHkgh+ffF1Eohv5Pc\nGUfWZBzihSdIO/1ILuCWtr4w4ejaacZYNuA1E0yOzLgKtt7WWVpbPXX/wgt1\nVfvpqXAJrmRLIavV9/Gl+0VGFHsMeEORwR8G7mk0G/zOjyKnRicYlkihmI9t\nfabscHUk9cR+GKAmQKMrTthbtInAxd82Fs8HoP6nXBXBMtn2H39DTbwpuTzK\nkcjoiWo6z/ws6ESYNRsJjpxWTApvGOeeOylSFhGq+2aU8IlVW5BmiXaOsXRQ\n/Y7mvPt7l6cJBu6EZftIcFBEw9mxE0UstBag+Yo/4J7KZ7eHNnn7wqZ0Sneo\nYxm700m9FxZs5O8OIv1QPkxKL5ZLjDYRtMXKlw16LJpOPa3i+5xgd7NslCtY\nCeuHS/mVQa0IGj6Wp/OTmxxnjBGDVIZx5p9MtElZtExFuCp7VJYOqlH1XUdp\nH95fG0RogzizSiAUfkFESX/fcjx55CY9CTvjiWLWFKq7wK9XEbNp3OywcY3U\nhfRh\r\n=A5vk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"96adbecbff44ebd00d9674756c2b5f0e4d79eb1d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.5+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.5","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.30.0","@apollosproject/apollo-server-env-mock":"^2.30.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.30.1-canary.13_1629910780551_0.5916700761519758","host":"s3://npm-registry-packages"}},"2.31.0":{"name":"@apollosproject/data-connector-rock","version":"2.31.0","_id":"@apollosproject/data-connector-rock@2.31.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"cc660679c4deea9533daa82f5a36978987ea5108","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.31.0.tgz","fileCount":158,"integrity":"sha512-Ujr1jJepvzrrZsKMUovYd8x2boubBCEyHlFj/4uqg/R9IzmyLbRUXXauHjaCEGIlJCp3suyKRRr/lKGVi/MV3Q==","signatures":[{"sig":"MEYCIQCXmAQeIwg1HrvaqV+8JwLetBtFLx/AR5EFBfuZO6JT8wIhANYvl9o5Xe/piZtaVPnzTRwforQ6y32YmWq9G0NBldwo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1067461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ/SrCRA9TVsSAnZWagAAoS8P/1lGjHnNjCWL/98+dVSx\nRIfHWkwZPIVbfoSQMM6xvQSwhoG1U+RO9duw3xP3jwSwVm2/TpVs595J5nTN\nEJNl236uFMM6SKzvSxzZs5Cjf7d3gI2FGnqHzCV6oZFlbVd9o1fVpy6+RZ+o\ntB3NyR1tmZ7R3v5BnNE12CyQd9wsJ47CZI4LziCQ5ayaCXXgBAFirnx5cMlB\niOWWpnslGCz73ZAh4cnfZYr/m785HwYvnAIUOO6qPEApowYUM9ruZbDGu0BH\nI/WavDW8APoOdpf/gUFLAyQ9kNKwdX1m4WcuDBC47feWN9hwNxmDaNz4pQdC\nx/muCdOrvHCZjknxOlc6fJwfjBNigq5J4308InLZfXw0sqqlIGESUkr+Az2a\nWirEp21/Goc6zRGEuIainoNdjouwOWIgFSHLXAljRaXRcfn8Y5AB24ennfLG\nDhdbTm9HXD/yP9slsDpEatWRVRBliM+onwbL1IluaV4ANZ1tVk8LWUGuKVFe\n9z24Y5c40ctcdHKHucGXqM5K1ekD7+D30YMJkdZIFtOW6x5psP6fILiK4RbC\nWBPBdO2zY0U4lZKYNY1FGvqd8IEZT+Av07dte44VaQkbhqfWP0P6bdx+IF/0\nptSy2FmbOQnQXevUC5fjf2fAzxMagfDZ2XVk2FjuCT5HN1EfJKTqJNym4vKX\nM4FE\r\n=HyIN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"a61693d41db8b7e2fd4c99b50ce653b2834f78c7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.5+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.5","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.31.0","@apollosproject/apollo-server-env-mock":"^2.31.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.31.0_1630008491410_0.3361193742309192","host":"s3://npm-registry-packages"}},"2.31.1-canary.5":{"name":"@apollosproject/data-connector-rock","version":"2.31.1-canary.5","_id":"@apollosproject/data-connector-rock@2.31.1-canary.5","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"84163f96cb27e366712ce5b5632469529742817c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.31.1-canary.5.tgz","fileCount":158,"integrity":"sha512-p/zyMIOhw+I9n9M1eHT4tWA14RdOx8oaH2UBG3uyipNOO4bth4p9AD3f5DGlV/rNhAq6ipGMKhSvPaRBmtj/fQ==","signatures":[{"sig":"MEUCIQD8t2xINztGO5SoWg5GrlHG2lB3dQWwO/l7t3RdVNXjBwIgaG9tmKwUbuL04CSV+AlHmoTYjfJOOjQSrJ6MOjaX42E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1067997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLnEaCRA9TVsSAnZWagAAiogP/2SXkhWXXRnLUoEOCRW7\npnwu2smfqyRVaunocmEDKShWFBqnK2uO0ZfQbIPZmC+YOLvkNTfdCyTeF483\nvWuyuXHpQJgXDLqc8pWwxxRz85UEQu7yZinijpaFsEDdxUTYnloYkNsDn4mr\nX5f4AmyodSYnB0c/UAU18esNnJE2aOs0HP6MqtFXU3yPaLSniEnQv7Boa8+h\nE6o3JuYWVL3F9uhfglrSm2hyzA/RpmPVkyv4KbMKu3sO7qFCb7Ji3CcMbU1b\n4nCQsDmp9pHaybOPiLoUIJVL/1pfVg760oxeEE9r4f1ety3XjOVIiVRkBRk9\nKGhe4Gct/c37OZIS1kyF7xHOAlYFmsOKZ9q1BSpdtziEMZY57bV6um+SQNAG\nmGCtEzwz5shWzfPipXaHLO8LYjI4NurnnEhXG2035jwVt7rp64WclcHlT2Z7\nERs/AmLaZRMBxBCbLD5BXYD0Dz9dZu+mi4azEfAWyKxnJvbZJYqNnmY8jdsX\nJTX9iYv+VzXWbW0X3kI6W/Bp9bhBsISJlkzGNwZI5s3Tge7c3dhguRQm4MgR\n0TfcOIZ7xTwxVkQEnQg/U2yXeV86DFH7lOKQgSbdjckkNzPyF3rrIWSDsWaW\naP9TYwtQhWuYFSYe0ucvgspwojAOP4FUBTXFl77z/h3+2aAiO/chLHVjK8tY\nKslu\r\n=E7M0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"83d256858a5a2caf73e674a3e07c3afe9784259d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.5+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.5","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.31.0","@apollosproject/apollo-server-env-mock":"^2.31.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.31.1-canary.5_1630433562289_0.7602346592450542","host":"s3://npm-registry-packages"}},"2.32.0":{"name":"@apollosproject/data-connector-rock","version":"2.32.0","_id":"@apollosproject/data-connector-rock@2.32.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9adac56c3d3efcca1d3ef182d19bbeaa633f58e9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.32.0.tgz","fileCount":158,"integrity":"sha512-tlxQ/HeErEf0F08mtPP6iXtprKhqFWYTiMFgEUrNwtxv2trg5EjHxx5r2h3nyy2uNPxRxoHXd9BqKlTamM5AFw==","signatures":[{"sig":"MEYCIQCnbGd4PHdg0sfHTiQHVFWk4a2TJ7EcepgbkLTmIsYk9gIhANVmcH31PgLfjD74Tp3uOPpEJ7HHfMMaPS6jB62R6jIV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1068160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMncjCRA9TVsSAnZWagAAsGEP/3WtJl5OXbU3ejeVj1gr\ng2eJ/vR3v8E7hPm0EL1OCPW0eljBv5x+b9cNVOSPypWb0pOml6wVebzNUCd0\nOVoMOfSm81QLwgDthVZtdbiCMFV3yPW5cpug610uuVdj0jfL2rakHIcmsdAe\nUpNtnEBHcIC2uAloy3fPBlZxv3E4Eu3IIqiTK3FQOQf45aIqaMtuh97ymEQ6\n4nyvONPjGsLTh+TvXSJjTV9TDfB1pdsC1EAYIk4MiHIApozismriWtgOqwa+\n0AVnzbckMD4zl889MoxDQWUTP0zkp7/vOveNzysG+IHovJ8N1uPSkWzQWeea\nXlBZ+hZ4KyPvRbhcJEpwPVb2LKL4RP+9coJMRHkBsCdlx3bMz3AxxySkq9lu\n3p+ox65iUCIgW2AlRk1BKG/bBPe6XIv3ppfZfwm2BD6/qtgiU7daxsHw5RK9\n8zsGTQd3y+06hGuGTnXRUFAniaTXozzET8a9Gkohw8v7VcHW8q+lYXHj06C0\nfRN+j/f1Qj2WiBQIbP8oySeO7CuZ43+VuzJjMlNDlyMisRRiYydDg0+mIVN7\n1Hb5MVxWLE4OMIcywQ4GtpIg3a+cfp4SWJJc3a/Og+BTG0WmOVI7IPMqIh0S\nDqvGanVLQ2Esqr9RNgkwA9JplG7tqhQ51GKjvLzqDbi0i+amua2Q1BxPhDsH\nhcl3\r\n=lqoC\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"5efaf22d5397c87381383a6f1fb784ad7bab72ae","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.32.0","@apollosproject/apollo-server-env-mock":"^2.32.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.32.0_1630697251175_0.5867905169187051","host":"s3://npm-registry-packages"}},"2.32.1":{"name":"@apollosproject/data-connector-rock","version":"2.32.1","_id":"@apollosproject/data-connector-rock@2.32.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6f58cbe40c3df79ce79bb6beb0ed9c747101b908","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.32.1.tgz","fileCount":158,"integrity":"sha512-FsynGBPu8RF5rcZhmFTTcFFZXctzmIiBHXsZEu0amSgZb3aXh4SLF/48lpPJa1fReDcwI2OZ+ysciV17ID5sLA==","signatures":[{"sig":"MEQCIE4Tg7XnB7t4APuSBna9MGGwc9xsO8h+X1K0GKGGZBT3AiAXbxl4AijNoJaVVH4dQaH5/85Vq31GhzgHzwgRfcO0UA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1068342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhN4nkCRA9TVsSAnZWagAAwUYP/2jgzEGrrJj9xdRp+dBd\n4TMxXz0jBolRLcBec8sOp8R+mvEOxW4oCWMH4Ud8Av1k49fHn+gBre6UwGB0\nHiHCL5/RtFlY/fQ369m+CqdEMWijmNSZZETEZbWt5iSMAIrJUNpVkVKG2oMB\nQMK3OYshmYgqjtA/+S0wq91dZV38BmB+YHXTUcKP+cyvrK9Rmqg8hTotnHrl\neuu9C5aPUeTjK8ZlvmCMx2e0hrm5dXThQGu2A//54N8Ys/xLlso2MnQWk9q4\nyaYx3keDhQcG72aS2UxK5AWKY4JJRLgV18FyfdlQ4Rkxb6UqSlAY5jA5bNQR\n1tMFtiI0ZC9R8TtP3qPPSMMsz67ePYvN2MyFjdKCzBhDdACgDuAq6o/GZTvD\n/cwHYZz6IzgA8B4vGU6k9gDgpOTS1F6UHCN5noA2li1ArqZMT9K5Hiy1bRvN\n2B/tqPQ4bfhc65a3nzYjcS2lATB8bVe1vEkmEgRppbco/a3IImVx1BWbs1rQ\nXV4vvGyRVQZq/ZFkmjtop9c/lu2k+T2HAPedueca688qJ3tf/KvDVaToVEnS\niZT+akd0CFDBdkzjnXzyQ0ha+vIjfL9bhsBMEOCGgTV5oCvEsS9OAb1BFXhB\nCv5Q+zEL8mkhDX52RvpJM0893tiG++nx3VlwJcaRS2h4PJfrfG2FKsP3eexB\nD9vp\r\n=i6nL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"e857f74c46ca80b0f89960c7f1eb2e7d5bae10ce","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.32.1","@apollosproject/apollo-server-env-mock":"^2.32.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.32.1_1631029732005_0.7769925363043002","host":"s3://npm-registry-packages"}},"2.32.2-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.32.2-canary.1","_id":"@apollosproject/data-connector-rock@2.32.2-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"72f733f0f4af7ad97051ce29cb242eb41d4e663a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.32.2-canary.1.tgz","fileCount":158,"integrity":"sha512-w+oRQe4XcLSTId4ifR9Z96Jq5RbJjdVCzkZBf2Ip24dHgFWlQidOX/rSh3JC9B6ZJiUPE9ZXKfOam3McPiU6cg==","signatures":[{"sig":"MEQCIHf5ozfDHM0JeUx9I6uYILjFkbulVavHM434x5e8O6YiAiAMK1G3eof5eWwAtp4LbGUVDfIbGmTcnbD2WE2R2qXF9A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1068687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOi66CRA9TVsSAnZWagAAPjMP/itBrhJFyFWKRrhmy59q\ncalTgmPKNwv2W50vQoxDxqaTbRVFLiavkru/eEypCK1uihoz8shHoL0TgH80\nbPeYNn3PfxCiZWs8L27h3Y1V2N1pDlgohNyxfKvn8fZlnFqKtQ0VF9klD/5k\njNijJLx3TjgwIY/liCp81JHrAHg8i8k+9rTPJXYfwp2V6EAKsgFl57I5v7q+\nKv8cGbfsAUvbvc09LPbhxiepPjYnbNl1D48JRIi4xOe1Qpv3mEaZFiB3kzMR\nm1tGatE2vj8tk8vVp9jkHHOW+0XI+H19TXjO7+QRnYZyFyml+fh9ptnSL3bs\nr8ImS6zvDsTYDVHM1/JPmCMVZfgtMkBPG3RytEEdQksYRthtevqy7XMyhcX/\ni3ylT4PmMN7m5tydl4to+6ncxg9dW3e/a7nMvDv84Lqmmxo7C+SCVJ1tS0s5\n40Xzw56unqQ4NEtTCEUBuBH3s2x3lKX+uWn/54JZ3H8cCxgr193CRVUp8wfO\nBkqYVAJXWUr+n9MgRjB+t3BdKRMqUs0i8Goao/12JYD1GVQhHNcF6zZAzDz6\nqJ85fnwYzambovMt4Mf1Dr3X2C7yytjXIF+QsywwBDdvfIaY3kM1C5lVpyim\nSqZFx6+dXcH6pQo5Dj+uR6JOdzOtJDYj6dT6XhZf0a1NdV3tGZYIz2BRyt8h\nr3dB\r\n=2a91\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c04b6f24b0e0075e7df6283fe36aef1d0820caf7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.32.1","@apollosproject/apollo-server-env-mock":"^2.32.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.32.2-canary.1_1631203002564_0.25941141310818727","host":"s3://npm-registry-packages"}},"2.32.2":{"name":"@apollosproject/data-connector-rock","version":"2.32.2","_id":"@apollosproject/data-connector-rock@2.32.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"90632ed62a819b6393ea92c5a0221c96f68cbfa0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.32.2.tgz","fileCount":158,"integrity":"sha512-s3mwFtdEEjQbL0S/cEBWfJcURgM7mjYaYCaNCGqFjWNWd2HtpaFTwgIAAMgRwapHwG9Q50tQ03gq85aTbgAQEg==","signatures":[{"sig":"MEUCIAvzx0Ksm4gr7XKgwiDqNOeUxMN61I5M7XJYxepWQma0AiEA1EmNoEaE4bIoJ8N0F6evdZWtZuGDnLEIGg2xswIS7QU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1069009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOkdjCRA9TVsSAnZWagAAOsAP/REERfQHOKNKyUvPeAHa\nHhUYe9s181500rVf6jJ5Zy1WpaQTrfZjES9pBVu7MCJtCxgv/BUGaU3gc5el\nFIDU4s3MZ74sDYzzSRuCBesykyxPiihKGU/Ci8QJt2pLItJHklbEwNtU99KH\nCwHNiVowM4UDtfVG+R7Xq1Qnl7BLzHObKTKdBUUjDWh7Y1IsQDXoZyxgiBqR\n+Qmg4FbTW80RWH/221dEJL9VLF87Nwk+c3/IwRh8Wq6K71gBZu/9aPG+WeFs\nC7aA+uSg/gdSJ7CAZgbWxa6GNqepSzxatePamXyniXghZIsXEFXemopICl2A\nwrpZtyiq2aVnU88Bn7vHfIOLdClkAAxxC8EM1rh8+yOHyic23Y7hBWF/AkZv\nCxMLPrEwqmGxz1ozVFS4Dv/0zC6c7BM3j5d5otq+WP5vRJ9cbpxsp6P8U2iU\nWG9q2kDxP9jcBYdYEnuvgEsFKQQXSVGKBHqxQ5lGPWjpWFWHfHuQpDj4Ovwu\nK12G9nNvc03WjdoJCMVrRIlnCDUTsZ+0wHgqJSb6vjtw7T0X9RQ+b0wbACg0\n3VJvDeQRrwqIfoKESdoAfpMohC1HAcB1nGwB9lo0fN1g/jzecqX3ya0fK9el\njtj1dpgjUn5R87yad5Hn0/MGBxI6jy4uFPUiMKKQ3qiKel+Ib3lMRIkr43NQ\nU8hW\r\n=zURO\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"d4d982e8c7eb6214ff272af679eaa96e6752ba3c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.32.2","@apollosproject/apollo-server-env-mock":"^2.32.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.32.2_1631209315410_0.16856174109233235","host":"s3://npm-registry-packages"}},"2.32.3-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.32.3-canary.0","_id":"@apollosproject/data-connector-rock@2.32.3-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7643e558ffa9ed3c64a6dcb4587cb84644f2cee7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.32.3-canary.0.tgz","fileCount":158,"integrity":"sha512-RTXTNQyN2hLS5xONFWMU7qNmUfuAFLn0vuSyjdq0JS+/KEmMbWz5/11mlkGSW/pYwQ83sU1gkjwNhThFHU5ZVw==","signatures":[{"sig":"MEQCIGQYAZfmLnJdhHoWkefEKyD1ZfI1lcIbjQlgTmfh0nuqAiB7BmVHuBLB0mIrs0VR2VVg94Zp5G3yfIq4M7SPaJriGg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1069418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhO2c2CRA9TVsSAnZWagAAcHAP/0XVuAr/tOiq7HnH8J4c\nOP+4MmGULw4KnZQd3Qwwb8ZL1qJzfp+r2Gsav1zX6SkuHj7o2/iys23tyVTl\nZNTbgBiP7Dnj65aoIkHLWqBkeFMNScx2w8YwN/7pCQAIB0YM28vdseuO2k6w\nNFdfmrf+JtFIi/+STM9kVbKToOnmUY3UNU5zbbJZSdfCp1262/S05H4oSA2f\nZInMSeNvd1djMGUPonVmw2mQnZWIP4urE1OlMOn9jV2e8yRxlg8hyK1zTpG6\nvGZFGzdU5WA/szCr0i8l+wQsZPUMN1Q6ZpHfkzzsEoGPs+RWShmvqmaszXWE\nNBo15RXNVUpo9hMG3kaMk/LOxfUmyhnrGWJ7XSIDDe5iSRKnWSk83EH/KE0X\nPjda7t16oSv+g//FPAi480h6cEGMmKvAVsupaMURorDWwggCXFtMzWbBnPUk\n5LkHisu8id7eWSDY6SPrdrYjpjgvNrT+kZ0MuZ73ptFggRT5ZQW5Q/g1yuzY\nTFR+zWa7lXcfOIl78xONzj4Vudij+bSDqTsskuP4qXqZxR8Hw5X3EPL5/ZUO\nsoSXQReys+JHqufAN2LlGyu5kems+IBBf/q1/DMMxN65/g/SeHow4MtAz4KQ\ndC2d/ZMiClbpHxKWjFDTwbizp9PFMhlzodYOSLN9qXr/SDZJ+7fcSUAiINKJ\nxDrD\r\n=ge3W\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"6cc3e8cdbf3f5d8c1d75e39ab8cf5986fc25ccf9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.32.2","@apollosproject/apollo-server-env-mock":"^2.32.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.32.3-canary.0_1631282998345_0.7908217641914854","host":"s3://npm-registry-packages"}},"2.32.3-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.32.3-canary.1","_id":"@apollosproject/data-connector-rock@2.32.3-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1b194d887adb68d717468fc4c3eacc168c73f410","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.32.3-canary.1.tgz","fileCount":158,"integrity":"sha512-GSlZ6yFpX9ivh53tJQWIRz4sW7l5KAeYnhouGCtIawsu5UaZvcQRk8KoNiXHsE7s2Nz/ABcAzZXsTxc1D6EoIA==","signatures":[{"sig":"MEUCICMPO4zoRRB3kwNU9wb65k+ybgQk8gfwzXEBITN8WeNrAiEAlF9AQMIjBDdtV0/kDfBW9vy5dtfGouVR3u4Ngc3imf8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1069241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhPBaACRA9TVsSAnZWagAA3OgP+wQMXk8sGYTWzqu5gh/S\nl9u14Imr/eeIVIcdRoeqpzJ5Cke3XrZOAxpgA9R+PZJNqwhDVUq+nhUr2Bw8\nOJXVWoKw9wIs/+3HUXRLUl+P+Iry0NjnBqxYhdI3uTrceZ5eAR2lvJzzgAHE\nnu2IQJkImry8ntmg6cHJa4kEneIkuxEiDwJ6DIwxzDdGaGoE6rxEnBXOxVcn\nqZKkV8u1CvQipU9+eYZ7X8SA89Jf30cqF2mWbhW2jz0UfGWR2vsj8k8F1cfT\nODp10HfIldLEmC3bNQFrjNLxKux/e8/gRWlQcHz/wbb+2ZJO8vccM0HPWOKE\nvO0CN3KUdiiHZIbNHGFU4X++Rb/SaJh1KmI58myesj2nA4gtC4Xa18fpPoqb\nVWHshulm+2c+BsdqK+m6rUOTkcRdMEoMos58MCBRHlmIM66bWO8BG0i3Q8/b\nUurOPIJHqFLOZrvkiQSuzRXoqjyJ608WpiignRMrdtI1dr+jbpNQ9x7JuNtF\nmuTvsGedc8TPxbP3f/bmBA0Cok8ZqKokeYG4PN0WtZpldJqvn8+Trcnb+Z3/\npATqIg1axsafCO6bZjrpnH3m+sq3acmIDlhsCy0gjyRkEmUqGpadSq0csLui\n2nsag0a5KHP8PB8swN1s8qs87BwQ4BUQjDYko/lB20XQyuYQ7RkgEo35bsQS\n4gnL\r\n=cW6w\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"3af8be70df0931a66378982a766da18de31c8176","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.32.2","@apollosproject/apollo-server-env-mock":"^2.32.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.32.3-canary.1_1631327871860_0.6817194977791792","host":"s3://npm-registry-packages"}},"2.32.3-canary.3":{"name":"@apollosproject/data-connector-rock","version":"2.32.3-canary.3","_id":"@apollosproject/data-connector-rock@2.32.3-canary.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"04df309191957b306a76e2e52246b247ce7dbc33","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.32.3-canary.3.tgz","fileCount":158,"integrity":"sha512-coMI4BAOv0vm7UJJmqN6l1zmc8hwtRbHLVnhtT4hchFd9feeOd/411yLwff/m+tZrHSCXTKpZp0YBdkC0qVkHg==","signatures":[{"sig":"MEYCIQCqHJky7hZ+lwocnMA4Q7F6y9TaTYjazLubFbgrurRxGwIhAP395+HGVk5jbBvVx2ErRmKqpnOpGUcTgaSQ9N2eB+D5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1069062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQLTgCRA9TVsSAnZWagAAtWMQAJoKgRFvhvobMubEkZTM\nCdQpH24x0rE1Pg4VC/ECWemyFY4sM+MEWIcxkWnylsmyc+6ETz6NKzUyw6hm\ntnjS0xZh1b60XwOb/8j7sjZgTryfAbmglQV5vgiDhs3dIorIDh0D24f4x6c7\njTI+VIZe1do0Fp9eyG5FbQEf5fmpjYGLi5JTOSYT/037YZYEQekFjvsyN1f7\ni0pRslRU3tOuLvLim2w/jqoY8byMYpCSXEk4dvuTarf3m1u8jbJdBCaylcQ3\nBSDy7ic3poEHtld6Zw03DeW+VDo8dZC20xQJLVyIhbMSHTTudocAB23QaIxA\nIAf4ESW25XKxTDWspYUjaHgmTd8kOLkoXbC5aH6K2cwaUStUP6eykwOKbZgw\nJyva2wgTnu94aSIpL8foM/PDAC025dn37YL9ET8e7dZEzOgtD60XMXn88mLO\nBBme7ZR+P3zGWZH7XUV9PCktDNYR6LHR7IUEGC1Hgko7vfRMzkfe50KdrqcP\nE31dAJ+1X30XbctrC8xTVartV1cpXJvyNBS4NZONLxYljHLbgHed/usYeKFx\napWhEnjHaUaLEukUu7erFd4PuqSM6rCZC1+L7UQfEgC7c2VWlVSZqHbtFCxk\nFBh+G/268BpEIMCP97H1zx0wK0DBLDqfghDPA/n2XMWwJS5pl8t4ym/xdFZz\nhxtE\r\n=XnCN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"09cd369847742093d7eb5eb88714363d91b1bb17","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.32.2","@apollosproject/apollo-server-env-mock":"^2.32.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.32.3-canary.3_1631630560386_0.6769817958996998","host":"s3://npm-registry-packages"}},"2.32.3-canary.4":{"name":"@apollosproject/data-connector-rock","version":"2.32.3-canary.4","_id":"@apollosproject/data-connector-rock@2.32.3-canary.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"bf600f00b902bb64becf99d9c0b79c6fc524f641","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.32.3-canary.4.tgz","fileCount":158,"integrity":"sha512-dricPK+LQd+Jl6ENF75hHM2UnMKB8dAvY6VqRBo0AfIpJ6oDOWlVpG+3EsJyiRjavWXih9oNWZ9YHKP3U4ghjQ==","signatures":[{"sig":"MEYCIQDYBFgm5MBBpJgSyOFqR6nh3lyYwyu5wcqsB9QGBsr2UwIhAKcE2YB/AMrLQ1z9ohl1tNcj98WgBgBv6sVj61xzwijW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1070153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQezpCRA9TVsSAnZWagAAtooP/iUnU0qyqpFfOii9OJqz\ngRh/qv5hixLCCtJiBFW8MQdlQL9CSt+1LOfEvknAGcAK8elpsmhSiMzVtv/5\nGsslKKrrqDQCZB6nF9LUSTisid5NozjAAX8fgBR13RUOf1RoJ6jCaCweKMXm\nH9DyxFz4GARfxuo5Ri4MbxpozgnmgQyT1ruqZ7q7GXEHY/CmGcPCeWOBV35p\n+hLL6w7s3cfEJ5uz+SGglJcPzzkS4pynSiTiWKoDI2h06gWR4Cu5uIN9Nd5I\nxiLexlmdMurmYNEOgqK+dRCGeeaCL06V7JXKLIwaTW2SC+EFCcYfxcHt7oAE\nQD75Chl0AJTwQTYkZ7XRJHxU6mc0IaNsm8ZF8p8m1oZL42ehvKX79+9IT7rK\n/Te6XPae9akOqAcYcKCxt/LpsIikwQywmE/INIuW4izZ4MHDWPa78yWLjVP5\n4jbiph6Nuvt4eGq0KOGKg2NmepOXY+0bBQtJ5jtRWhzHjjzHkwSMr6X1iQXq\nTN/h3SZhjJV9C7th0AEGAJo3Y2qrvDJ2/L7FGXBv+bAOZGUvw5mNs+SVHuLy\nS5qK0lC+kue/VjjbLZUM/qE8ZOPENjoiabi2tDY6ZPbkxxH9rhFBo/epPOFK\nZvTkJuwC/46ayAzd+p7/Zz7TJXddPdeJM+yu5wjg224VZwwvAqEGFhMp2bOu\nW5bd\r\n=TMMl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"6228bc2b739d2fc2219dfe066436c9b4500cdef3","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.32.2","@apollosproject/apollo-server-env-mock":"^2.32.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.32.3-canary.4_1631710441494_0.2565415550849579","host":"s3://npm-registry-packages"}},"2.33.0":{"name":"@apollosproject/data-connector-rock","version":"2.33.0","_id":"@apollosproject/data-connector-rock@2.33.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f4281565967c40e4d7dbdaaef04485a4d5705d0d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.33.0.tgz","fileCount":158,"integrity":"sha512-q8LyHwvpH/Vi/03V8/I/6NvrD2jQ7CDEHoazeIuCOO1DCOQ/rslXoD3HnTlrnlVE7esVJGEDQcNG73rfOA+uTw==","signatures":[{"sig":"MEUCIALN2rodglXxI17dlgsvq0GM7kDtLmmry9EzIr/a3v3mAiEA1FUKSCYZ7L3r3EeNSo12oNhA2taEG7q+X66YhRfeMb8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1070462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQhHXCRA9TVsSAnZWagAA8wAP/RdKF5PQYfDqaeSOBIln\nX3rCMbvrldNJD6WccnnXsro2q7BlRfGivEPgvYpEiuVtEvyUyycSJ50hUrCR\nko8kvIx7g+ekWf3RTBQV5CQu8Q3mSmeOv3dIEtU6BMRB10x5Fcx6aaZeGdwM\nYzN2wRZTGCNEjeHROninz7bwapgKRSaU5V5T7K/6LcFbQuqVUKGuraf7Gv24\n9fFfEqyiOjr2UwuFjSGAIEsyH90uxwzhxUZrIGSS4ZJ62MSfmUsQQ7PEkW3+\nma/RJXZwP4Hk9VRmzEsZMXs+IRbBCyXoPvrsx0SDM7ta+Pufx9A14NHI0eA7\nD1wx+DDyrzRo7ySS833b1lP/2CgE9rk2702RoumWZGQ4DX7cET4OqsfBe+OA\nU5739Zj5VbSHxD2xUAim/Nw1fqR0sT6vDyvUm30DXdy//uMnu4pIreO2mDt7\nI4UYGW08gsc6uOeUFuEQnoQImad0wLZWOknn7xAT5zBdmpf3N+kV8fe99n1i\nA+ysAx4Y0nv0emcGj5DEKHvGaeE8kRROt7VqudooG1fO/DxJ/javKI71w2bz\nag8cBIoLswXzeTVV//hYXEF8qy9ipW9aePb4d+v3uesDU4cB7sfdKEBXhazX\no1vVZic1mewRmFnamkCEzkYk7TpvpYRJf2YWQPvc6OoHBv3FQzzquoJLpb+V\nk8ES\r\n=k3VZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"629a36db75775233509a93734fef8f85ed23701c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.33.0","@apollosproject/apollo-server-env-mock":"^2.33.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.33.0_1631719895041_0.44422581139604556","host":"s3://npm-registry-packages"}},"2.33.1-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.33.1-canary.1","_id":"@apollosproject/data-connector-rock@2.33.1-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f14d618d25ce535c15ca4064c09bbca709a421bf","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.33.1-canary.1.tgz","fileCount":158,"integrity":"sha512-8+qKdOSeaKDHq3ZKf8wa6jvP6cZM37vQm56IZXX30o6iSCpNNCgWO2o3o4hA6QyQD0yljsIOvMdmX+b7koriSw==","signatures":[{"sig":"MEYCIQDknQlEX3/gsPXlmMfY3C8EufKCpKrmWqAVQLGEAyUp7gIhAK9ZkIktSox1daYB/C6jI3qcKkkXc5yES3ju1xbLCuAC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1070584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQmCpCRA9TVsSAnZWagAAl5EP/jiWwPTasDHMNTUR8Hcr\ncRlo61BMIXmxMNSPEM8cclShuuLNN6GJewaYN0TzZnVmjL9r9JERKJi57KWW\nZAh/MmVGoiuqqWmpPMTR4g9PkPrPhaLgAKp4Cqart3gMulDjR8qefPjjaJKz\nBuFeqHbZoR2mk0GVzOFScKP3Srx9UXL6eFsJUw5VKGmuHPmNBk1V25xSrrb0\nqF3rlZU7pfbwi+uiAgmmU5E+CdY6RR3+Jl9HuQi9/AWd91RdFxy4GJDELoy+\n4ZLJmKilmCTxBcTttkcdhZg7HsBfpyfZ8aIbknwbY/g+Jw7W9dINS3DDTyO4\niGYMYAmHcbO3ipik6xh4aIDLQ+Qrs1FjK/1GB1ScsFBt76wCwP1Idchup9OK\nMN65FPudjzBl/Oxo81lHh85yopRHSQ1ZEuvc+gjYJa8FvgyBIaNbZZfU2b2n\nun785tz4txjDihL6+ZiC4m7HNN0PoiMKvZcJ/TST9L/cxm2xEBCsHzyvmsdo\nP1XKeQ20cAPG9FCXf1U0SkDRN7ts6ftsG6h9k74SJlstSeDqT9ia7mYRBJvr\nS6GcXdNksHkOAP1Ow5cd4uW7RfSIyTNgpyopNSg21r+5Dw0w8NXU2TrNUxhQ\nJq8qC/haCulxTISiWR+eEhcdgZtq4bJCwD+pO7X8HPjzbmyPmMw/7ONL5xXe\nWNY1\r\n=n1vm\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8a9a9b9c08c0780671ab04001ed0984ba86429f0","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.33.0","@apollosproject/apollo-server-env-mock":"^2.33.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.33.1-canary.1_1631740073429_0.3818158005203529","host":"s3://npm-registry-packages"}},"2.33.1":{"name":"@apollosproject/data-connector-rock","version":"2.33.1","_id":"@apollosproject/data-connector-rock@2.33.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"678177f9cedee0f24518381689d4ebc9bfe92675","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.33.1.tgz","fileCount":158,"integrity":"sha512-WRfIxbTQ8QPAJl4X6roixB47ZXiKS00l9bXE3s0Ws6UTsqBxAowy3HIDuj2NG+YsXXyicv+5RRHXjDSomNUaIQ==","signatures":[{"sig":"MEUCIBsPiR97KIRndWhIZ/XyzXNx9z/9aNIPkgc/40EmdV7JAiEA2HjIhkBWX+aIp6ylsSriMgY6bygANEsl+s4gSMkPeGY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1070904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQmSrCRA9TVsSAnZWagAAx58P/2MkUAf8p50JG1wkx/Lk\n2+M1KLsczGIZVLqj7PvsiFQ4qM3bXZNTclCM9hfzCPCuTgnjAOicdtx2Hb93\nvv2sy6b0xp0KVhLG5ISCk5hJ6rb0LozK0jRG+FX6CCBX75oCCqresGWXtlrU\nQBdIGaPug9noFYFxZcMla39tSalCvZ/p/gWKldYDlGZ6Fe4M5hVqV20Obuqi\nKF/N46CibqmbV59wxKOKMfXXja2YE1XSQDtEj+piWbAj2bjpsHto5yjOiT9d\nN9LSJh22XJxAMsxbx0+7ClXYuGSeYpN0bsFL0kCln7yBvtDhH6P7tePD7z23\nMiNwIfUptL79ptBkW7F9gW/wJZNvbTK3YFxjnXkR/iQE48zV2dQPfmBZX2cQ\njqWaBHhTXxdLXm6Rcuq0nW08dRKz7ONIullFT0m9gLyS6+4jXHw9SzmpbEx/\noQk67Wnvvq8+2Ulh7cRInU04nNoSuZrhQbzLrt+FWrG/mwA4hUjTY80au7yP\nH+uYO6vRJVmZ8xie/uQstfnlDlq4T0+XyVBU5Cfz0ZP4WW2kWnFahKDvgxA9\n6vQ1Y4TXfXz6cEz6/TkI+Zfq0qxzn++URs5ukd2ivRF462OsrwPImnh3LyVg\nRpxGWbWaEWkKglhkSHl+tmuY6A315TtwD83PFrVur/U+/aikk55FGzVa50JQ\n0qHa\r\n=4PG7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"3ec8a8cabefdc7e2b1bcea784bad9c7161699b08","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.33.1","@apollosproject/apollo-server-env-mock":"^2.33.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.33.1_1631741099547_0.6881968413109505","host":"s3://npm-registry-packages"}},"2.33.2":{"name":"@apollosproject/data-connector-rock","version":"2.33.2","_id":"@apollosproject/data-connector-rock@2.33.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5fef2ec035740a76b6295453c4f955e9b1d19644","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.33.2.tgz","fileCount":158,"integrity":"sha512-KEzKALZmlV+nOwByls2f+JcdKhgvdIg48UBCgsv+S6jXNlXJu2XnYtOEAtu0/++6160ssANvmJdvQUryqAu3hA==","signatures":[{"sig":"MEUCIQDLYHkJcmBFKw+uQ9kRQ6lS9pdCNK2yo4fm9F05kRYyzgIgAK8KenWU6Vm7fJU9vWipn1JhPqU2CWInjFtnM43wKHk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1071086},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"20f3dfd8c65dda50c1e1901fc7df9011a5193845","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.33.2","@apollosproject/apollo-server-env-mock":"^2.33.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.33.2_1631900555417_0.7272274863884476","host":"s3://npm-registry-packages"}},"2.33.3":{"name":"@apollosproject/data-connector-rock","version":"2.33.3","_id":"@apollosproject/data-connector-rock@2.33.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d9b5452aa1f45327babffecfedfc4140c05ea323","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.33.3.tgz","fileCount":158,"integrity":"sha512-nmtmjjhVsMI5ShTRgZl7AhnmvEHl8/roF2vrWHKgwDDsTFOqsIN+ATwf+vGsFMIVrpir3PX+TDgjyVsYRojOxA==","signatures":[{"sig":"MEUCIQCcqm64kPnWJm0B0YQ/hEQkmPJU4hGRqTHO2flu1bzq7AIgcGh0Ci76MHwULlJwhdI8L52Z8HkjoRxNPky3S2ZbY2Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1071268},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"335fe272894f011dfa695e6c3d233b7c8f0139e9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.33.3","@apollosproject/apollo-server-env-mock":"^2.33.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.33.3_1632321095123_0.5646865903289033","host":"s3://npm-registry-packages"}},"2.33.4":{"name":"@apollosproject/data-connector-rock","version":"2.33.4","_id":"@apollosproject/data-connector-rock@2.33.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"85efb3c87e9e92173c46f9ee2241915fb9700243","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.33.4.tgz","fileCount":158,"integrity":"sha512-47T8NJxHXfJxehIl9mKtphAkfe3yNGzQiCa6wQ99HXP8H8u1tKB7hrqYY1vTipkLdwu9ipLssw1ldCBTV3rUHA==","signatures":[{"sig":"MEUCIQCEwMpaF2QeyDZA/sJSw2uUt+BLGdhwwJvf0oiW9cE1gAIgfWrrLXqj0lh3VF+yjvSY4Syr0Xjo6MR6qTVF+ApueWQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1071450},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"4834d95a80bc78986593c593c707ad45213e6c1a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.33.4","@apollosproject/apollo-server-env-mock":"^2.33.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.33.4_1632749868620_0.6228288706089291","host":"s3://npm-registry-packages"}},"2.33.5-canary.3":{"name":"@apollosproject/data-connector-rock","version":"2.33.5-canary.3","_id":"@apollosproject/data-connector-rock@2.33.5-canary.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"39fa5b65f4c3f9b5fca9aeee279f949b13dab817","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.33.5-canary.3.tgz","fileCount":158,"integrity":"sha512-EJwOC1iPPs9qP0XZw5RHcv16eQZt55Q9HKKujA9zDl3PcJLcxpSIWAQS7qmfndrXhwmgCiABLw28g/ya1EuZEQ==","signatures":[{"sig":"MEQCIB+kfEx63TfKHgUr9Jl05xaVIq8NTMuFSgjgINsS6V32AiBliKijLRTML0kIkBizow9jmBC7lBxlhocA5/H/Mj7XvA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1071856},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"7c2b132503442a2d72bd88aaeecc3dfb07cfa6f5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.17.6","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.33.4","@apollosproject/apollo-server-env-mock":"^2.33.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.33.5-canary.3_1632927213075_0.4763046419812178","host":"s3://npm-registry-packages"}},"2.33.5-canary.8":{"name":"@apollosproject/data-connector-rock","version":"2.33.5-canary.8","_id":"@apollosproject/data-connector-rock@2.33.5-canary.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"cde7cdb7b1862bc5480f2d96887449d588d25d23","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.33.5-canary.8.tgz","fileCount":158,"integrity":"sha512-5RZo/wXDHaEWUHJbZXw7ggXxrXIa9t2MCMMfZjkkSVqIwda7CY6yMbGPIHAqAxX1wZqpRBOD27k0f6B4kAiVvA==","signatures":[{"sig":"MEYCIQDYMGCg9sLivKM2MXoh8JXlTVhp78c8wqZFHnDshtCrGQIhALEhWBETD4jg5PmVjKTB1v/LDod4r8vjdfvQanyGrs97","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1072365},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"5573de1136f930c62914692090d04578ddac2843","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.33.4","@apollosproject/apollo-server-env-mock":"^2.33.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.33.5-canary.8_1633107061963_0.8907143618534765","host":"s3://npm-registry-packages"}},"2.34.0":{"name":"@apollosproject/data-connector-rock","version":"2.34.0","_id":"@apollosproject/data-connector-rock@2.34.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2dce23a008173b966e4679ddf36368335a7155e7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.34.0.tgz","fileCount":158,"integrity":"sha512-BIkFtRBGEt55BXFWH9K2oSmNKx5tnNB0pe7GsxSlwPB3d8YJjB9Ai7LFrZEJZz0f55+sLnjlfKPw5B9OfWu3Kg==","signatures":[{"sig":"MEUCIQDG4BvH4rvnos1aTpCvLo56QqlU1fVGKP0/OkfMTVcj/QIgc4+ekJNDQ9IbkuuyLO6ts3isd9JZqlbfgTbjHR4heNE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1072669},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"d9cb459ca58e1443bd1a609cc9900cec1ed738fb","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.34.0","@apollosproject/apollo-server-env-mock":"^2.34.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.34.0_1633113379666_0.8787343430283767","host":"s3://npm-registry-packages"}},"2.34.1-canary.2":{"name":"@apollosproject/data-connector-rock","version":"2.34.1-canary.2","_id":"@apollosproject/data-connector-rock@2.34.1-canary.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c8dad4a9c29835c51965b9d9dc3568ad72c8bffa","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.34.1-canary.2.tgz","fileCount":158,"integrity":"sha512-OTTxxdalm4L97Yldq7bO1mKIBu9dVmieRMQnkN05SgUdMaOh0TuSyv8MfjRH5wXpanI/kIDzghTJeLt5zMPexA==","signatures":[{"sig":"MEYCIQDvfhamuhk49MD4XP9eL0uDhyS6N5uEgTkiTquYYyBLNwIhAMgbyZZSChq57RXWzkud+L7gAuH/g6zHnMMR1ZIosAZw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1072904},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"cc748c16664a2c7ecd7789e837d44c8fdfeae636","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.34.0","@apollosproject/apollo-server-env-mock":"^2.34.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.34.1-canary.2_1633631588834_0.14193562153609607","host":"s3://npm-registry-packages"}},"2.35.0":{"name":"@apollosproject/data-connector-rock","version":"2.35.0","_id":"@apollosproject/data-connector-rock@2.35.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8c1a43f861a55e4f9705f2d027865c432757f419","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.35.0.tgz","fileCount":158,"integrity":"sha512-zBoLlENnFB+u4SvemaZqZnmcX+wBVpqfSvLxB1zMgH9M68us60VDtrszJaSuXYy+nA1bWRDOZjdk1ZBNzhrcHQ==","signatures":[{"sig":"MEYCIQDWwljJkL1XmmelAnOw2jClj2Th4tllb7ahjb/zs+RnnwIhAKa9tUbmdeJcKz4UNOLH+GLzXjWL4qReJ99cf5JMfNu3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1073234},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"83a56a48dd28ff2a518947d293d3b763616cb4ad","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.35.0","@apollosproject/apollo-server-env-mock":"^2.35.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.35.0_1634046027485_0.09568966106372678","host":"s3://npm-registry-packages"}},"2.36.0":{"name":"@apollosproject/data-connector-rock","version":"2.36.0","_id":"@apollosproject/data-connector-rock@2.36.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"40e19ee1f8b624fa032691795b2a50ceb17a3381","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.36.0.tgz","fileCount":158,"integrity":"sha512-w1ZRKq2YVd/4Um5EHta9WpRA3+icIveNy7ASndTM00yW8sQf6jLE23/Dg4A+yU1cIsW38yfYQjghV5eot2T0eQ==","signatures":[{"sig":"MEUCIQDPFsTFyRe6Q/i27rDQhaILAq3x0zKqM2dVhlVyx7zANQIgbSqzA1kvGgf0i25iMoF4mFunfqqxYMRcz/PSnh4NJEs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1073415},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"df9ec6d30485eb3849f63a52cbb3a378722257e7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.36.0","@apollosproject/apollo-server-env-mock":"^2.36.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.36.0_1634848302086_0.4861102484139883","host":"s3://npm-registry-packages"}},"2.36.1":{"name":"@apollosproject/data-connector-rock","version":"2.36.1","_id":"@apollosproject/data-connector-rock@2.36.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8bf81e146c7a22f8f56b6f4f76af275575cb094f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.36.1.tgz","fileCount":158,"integrity":"sha512-exIk9WBfZGwMf5jnt4mIa5xTyi0m23oEnQ2hzdld5OBlS9V323/isaopCGpTepZLtQx/FLLkEG4+hsDMshmmSw==","signatures":[{"sig":"MEQCIBHgdE/gflr8dMv3fvy2G2L47GYBMv9To8Tvn++zXjfzAiBBMvrAEnzfxbGskKe2hcuqO8SSc/MyfqPM8HBpAan5hw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1073597},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"b7658365c67e3ad42f4aa53497bbe3e4b5fc07f5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.36.1","@apollosproject/apollo-server-env-mock":"^2.36.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.36.1_1634936560270_0.06980320704175669","host":"s3://npm-registry-packages"}},"2.36.2":{"name":"@apollosproject/data-connector-rock","version":"2.36.2","_id":"@apollosproject/data-connector-rock@2.36.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5575d6a91d3cac459fb45037e1b53ccd3aad6c57","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.36.2.tgz","fileCount":158,"integrity":"sha512-i+gAEfWcHDs13W7uMZ1jrV/5oBSWp/MqnuzQ5XlX3NwH5BPrwfVJ0VALVu9z6Sq/cXbavD0i6KaihlbwlHcf8A==","signatures":[{"sig":"MEUCIQDTdFWmHFNKGeDutt0c52O0UyYNryxnom78sh7ia2SOogIgf2UC6Le0YUhXsR/uVP+WPuANDJe8kbEXkjw0QCjpKl4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1073779},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"a35329246cfb0b03a5704d5cb0f743048e23cecc","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.36.2","@apollosproject/apollo-server-env-mock":"^2.36.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.36.2_1635382135390_0.6258708760312537","host":"s3://npm-registry-packages"}},"2.36.3":{"name":"@apollosproject/data-connector-rock","version":"2.36.3","_id":"@apollosproject/data-connector-rock@2.36.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6e8e9811a8530b6c0542bb99c4ca6820f87e6aff","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.36.3.tgz","fileCount":158,"integrity":"sha512-cCkRHM8Ux90QjO23Fm3ffojG71emRYo35u+fWLr2hflkIIMCzwSGIpHuLouVol244kQ+Xbnl59PXfB8odUlHFw==","signatures":[{"sig":"MEUCIQDtZTqxD8hk6o5QlVhpKMujv/hnvhoMr8p1dt533hKZqQIgLZclSgt5wKLB5KFsQEywkbG79IYXgJQz+cI6sbJArmg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1073961},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"a8e2c47c65cd1aec8ce859720fa29c1e31cf4d5f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.36.3","@apollosproject/apollo-server-env-mock":"^2.36.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.36.3_1635514579254_0.008316869576345143","host":"s3://npm-registry-packages"}},"2.37.0":{"name":"@apollosproject/data-connector-rock","version":"2.37.0","_id":"@apollosproject/data-connector-rock@2.37.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a616719ffb1ed164cbd5f878a425641fd4229ef8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.37.0.tgz","fileCount":158,"integrity":"sha512-8AKQ76Gsrp8BOH7XEOUgeZJ/bS/+UgIwq4Oj8+gySW5oruOPzmOMT8FYRxJkm1lcJDnyKTZDvb17SGlzOq+Rng==","signatures":[{"sig":"MEUCIBrya6U7MIiEFW2aa18/kSIsldQ0RcNSG/cES63+/U4IAiEA+5tEIDmSHkWI1/gjz5YgeptzeLAR5TeH345+mKdr1zY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1074142},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"19824a4935ded21c9623390e91ca308f2ce4c18a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.37.0","@apollosproject/apollo-server-env-mock":"^2.37.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.37.0_1636737622453_0.18775914954780926","host":"s3://npm-registry-packages"}},"2.38.0":{"name":"@apollosproject/data-connector-rock","version":"2.38.0","_id":"@apollosproject/data-connector-rock@2.38.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ff043a8e84d8cf2b3385960205cccbb56179ceb3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.38.0.tgz","fileCount":158,"integrity":"sha512-aBGdMjb8So8N6ARw/srlamgPWfcmMdBdMNE3ULKn+RxvcYrAFWURSx2EaozhX6W1T1Rod6SRt/imhvhSYvFmvQ==","signatures":[{"sig":"MEUCIQDi/GxGaF93mUUReN+cDvT1ABG7tUP4JLVOfm5XU8rg9QIgUojYhPfxSlYEAcKBo1ihJN4r9S9p1P5UnY/OTfQQy6k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1074323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhkpA4CRA9TVsSAnZWagAAPeYQAJWhZ3shspx+93e3B/Pe\nqxdxqYsHcOdks28pZfMf9fPXc3OnKdVzYplCSwJSAiA4jbuBLsgthDpfxnLG\nwcYuKrZzJQKo6UFsOj9PxRkvxLWVG4rnJwg3Dz4FNomR9q4pTZYKIFBsGHFE\n9Ciq8Z7p9C/PunATo+eyD741VODJwfnWXzHtG8QXBmPdrbslXvXAQJ8JcjN5\nZp5Ocfff9Z3zykZaYSHM6TA1XvnH5io8A7jioE4LgXLO6iQLJS4Ibn4vUsj/\ng/cHrj8w5faQLrd5dEkUSxy/QoJenc4nRPZTSq8qpV27ovkkfB39JOOiPII9\noBkCr+4b+svkGVZ+EDHiMJhLlWopbd2PSQdcdycUpWLGgsJ9GYCBrpNjpXij\nrIraGrjCrFmmIyQketPZxDLq5unE2DaBLaNvT4MxnKWAHXITqpaaF0c2HdiD\nhbIpA9HWzJTYbKgqB+MY+KwmWRAMOJ3eZYHaAPxHgHHGlfx/qels8AyV6EWa\nxdkK+D/j3XulSx7xzhJau/38oydmwa8twN7NevT9gnC2+ysR/Bad/0EnontU\nK+1Es9uvk0xZRaItZAeVzqihc4oZxxTZHanB2FW15pkhVlqDmQktpCsWC7Ln\nkIaEd/093gPiJ5plMDMpj5PiD8pyO0RsWDl+afCLMI2WZqFjGGnXcvZf/Qi6\n60k4\r\n=XSm4\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"e7821501be31b2501bafcc66f9910a43afb6f941","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.38.0","@apollosproject/apollo-server-env-mock":"^2.38.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.38.0_1636995128413_0.8938909074892387","host":"s3://npm-registry-packages"}},"2.38.1-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.38.1-canary.1","_id":"@apollosproject/data-connector-rock@2.38.1-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"75d18e75c83b5f46bf2f7d1ed7e4a95a65d2ca17","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.38.1-canary.1.tgz","fileCount":158,"integrity":"sha512-SduS2n8yMYHd0LUL9K+A6F4sYJOIo9sGVb634uuvgKqVjXTSwsoEQbBiYSL6StTQ4o1KUTWMxqEZAwyuO51phQ==","signatures":[{"sig":"MEQCIB7BySH2HxpS7rChfKucfQ3/jUNDq0KQofB9jojDAN4fAiBBsiD80/kzSLdUA5taOxUKCC0ul7YXKTtxb2bLky2RDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1075895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhktKRCRA9TVsSAnZWagAAO+UP+wZjZPlqLub8+qQAMQjP\nLqi2hAp7/D203OlkLuuqHfLqWC6t0U3EKcgUYqZNFJ4eFe05GKHudd1Yd5uR\nTBKamt29tLZ2qnvmaUmbx3nqfj3V1mjvga6RQyOadt9HTM9zrGoTF8X6E45J\n2kk1sdhaMwN0MSSs0BNY7hBuLjpr5rYNC/EYtKvvmCVjGxuc0hdTfHKwrXP2\nCITG33ggbn6xYK2jA/uf/x6LUrNbYcSXaOBDlrNWLT8K3tRPtrntve8cSaiK\nJG4TsvgXcLPDUxEqyhTRtkHCHI1jp8qUj3GLfuPwPObQsH43/pNZrtz/30Wo\n+09meG2YS+kErr6CkECZCOK3iQaIxsN77iBaHNnvs0qXwauDRyWngBpqCJSi\nvkp93ioSUGD1OCOvVwOR08vqSPAwAHf1O86rVfJh9gMdiIDpJKUxe0XRuEAV\nTj3cGtdCsK3L0pDv1zuMFNOp0rRMWFXnNxOoioi0rQORdcHmv1tJhM/USydS\nJxaW9gGWVrrmJ9jytbLfBtM9PKJC2QlMAkBX5PxeD45d1hfWs1iaQnAT7gtU\nF44WhIES/lfbyYIve/D3hEKsFEAxOW9X3Kkfeeo9k9PaWJCjAEnWXVJVr+ud\nVHJHAJZ4CllyWZDblDJuQugtYYUQCFl3ogUe1jvZ/iSh2vq6WZLm5jEf6Bi8\nq/zB\r\n=Pujt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"45f537a5f83631fc56e89aab1f7bb2b6a4fa9a6d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.38.0","@apollosproject/apollo-server-env-mock":"^2.38.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.38.1-canary.1_1637012113122_0.9396605378526144","host":"s3://npm-registry-packages"}},"2.39.0":{"name":"@apollosproject/data-connector-rock","version":"2.39.0","_id":"@apollosproject/data-connector-rock@2.39.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"af6de5854bb93c38cd9088207acd2e84614bf59b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.39.0.tgz","fileCount":158,"integrity":"sha512-rPxZqPYtrKf9ua59BjrsnHoSj6Yt369rXsKx33xCjS8Vt8xeat+TZwkFE6OpqSIuDsheN8w48FWjyBMfUKglOA==","signatures":[{"sig":"MEQCIGWXSdu0RegOZbcFneSq5rPdYbrAKCaTkur6mt3fkeJJAiAWpkz0PoxSdcmxEhE5kTeh93heLr+T/fVrXQrCpdaBPw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1076209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm/JHCRA9TVsSAnZWagAAQTQP/jXfb4k8MBiC+14PAa54\nmN6HyvWaL1rr0YlmkAU4YCWDwc0j0bmwLfchxP6DQq2jFBAS8hZld2Au/NpR\nu0cO6BQ5ONIvH2jY+2QckAHoKamPXoSgLN7wNABxt1u8EN6WKY/FAKAB97IF\nYMMpZOJuI13/SrU9PzthRq3m+3XE1kzFpiD4vRtvensHA7UeL6UqNzWHF8R0\nlrf1zuNjxMZ9bc/GybFyZptFlc/jhtOR5E3AFFgZ2NoqB402A4tbiRQ2G0Cg\ncmyJIwqT5DEcVBpnbOErOY957FoYeLzsIcKwlC1YjriUl6EnsbM3uCU0WXo2\n56w72xZbCdNjlopfmISR3d5GdFZEJqXbgFKRhmcTx/39/x4309S0LIPQcOKp\n4z4EcgtayO7AhIB75MPwzvi73ZYyc9F/Tp9XN4QBF3iKo94sRhINAN9eDlvZ\nBh++e04nTxaualYOLHC+SxfHM1Zta8OtlsXqVeJPjbC4porxl05ZWciQQsN5\n7LxrbOwtXgpdzxztVsOp5zJ1r/kFTPM7uwRQ9SP31OL1D3pJ2BXNoJeSgRL+\ntWYMuEadivckWOz1ljpDCtSMLR6v1eX063dy9d1ttQZB/PLXQoCC85auoQPP\n3A2egmzI5nRlQiiBTLeK/LbBKPJrXQil+1y9hyPSVsSOuP8CSLPpubSBc7Qr\n8Ull\r\n=UJHA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"7ddc8796e4e8b0161ef7eb44762021b57d01c592","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.39.0","@apollosproject/apollo-server-env-mock":"^2.39.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.39.0_1637610055676_0.19517624250399068","host":"s3://npm-registry-packages"}},"2.39.1-canary.0":{"name":"@apollosproject/data-connector-rock","version":"2.39.1-canary.0","_id":"@apollosproject/data-connector-rock@2.39.1-canary.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2adb48009b788155eec0d10cecc2fa231def1ab1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.39.1-canary.0.tgz","fileCount":158,"integrity":"sha512-62zRph9FDc1u7yc0JhdwS5SW/LDyBgkE5zcZBIHbjhRyHje6RDm7PABVfkl0mFimOdmpLVFYmWtm/jzBHcmTOQ==","signatures":[{"sig":"MEUCID0vOZ0Q6rbaUJxo+5hIw91bxzMhoqYTqqPb9IuwDdPVAiEAgFAug3+nsac6kuCTa1wGdkl4o58q8yxLdnNMvPQK8y4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1076492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnnvNCRA9TVsSAnZWagAArVEQAJb+k01dzdJ/IviGMqV+\naBTDUgQCFY/Sgv6vPm5I8hFO2kkwy7W9DpWkGsTSoU84ea6U3i1zmE3y9yR4\nOoUWtCbziBSyL8mqUinNpxHvRe8eZUK1r+kASB+NB2vZp2eSndDOo5txUUUw\nJere32VsgT3de9jK4h2iCt4HXkn7do1a1qchsPnuGO7Fb0n5/0WaPE+Zdf7E\n+smmK94Cyph+yhZAdxEctWFGAuxVMk0t8qiiSetHObingFtHIcz3CnfhGFJO\n66oDtwIQxzAZiDkPUNN12qXOPcZy1YS5b0SecBhDT7RgYEyieRE37qYEDwUw\nHnMig9IfMWLVT5qqcSZ/Kk+sbJwl4IugtbtWrN7Gy1+lOoacHalweouKpCHs\nte97yWBiXq/SQOjfz4ZOE6a+2Plbdp8e+TIXi6jIpBkPVgVtSF+WbjthXTUd\nd2+XStwq9mDLz+NKOWEjqLfa3Vewc+9LFP7Y1BErTqn+2PwdK0jOmvK8a/s6\n7qHqSg8x1u7A7RZJDPhL9iLnTN3edXN//Eb7tIVlRyBhNvxa25zfk3t2yexo\nECy5W7yZseLict5rKs0o/vIhNO5v1O/NwiVGrHKPMa7T70tGroVSjRX0+FM7\n+zHSIHONz/SDRXviN7TXrt3tvxo/PbyjeK2JsSg2sjATzblotikoqXKw7v0S\nd6FU\r\n=WCkH\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f46127e4c52b03078afead416d33abd9961cf5e0","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.39.0","@apollosproject/apollo-server-env-mock":"^2.39.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.39.1-canary.0_1637776333175_0.1718330518135318","host":"s3://npm-registry-packages"}},"2.39.1-canary.4":{"name":"@apollosproject/data-connector-rock","version":"2.39.1-canary.4","_id":"@apollosproject/data-connector-rock@2.39.1-canary.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"67acc222cd983b713456704ea462a1b2b771c868","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.39.1-canary.4.tgz","fileCount":158,"integrity":"sha512-Mr3ijnhT4HR/9uqkLgZjVeIie1bgCO5egt7JCmTyqwJOXgMxwQE75fKVq4bYxjlaIBNSLVY48ee+KNcu0sY4Bg==","signatures":[{"sig":"MEQCIDvHvyFc5eju7o2Td4owREOHuBFnLRKxB0tj1ykXmy77AiAnOQWJVQIb/EHqSjA08zdHNZrHoegOvROmuhInAL+pug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1077157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhplhlCRA9TVsSAnZWagAAtK8P/j7/IKffXIRzY31dDSSu\nV4irp10CKith6kpFB7RrtSSE4CVXnprkmd6W1CFt2g3X5dFTfAdomzeHkwAo\nExEyki8iSIbsi+vxH/yb5twDP94Y0mhX1vU/q1I6okifoKvzQR7/hloSnv8W\nX2DtE789DC2aS2RsaYHsdFF9MnLl1oikRNZtN/AzaUDwtIHxpbyuHMtqw1zv\n+y9/0BzFcoVsxwC5iQk63W35s6Qt3zDB1UTAadXO1pLNWqUQ8t30IKD7PpZH\noBv/MIH77f6SQpCFjLQKDcVwQEaqHN+j4XYmU7pvB2u/+rRXdbd+Af6jjctx\nHfJE4RQ/RrLgLxNW5WEIJdnjwKG0TcIpLASGmTD6EOTBPcTon7cQ9ftJKwXb\nWH9Fa9bzULY6a4NRs3VsP6XPfWw0agPPLmbysYXNeOykYXQLwr7BFzer07Cg\nci61Rlbu8DBNVRhftSdJxM25Aw+O0KVQ/lwNfbVn1HRNwzmj7cpzU1EkiorW\nWVwHsl0FAvP3mzGi1NC1iMxgBqzvAvGneYIUvmy1Ob/9Ib+H6suGeB7st9Hj\nmmLulaMAATBXvh+EsimpqR0RAJaMorDIyRHyrvhGrwPMsIhzRV/M+zyqMaw0\nf3AaljzE7AAbIyPhX8s5XmYCyaEGWveEYmCoGnyu69zP+x8ijrlN5XMJhsiV\nJa5F\r\n=Np+P\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"92c77605778184b9402f2b5e2e5acff4f51b8f22","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.39.0","@apollosproject/apollo-server-env-mock":"^2.39.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.39.1-canary.4_1638291557253_0.8198134455813986","host":"s3://npm-registry-packages"}},"2.39.1-canary.8":{"name":"@apollosproject/data-connector-rock","version":"2.39.1-canary.8","_id":"@apollosproject/data-connector-rock@2.39.1-canary.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"42a09ad7ca1d9c2aadbf711fadb60795f3b7b9f7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.39.1-canary.8.tgz","fileCount":158,"integrity":"sha512-QkGSXq6rUW+GwHes5K15oxQDn6H3oLn1RBUTLzMssAU0hW6Jo5XGOXGtWqcD6kv6lR/2HVmP8q7IkZHV9fG8Jg==","signatures":[{"sig":"MEUCIQCPCDTUh24V43Hc8w7Lyx5ZOAfShAwAlQSqlV5gHdHC4gIgNJohEflozQum1k9lO0M+SYtOjFB48PxXHLCnfm916bQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1079529,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqm5pCRA9TVsSAnZWagAADUQP/i9JgUppZaS3K63BjvKi\nVMK52v70afPbjF09S+EwTNobApKgFMZSLuCRKcFovHxv56ZqG90Ake1oQU/u\ny4HzYhKKqalThp7MEszvHS1Nzdu67NUXLi8bK2z4BctVOrJRN/AB8QRmUleD\n3lkusIXB+/AdyZ3wltb4754brQjyvZmN0czNCUzNUZJm2bmO7i0tylAGW5zq\nibAnXGJjGMbZY86yXikTduTasf31SjN18+Z4+6SRkzan8K24ur1A/2LJgrOn\nQkMUFH111Lfk0VmE5OStc3NnXiMpXGryNqu81t5CmK8gbMHIx/sKJtDnW0RB\ncDpr04NuJ46jzduYkNIRhfBjneACwlOVe5DTkd1WZ68VLwZBQPErnat8sXbT\naFp+FBeg156AO2KclcMJSx2NLGxTjYLMQTVbUrEhGKsIcMsAgjycCtoU2CQy\niakinIQgnaOKoNoayFrbKhAicDUY1ZtaWYsaP6DB+aheeeYsTnDAOLjJEzd8\nlS2VWGY2m9laIiYtrd+J4AJZLqjLYJJA57T1SZU9xKvYaWfJ534WqeRnROcE\nHVgmRKiKn0hOyvSruwuVXB/oTD8017f+Bv+kun2+rTSdH4np3bJHDdN2CL7C\nNtpOWGz6VCFrUKGdXjaSO4f5XRabIh0Q5UCmrUjlWGMK0YHqN8oXR56A8t7v\nvsFi\r\n=cEGS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"020235160381272ee3cd2328aba6e5a8edd26146","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.39.0","@apollosproject/apollo-server-env-mock":"^2.39.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.39.1-canary.8_1638559337104_0.12692357157522904","host":"s3://npm-registry-packages"}},"2.39.1-canary.17":{"name":"@apollosproject/data-connector-rock","version":"2.39.1-canary.17","_id":"@apollosproject/data-connector-rock@2.39.1-canary.17","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"dde76ea8b4dac852ae734aceec07b2ac090712d7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.39.1-canary.17.tgz","fileCount":158,"integrity":"sha512-Mncit3A8pBvkSBhS1aP/0x3wlFBk61Ca1QfMbazE0hlAQo2TvFHlucAk4KWSabEN41qWxHbPze5RsX52QwiJOw==","signatures":[{"sig":"MEQCIAoaFeZb4C37IRKBwXJGXh+6VnGFjIz+1ucsRB0B0nBQAiABMD7vL1fwBeKPq85Laqov1FmGKJfIkuWteNNR77daeQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1080909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrllhCRA9TVsSAnZWagAAidsQAJSWXyYJVesmj0X0JeLQ\n2dknVriVJRKap8lDVX2aF9S0YYy0Lleg1etYW9UGOTyYuogAGDYFGAIrq2yo\nnHMg6eM89kSTWckkLtHMnTL2XapNDImdjuX8RCpvlOC6K89AqExkheFdCuwq\noU4dZCLAKCi9UfSl1olqersvQ5WARLrepaMlSh/M8C1kaKpH+ySIAiml1V/i\nROdwzHlMILTj0EZYKk+I8ZxdbJeCoe6AQRi859sliNpVR3QR1MQw4JWi1YfL\nZfZWvMTlUS1j1m5NXkWqZkCTmuV29wJtFSEEOtBRR6NJZ3CnLqPcVwojy2oh\nObkRtH7kjca5a2Kj8+9bLT5gcpSpOP5OSpq2d4OcKm3uGvVjdXmBIwN8s1Hy\nEXNrrcL2UoD/nQDiErtx2R41kG07MhmCpYCxEBUJjh6+E47nzxBrH82vJ6YI\nT37t54JYqRxj/cimDYPPWYrGJtP64jpi8DNVJfUC/4fHNeW9bCFfF5+xiNHd\nfDmCrLDgqFjZA/DKwynkaoXSCnMEH6TyXdasqAqmcP2DLac6Z70XT7EbxElV\nXyxx3Cg0bG2I65lJmgpeGfkypHg16Jp4uejTuHR205x7s3Ogxem087MMz2qQ\nsnmPZAStDk2j4gQmvurBSTXlOY4PlNwjr4zRUKtYlmPxedUscwL5fm09msf/\nllW8\r\n=Wu64\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c5079ce9e599c12683c3e636e187763cd69da866","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.39.0","@apollosproject/apollo-server-env-mock":"^2.39.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.39.1-canary.17_1638816096994_0.1379879930411525","host":"s3://npm-registry-packages"}},"2.40.0":{"name":"@apollosproject/data-connector-rock","version":"2.40.0","_id":"@apollosproject/data-connector-rock@2.40.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"33b25fc90589ad3cb4f3a90fb6fa70a4842f6852","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.40.0.tgz","fileCount":158,"integrity":"sha512-GoRQJkce2JFV+UQQrJq1T5pKmltt+1v/iZyr2x2o9VzOgUw+EmziHiSPJIgMmTNfWUjdD/ZnkNM8dgmBxLK4nQ==","signatures":[{"sig":"MEUCIC2wR8y9VDvnYftAzFbmA2cAjJQvn99JTBBOHRv8w6BCAiEA8B1tsxxAJhdE0uj/9E9GvqLyg3sIx7VJFLWV42BH7Bk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1081893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrr8GCRA9TVsSAnZWagAAJVIP/Ru1zdAnhmk7RZrDq6KQ\nPoA5amIYCnIQBbC+5VgUmPX+coLMPATKIgYbZLHIAo0d0H0OoMV7RFZMnYP8\ner1Kca5VYbJH9PFeAYyZSCNOmj+rGaOH26/MbNFeqiQS3mbr4akLDY9CWO3U\nXuR/09gYRWyzzTCUIKZNn7pS+H9FhT2u1L2CKGsUAVu8B1WFcv5kdNn37ZT0\nLi1OLNYyLarUEufNjBorArumvhlexOZTAYjH6Z8Mcd2NwKz394iqsYhlsCbm\nALkt24+uJpD17niogU4Pwv6/XBmuufGxRf2tLuZljIZ6Tf8EO4wh40dakAtV\nhDf3M6RC3OHYRAlPK9csCs7Jxd5vMUXL9h9a1i/bhGYJpV3a2JQbo63niBOm\nvcZoDWZ8YLVgElBH+honHVRnVPu2fQq9XJqe5V63yrFFc3RH08k34w6ttQWR\n6mONx3H4iqsbpeR5vbqQsutsZlSJNniDCL5FhUghnL9oqmzMnRD1BAXgVVZw\nWu3k7TsIvialAgEWbk5QlyUx1dSsQ+sDQkkGY/vvAWKdWGV3BjNXMcfSMLFD\nHlkgUyW60YYUEJXLv0CXzWWT9M+OMx7gnW8bw5LkNrSbBnt3ukHDLsJjOXp1\n4IhsP9pz6ZjaJxs4LrqjMj88gcomFnqFfWvi/93jBD4yyBQbwQig6+HHSzE5\nTx6Y\r\n=D5rA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"68762ec2d0da91490b88b0ab8d11a6d97ef7f81c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.40.0","@apollosproject/apollo-server-env-mock":"^2.40.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.40.0_1638842118261_0.7822352122122254","host":"s3://npm-registry-packages"}},"2.40.1-canary.4":{"name":"@apollosproject/data-connector-rock","version":"2.40.1-canary.4","_id":"@apollosproject/data-connector-rock@2.40.1-canary.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"485a763875d0c6b1dbd65fad23a8fad75f5374f0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.40.1-canary.4.tgz","fileCount":158,"integrity":"sha512-UH8FrcqO8Y22HpSbLxqaji9YK9e11uI3I7BAm0CKnVLJDUvBptDkmqKo/wy2vek72qgns1+bwkZo4Y+epZuAEQ==","signatures":[{"sig":"MEUCIQCQV4ziwkUHVZCd2e66Opebo9oP03HzugzwgK0mSPR1PwIgS22XIbR1pzv+2OZkcei8/wXnc19KZDf3NF4moHL9AT0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1082837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsRqjCRA9TVsSAnZWagAAIE4P/3rE6HcOdoY3RMck5Ibi\n4iF/ubz+L61NtGX5Lh4T68tSdar8zdhZl1EaqR1Ca2iUVCyraJXGoomH1yt9\nDfljQcP0+OILPaLaQkuJKck3AakHcAm/hVl+5uQOU9AiRmwRJ3l+MHhvpXRM\nfRGdXCDXgmVlaEssC/xc9DR8kq6X55lCoZ65ocyOCH92GQH8ogR22HaNbvKu\nHMs7shB+RJTvUJCxQom0dHtLS4HgwGO8mJlP3oT9lYCmnW9kMYIsoRsna9+Z\nLPPHkQa47OJsIzw1zeXOy002cmogpepMJmX/sLk8AHYSZCBcCcRSFtpjlEN+\nyO+0MuQNEK/NxRTdrPY9fYhtzY02CO4kLbpw6DoC4A87yw3WnPfkwwAlUgrU\nx1WTSlyAUQPWI/DlgzlS028X+qSAxJk2+6N+PS3rtbZYMjLe/qrJnKw7K8IF\nH7rXLvxYurYcVUDxF0nUz2XOx7w60atUewZM1Uzf5WCatUn54eAjHCyPTkyu\nTMOY6sKmq5kYMkoJrppRL1frMTNng4Ekz7np6U2vlN844z3ARyF4imNoeU2F\nOp1iD913dc8dtdkGoDSOZ79fwyY6SW6HlHS0soIcWZQdhBs08A5owoFCQfqu\n+P/5HTJ54vKHue3xKrGV/f0a4/LJapP0GioRy8Rt3ivJNFAdRz4G8xotHx4o\njwhj\r\n=oz3l\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"82b0306668b972778fe707c178ab5254ff34bcf8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.40.0","@apollosproject/apollo-server-env-mock":"^2.40.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.40.1-canary.4_1638996643466_0.7966707282656091","host":"s3://npm-registry-packages"}},"2.40.1-canary.5":{"name":"@apollosproject/data-connector-rock","version":"2.40.1-canary.5","_id":"@apollosproject/data-connector-rock@2.40.1-canary.5","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c2cbda2aa75ae28ea9d5cf1f1d5545afe344ec80","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.40.1-canary.5.tgz","fileCount":158,"integrity":"sha512-MRFJzGEoxE7KJDY7e7S5Wh3R2rKaS2Nc7ztwZGqJ8dLdgr/RujFrCKdLn6GK0nfaa7eh3uH4r4DddVWTKEAgug==","signatures":[{"sig":"MEUCIQDRLioenLpsiGUXNPTrbpHFRklSv29zTe/MAyxHtJDLKgIgeFPeEdYNSy9gVqiX+KrPzeI4AKGranj2j5YfWAhX4dQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1082615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhs4b3CRA9TVsSAnZWagAAU00QAIfIKQg0ihmdK69H+uRY\n/ukUaow6ejugwpEzXclsfOt0XW7xPWFgvrqgymDaQ7LqBiNhjwZ+oeMaj2pf\n5O8kTBSiTL2NJjPx8PPyxFEmjoQ7QwBGOFBUBYnJ/vgI4WycseAS6XZY/IK9\nUBmCwYA4VBQHiaLjeMWanTlPEmtHayaJwh0PTTsIy+MId0lu2vAp9GBx1+CJ\ns0sP2OVau/nWP9VvrtBG3OuPaVz2eQY2wNAneJ9RxN91RbCQ8Iwb/aTdPeLF\nGf3eDUb4kQNBoIxjddx9scirPy5Y9SOirZ915v5xUOt9VMChc/QsI0Ie1WjY\nF+Wt0ASPYO6NCrlQ6GvJzvuKZwO4XurjOHhQIDFlB//WWCSRjcShFwdOH8JC\naGB6uBnHPNZeJq5Cxf7LHXmRzgnm009St/DzAo767EzYluOn+eM7h8DdJ/fP\ni3HSVhCla2RLphDXFa/2ggtqvGlXPboj7bCe2UqQLuUsNrRqVrHdZh32AN86\nuD3QD3U5oi8LiM5ApU7/roRgOFWhSEMP616d7iKD67lld3/VwqEz7PF76YzS\npq6ZkuZebr9fe4gOq9Y1Qyx89gzGQPDbVTFpEgflxLUDDtij42tMTULUVnNF\n9xK9dehKISc3Hw7zEvTSjJcHQrwj6+XyZ+7ZgStcGKG/ApINtLx/6InWNa+3\nvYbF\r\n=aOiG\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"65cd17b3a80804b0ee1396f2ff1753118f5f359e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.40.0","@apollosproject/apollo-server-env-mock":"^2.40.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.40.1-canary.5_1639155447779_0.2686779688199594","host":"s3://npm-registry-packages"}},"2.41.0":{"name":"@apollosproject/data-connector-rock","version":"2.41.0","_id":"@apollosproject/data-connector-rock@2.41.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a67c241adf1013c36817efdd02227e02b40848c3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.41.0.tgz","fileCount":158,"integrity":"sha512-vRN5E7vN9MIQ6sm3KF4Mpt7xroF+XXmNTY3LDJB7d1cbNLy9qMzJ/EC3RcrpXCr/TQyEMymSHvtb8XVIZfHWwQ==","signatures":[{"sig":"MEQCIDxcrjAVicwbPWRphm24krLI1vIQS1ZMnSI+uZrJ0wg/AiAxBhUigFcntkaX+i7Se4pY9/e5SONWpDxKim4rDJrEaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1082912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhs4g7CRA9TVsSAnZWagAAvwYP/2Plf6kFY3F4+RxEbW+s\nE3FIaEC/JxhWYkACbckNPw7CWk0acFwCUC6odDD4PcevJEiHno/55mrN3ld4\ntoajHxezQnq2gHD2tVHjvfaFSzY0/vLPTJ80TPr6nOut+QEz0fIdq65B4kez\nZ6BGZgjCotl3dZ0H8g9FU1I90Xf6cWFLXBsVCNiFwJYtL+isqYZBJWNYN1Jb\njwSTyA3kJcVajVq8oOrhQpScO1YInnnVHyiynM2rARfUrzkZ2536tAiXiC3h\njCcbz2r/U4YHWsS+t1tBceJCoAK+SpXWyM5RqC2KiBk2HIKVlidb2DaNKqmd\nEFDBaUJvbQjDJ0W1CRjOHf/h4tXSOADO4635a7Dln20e7MVxtEzguMEb7lD3\nNStQR65drU/xOWYTqJbA0r5qnyOPRHEGJlQinjTh91hfQDmgcTVbx9yvLgo4\nQrGmELIdHMAIiKhmbs2nxC2cDLS2Hc4pTIws/yDlKpijJow7Rg2yUALiedmz\njbJukBydq0lseJwUd9w2Z8k9b0W6KBcAsStgAi/lpl4wEhfH2ikUmoHScLpJ\nF2uD7adm3DwNRDykY/UyBHPj+c0hIQFQ9lSyM6ydqoFvwzToSla3RjYVki53\nQQsY6aYd88Jbnr2baFXsuqI3KisUAN+wd+Vcp23y8BAC7RS/VYHvXntqbI4a\nIfQe\r\n=69tk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"9392677975a0aaa8f8af6d391a52ed0198c892af","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.41.0","@apollosproject/apollo-server-env-mock":"^2.41.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.41.0_1639155770905_0.2997162619958085","host":"s3://npm-registry-packages"}},"2.41.1-canary.1":{"name":"@apollosproject/data-connector-rock","version":"2.41.1-canary.1","_id":"@apollosproject/data-connector-rock@2.41.1-canary.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7eaa023bf6a9349fd78f38357bfc4f810859d09b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.41.1-canary.1.tgz","fileCount":158,"integrity":"sha512-bnYUuy9iY6NTsitBSQjWNBZZC4QgxAo61LEian+thfHBi1AGdkMxkSDICpfDjuglqjzKszWHZh4yDxkFN6692A==","signatures":[{"sig":"MEYCIQCt2BrOEiO+ndvzk9e9UnnLn8wJu+KrVHXR4nF1y+A6FgIhAMsyRjCrcvKlo+KrGUTPxfHrsDuxP4cnZ8FfXkH6qTee","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1083740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvNnNCRA9TVsSAnZWagAAhQgP/1MfCV/AW5HMVght4uHe\nXj5puo+wlLOOV+lsTX2ZDItPEgAzMRXUIDIyLN9+Ke3lsQBrqbew4DUEZgfU\nW3Px7tiXRKfHsNnyXrT6f9FLJoGvkmK4sw+mz9Cu0KhZQ/9nTUrtPcloco0a\nXrtgbdX99AHY/iyNzK4IfBENF+7sxz+RBY+6U9PIzc8ZczfhsFcfZ3l4FdK/\nbp21uLJQONvO+bzHMrY1kIbOJfIMmfvjbWti8XKqbDL78OEj7bAt9tEQXFwy\nuUn/pYCwGPxs2WpbvFr6BrSvmNZZyNXZ3QOWd699+Lg9XLWOF6kEIMVYSG4X\nFy3Z4v8U2x/AwacGeixMRz6iPeTiMjThgvtdk7JEkzwqRFFs0kGF7WAAxLXV\nGUiRC0WEdHjSY+AU3Zl5gj5yRke5UbnatSZOVSG6MfxI3T2dd3gGwN536O5W\n/gqFsAlaW5GGRkZjLif3115DUB3tJvo1J3LZ2RMUSk1NYqG1avpZ61vwdyax\ncAnzLh7hVRqTgYmv3s2ydqR2W4C4xldqWCAvdBZaeEXnhjod/WphNbdHRnnb\nK/vW8OzqEVi2Xrw4eqWaZGSq5QYKMXZEagDiKCBfMZgz6RvPQwS6/NRMZHiK\nFfBvuvRMZMeah18NUqwPtKdSbQYCEGwNJ/j4Ithy6eF/YjtGacCJtgXprfwv\ntQpn\r\n=d3yC\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"12b678b45e82e671440c4e546d69fbcdc3ee0f8a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.2","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.41.0","@apollosproject/apollo-server-env-mock":"^2.41.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.41.1-canary.1_1639766477519_0.004567228620025565","host":"s3://npm-registry-packages"}},"2.41.1-canary.2":{"name":"@apollosproject/data-connector-rock","version":"2.41.1-canary.2","_id":"@apollosproject/data-connector-rock@2.41.1-canary.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"709683d0f637bf7530b537769c70d8fca4ac4d87","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.41.1-canary.2.tgz","fileCount":158,"integrity":"sha512-kxgHJD3aSp9yOdpy3+io3tFyrFoDv2RtdTP2P+MCdyxcpO06mAw77nApxQneZ78U6TflwUj679NuIXgtH2nr0w==","signatures":[{"sig":"MEUCIQDLpGdTlm9dpgYpNpw1KsbNE/2oKktG3faIPDwO82OZnQIgU+wsxVDqG0gqks4zIXkRcwsvb/Dhe1Mk+5j2+u2yXgU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1083894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvPb0CRA9TVsSAnZWagAAa7YP/0v3JrrvpDu+bFFsRMgK\nvy8vBDEFguIBGAN9rfYs7ZTbCa9j0bjD2Rckq9hXuoCXLWEPddcCbIgXF7o/\nhk+xnNtfNVEX/G+yNrGZJ+4fT9tP5wWCip9vjSiCJy4Az7MJ6gE25x5mNoAD\nym6ZRX+PvajdAaRgo0LGs6w6C+t0jdPW9DrL6bZbBGxrEEHNwELKcPZDF2gT\nnHrcFFqkVi/H6RTKqO96Huhd93/NmLZq+S183oNxdXbXuxfMZl8cYZqa2p+A\nXpxX5zh/KYU656Hnvn3+KBH8TasAV8TJ/4N38Tz7ug7yp8QbTCX1xhHprwIp\nV/Qau1yRu58m+19NiplfHvBOPUzUucoq6UP+d9CKo0HYwMqR97Yhf2qAR6ou\nTm1voUoCMBwDrqMEOfkvxkVQ4iHNFoQB81xxhp6vPc98kyY0Ti9iB6nE9uUF\ndUm7A4goEYimf+5pR4J6wri9Lku5FaIUAahSo4vdcnDK563kngoiYYIPIcjX\ndP6IikKrvxu7xg30+e5XrArUWQgwt8VD/h2dMCvN3Q+U63xkZ/h+XmxtcQBX\nlXz0/ulDhzpuspP+2OdZI+qE5BLoz5//dhTO70ARUVoyvoy9avju5bYHouPu\nXhyav3YRzTABVJ0nRyU0LHcjWd0n0hH7RGkNJpp5rx2HERwOtAmVCtfgyXCX\nixGD\r\n=+WmJ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"534211f4a2d10f5cacd178cc0601c7800aa4fee6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.2","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.41.0","@apollosproject/apollo-server-env-mock":"^2.41.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.41.1-canary.2_1639773939945_0.33560457468504","host":"s3://npm-registry-packages"}},"2.41.1-canary.3":{"name":"@apollosproject/data-connector-rock","version":"2.41.1-canary.3","_id":"@apollosproject/data-connector-rock@2.41.1-canary.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"382b68e888c7d7bea3d3131ac4f9a70b3180c196","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.41.1-canary.3.tgz","fileCount":158,"integrity":"sha512-KJsxONAzWIUm/sdHQ65lWWZLzWtlzz2XLfHgqk+vYBdVfPCMFsZtEqwenDZ+oIOSeVnB1oQHMlg4Viv+8+ih8w==","signatures":[{"sig":"MEUCIG+uGyhudHPqDPGQ1Gz2oMC5xW9I73Y4yZ8DH2v2YvsHAiEAm7w68Na2xhfn/xgMBCEsfI3ZU+07bv4rP8BClxfUAd0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1085532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwLCLCRA9TVsSAnZWagAAGUwP/1LWegEirSZi+cbz7tmM\nx4oFjaZnYH/WOBFdH2I4C9BM6Y99OY6BnZEGNODh81SQLRmhGEp+kVMA8tym\nsyw2dpxSmDxx8/gvxEVuF3UEVYz1MVgsX47ODI83S4xsQOG7Koz4C8pbdLDo\nuJqFEzELKOyDH8dj/7GpSNmel6uzmiT6yJ+7YD/7jW3yH81DDoRTXVIW4MiH\n+5xeWZIDKEnNUC4KDXVDVG4PpybgVBAsrQ+pSrdV+pDuRYwPFSQBokWpTJar\nU1yBgMdlNu38hMd9m10AVHeYMkp6dqspIU2KD87WZSL47Kn9SFM6am94GKeK\nAC1A1fzmgaI5xaDkzEXDxaNSELLRK2LrgxaPrvMEqga10vkgbV3gN52brX8u\nh2siOgLMC9u2/IEQ96BJwU0LciBMBWZIwO8exEWIePYRoJ5lCX6/4xTGuGJ2\nD3O4V7jVqoFbX+AUwCzAnU27gom6oMoi2457cfbeSzLn/bcpDvTXlbLBcNB4\nBlLRncxbXzwxMyK2eZt6oefR18mucSRcyJUj2hPjXXjFXgXSkPb7qQl1R/I7\nS4DWIyyUPljt9DTnYX/OiApMhd2V4A4uaSoA3QbQI61PcfUDbeeBhcx8oZCT\nBvh7/Pohqd9/jxqwFZpaf2sUI7zftK7d71JNDYMVzp05nDmcbuUpz7ueQgK9\nV/Z7\r\n=qoPD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f225756d4359df00abac5e724708199e9caf7540","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.2","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.41.0","@apollosproject/apollo-server-env-mock":"^2.41.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.41.1-canary.3_1640018058723_0.5955442275301639","host":"s3://npm-registry-packages"}},"2.41.1-canary.5":{"name":"@apollosproject/data-connector-rock","version":"2.41.1-canary.5","_id":"@apollosproject/data-connector-rock@2.41.1-canary.5","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5be73006731c444c844cfe7c2e4ca494314b4878","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.41.1-canary.5.tgz","fileCount":158,"integrity":"sha512-8r+/1n0Gunu1mXzRJTztJYqeCrww32qzzOpEgRQhiwwLsajUHJ5hi++wLRkcXM670Bg8jmZ5bojpDIH0JyHtCQ==","signatures":[{"sig":"MEQCIH8e6ZJqwUCVxpvfGrGBNL2lwklXDH4PO0a5CESfuS9lAiBslAqRYJocCi/CSIZV8Ss+Hm9cXm11t60Nb4ua/TCxPQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1085764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhw3mJCRA9TVsSAnZWagAAIBYP/3jiWlo77mAWAa+isn7j\nmzr18HQH4Ia/s0DC0mDZn8C4shUPE+RVZjbYsrfCnKbscc7TbafC+zlmKujr\n5qmTs4jUAlDs3AmrXC+qwYGHRrPbdsrX50saLAYzGGyydv2gyZ+Vqrk2lLVK\ni5sEud2A/0Jkc/vkDbaVa1Q0BvOWzA8KqCgP+mBd/d9Kh6L6Y0jtwIYBiVab\n3KpyROMqi7MyjwxNB+wMTVg6y1+Wkk05dLw1dFZJi5YbU2X4yc4K50LHgU5Q\nEosiCR1LM7KxuXC9d3DkdUR4z2MpzcdZ/flZpGWvV6lOaEBvvRSKtGgdjhxg\nIhJ0gmZlHtEgHtYkITMxkSAzEyRYEaH2n6DtH6asavbh4JYIPDZ1QS1xrKkU\nsoPmeoL6f6Rn++ekPRgIJrA6Q7yLQHVQkabUz5aZ0ilngFbykzBGQ2q8zArI\nVSms690DXG/r08uP7YXZ1UqcBAB4vBEmaPScMh0pl/QwsParhVj7XF2pe198\n3cxmvAL7RM+yTl5Jyno3Xfglhqv7n18p1TbGdc8kr5Hju8U8vPtSDyQNGHbd\niYd/LaMcPf4cT2ovIacUqtmIbesIlV6eWUkGm9/WuUrh3RoIlmntlvOTVA0K\nYppxEkZ/7MNY9d2Gl4OEzOdJ30sqXqskLWqgGy+xdu9iQQRbWRn/w/RL9ASB\n5IkP\r\n=5vrk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"e090c9261b3cfc4430f8068836b4648812acef91","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.2","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.41.0","@apollosproject/apollo-server-env-mock":"^2.41.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.41.1-canary.5_1640200585321_0.3757017500340625","host":"s3://npm-registry-packages"}},"2.42.0":{"name":"@apollosproject/data-connector-rock","version":"2.42.0","_id":"@apollosproject/data-connector-rock@2.42.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"25bb02888a79b8b9737f2ebfdd1090d3229c58e7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.42.0.tgz","fileCount":158,"integrity":"sha512-zAE+XqNK9SjDFEVTd5EaCTQb2c/Dd3Uv/yo5wI0l/kNYK+E1eLjj4r/A07uokOKAYH9/zovslW0+eqcpG9TLDw==","signatures":[{"sig":"MEYCIQCFdUAZ6yJKyl+X/iJ8bum2+2oXD063eSq26WZbGjnPMQIhAPP4fgVYMRJyyNXUQ2fVipjYJGq5/jI7VTjJeb5xeZL/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1086512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3bE3CRA9TVsSAnZWagAAGVcP/2WmJo7MxQ67FzHR+1kl\nCSAQbtycJD/7AU6dDbKJRa2hEpvje5gqAfguGwK6DkEnIS8XAwEWFPr/LOtb\nkWbwesB54qHuSUb3Cfu0NT1ezohDSAEA3JyW3Km8OQxy1bwscsjGwOqKx7Ml\nZB0Sp24S8sH0P2Y9ruKmwooS2fokJOxwUKmoNNP4VIMG4K2g2J/0Hy7opope\nyNby1gG67Ow8/GqKynjah6z+7cI6DSV4LO95tbIgGnc3KgIA1hIy2KOCy0l2\nHXfrNpjXsV3oEsDlu68Q0SXtAVNANDpXeEUAbveROXkwxFY/FUyjB9jwz1V/\nv4LzbSZsWc503zmXZ6AauZYWTRDCHVpRwBlwnIjobniD9L6tCGErYTHuwTZK\ngkqlk9HvK/au++H1JiR6wWdjDT6Z2PJXbZoocS6Y1/B7S5vM4BpfLRP4S8lT\ngfkxrYeqK0PqVDxnlE/zNv1tXzCiYdHtBKVNgUGg2uX75S56tD2KwR/z5NYL\niYHwkConviVVc1K+s8A/ov9W6auqD68mLV+xha+Io6Ny5B7D5DsRoDdLmOxK\nIoMk2RA1nGmjIzXdcq8tpxRv47PcpU3FiYbFHEXUG1QSAAxAqJnryy7F+gGz\n/lsrmayOK+QxeCHK9tA7pxM6KAfeIASP0CmNDBpCWSqx8FCCVx+eV/JThpj9\nI9Cj\r\n=R00G\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"f5af5e7e8ac4a517ca6be7ca6793a82433cbcbf1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.2","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.42.0","@apollosproject/apollo-server-env-mock":"^2.42.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.42.0_1641918775766_0.050794390173345416","host":"s3://npm-registry-packages"}},"2.42.1-canary.7":{"name":"@apollosproject/data-connector-rock","version":"2.42.1-canary.7","_id":"@apollosproject/data-connector-rock@2.42.1-canary.7","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d0d7e933ec0163222b65d0a966a1dc4dad2d645e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.42.1-canary.7.tgz","fileCount":158,"integrity":"sha512-u7aSSuuYS9dP4Fuh6+We1WTMTgIEDeF/XRf4mFyZEoNtrBM0tpG0PdJVHNj19jDqTcfBdER9LM4Voml486hA5w==","signatures":[{"sig":"MEQCIDa4fl3idxrrNsj9iaj6D6/fRsQpivx4JvKiw7BbUYbPAiBTEFbd5+PPHF0wcT6BY8qp9yoo9DT1CSojQNEAXIj5YQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1086804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5xVDCRA9TVsSAnZWagAAFU4P/i7azUO4s2vEQndVX1QT\nkmA5qa1ifQly7rHjVhSSwAwXEuwdc0Q6gOvKwhTAgJv1I9DARZH3sqvCDBtG\nplLG6+YGIEEWl5Mepp8b5dMwDM9tbucYRAj8xelw7eaBSiMcySOADWRwzS2T\np366y+qeAv4HkWNi+gfhTquV5wyz+/H1xq1890xclA66Grj6tnTbbAv3ikHD\ndMV2qTuyfeN99xif1GUkoRAKE5wW8w+CxZx8DiKNdbpY382zlkDOftzeBEBk\nxeEYXlVTszWf5JByzL2XYdkzEwjNA8BDCBqkkZbADNiAgz9qzWtaxs1NpiNQ\nRw6hRyYwmUl9r8pQpmixlegruZJ82/YNCn09GhtDIF+I70c8GR9BZ1fwZaF3\nZv/sGnbEijqxrJx9td6BUuKeLKqFVamYSPiCl+nFOuGGFaTxH48F5TlW3roB\nQVR6Ubsq5zDKqNzLENGDHEwNhm3xRrTNAV0V85ps3jycIPqkDPxd3eMAkVFj\nCktOxNEGxsA6TllfB8Uh6b7zXx9O32J3k9+QwPa2ITBJnz3GkNPUQICfCmDx\nsrvLILGGgU1PAL8fjaRHC0U2hoYf6uORa0kZvnj4Prbb9dQ01EMmlan1qWpy\n99PnekEcroEAJyW7g9wYtA4PAxI05XrEBg7NPYsu/8lildF86hucKf2oAy6P\nmapG\r\n=iwlz\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"a91e0f7f938f136fa442030be06fe47f863c6776","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.42.0","@apollosproject/apollo-server-env-mock":"^2.42.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.42.1-canary.7_1642534211656_0.9402965181622729","host":"s3://npm-registry-packages"}},"3.0.0-canary.11":{"name":"@apollosproject/data-connector-rock","version":"3.0.0-canary.11","_id":"@apollosproject/data-connector-rock@3.0.0-canary.11","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"306d97f4985fbf3f6257983acc07ca9baaf8cfbf","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-3.0.0-canary.11.tgz","fileCount":92,"integrity":"sha512-TnqVOE7kAYswpXwaYNvS7d1DhPbHtCi+NyfbReVFut/gN1sfdiCG8ZZQsFCeh7aAnfPYRnUm2eADBEkiY2vyYA==","signatures":[{"sig":"MEQCIDiHeOSH1uW4RYrbiaK9owfabXOgiEepRZKYdVIiqA7nAiAmxYb1NwXYM1yoyD4O5/b1438areHer4hiAf+zXON0QQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":462872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6XqYCRA9TVsSAnZWagAA3ywP/jCBZJczw5zCoiurPYTM\nHj4OjKaHDcp0smUcE8tbNUQrN6VrZlXMZIY5Q0sM7Mjywz6pSp/MEF7JIcBs\n3EsG44C6RllU6YFOjYiPEwsp62hxEwv8g9eVc5bjo2w4cFQsCTHBzkgy+GfZ\nbNiX4Agk+ryolfsetL9jFCo3tNLc+mAYH4Ds1AZy3DMYeGKVnBdmEEYgk3fG\ny3t9mr7LLdWLtTDcBsTR4ukUtMqxz5lVHx3GIOzVDzCS1KpcZHC0jByy969e\nTJxfYtLkg18dKcnfLMfoIIX6tTznXVkIui9vya9dZRJb11de7ASO498VIHjC\nNlah5GX6RQ907PDA29/a30AtUBeSlJ9fCX25IcVU1Blnc7uCiRXGmFEb0D8d\ni82WTbQmTreClx+Ol2zi0UGT+cBD0P7TX6EQ7Jyj1cPU1o9vHKdOzMo6bV5C\nn/m5HFAhEz4An+meMhn5QwWK2gfYq6GticQQjkPquNQc5FzMGKJCyROZpfbD\n0NuyMehhYHVQwG2oYdOeI7fOXJVLeS0pLzfGanQLI55pLN3W1zAeO01GVk2X\nvEOKMM6eF7BjRCQf+f7B1/SuBQwTCrbBWq1vH1uhCeqGymS9+svz4bMHdeSA\nGLGGfpqVpvyEBLKLV5+6tsmEYp4S45z28X7t7XHZad/Ku87Vw2ny36VFXnO+\nPQSB\r\n=xd3m\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"7bc386fbcf009b79d48c34fb80e02d17f51cf006","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.2","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","jest-date-mock":"^1.0.8","jest-fetch-mock":"^3.0.3","@apollosproject/babel-preset-apollos":"^2.42.0","@apollosproject/apollo-server-env-mock":"^2.42.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_3.0.0-canary.11_1642691224765_0.23611319803397612","host":"s3://npm-registry-packages"}},"3.0.0-canary.12":{"name":"@apollosproject/data-connector-rock","version":"3.0.0-canary.12","_id":"@apollosproject/data-connector-rock@3.0.0-canary.12","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a8702c713f6211d5a299166953fdd35fd47b8787","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-3.0.0-canary.12.tgz","fileCount":80,"integrity":"sha512-XKwZCMZjESLuAIXOZj5Vzz988sVW5hbTHmCoO9ezWoO6lmHWehOX5pL/dJRgFQcriQ+VCsr0e+Wmt/lFUMzzgg==","signatures":[{"sig":"MEQCIGhQCBzcc3rB+VyRul/b8wc81EtEjBXwi6iw4CR4615QAiBQ+/QL6vIJqNx6P3LcMAZeu8bKg/3ZRChLwJ3BP27CrA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":366183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6tdYCRA9TVsSAnZWagAAeU4QAI5flWXcgDhi84ZnsAKY\nuz1k6O1p2FgRZfM1Ezear8oTRwC5Skw6A6p0qhH/ChKjcD2Mvc7Ukxukylxy\nAE/mM1ZkGM1CEvZA1GNAOW87ijXo2UWFE9eV+mBqpX5VSpP4HTz/oCS1RLnV\n9Ped5TJ/pEoFETrtU+CxDoDNhIt4QfN1jQm3fsRBzKJliKgN/MInTjWXZE8N\nunGnpQ1q0RyFz8Jquz0DDGof2/XXPZPXVW1E70KaAOCyjizKrLmwRom35UkH\n/57Gq1tqUr4qMH/80j2PuwWIEqJSEfvPZR5DYC02skxxBF8RGUTIg8ionrZ3\nXN75sxa8DKaIR9tJA6CFHjywB5Zrh3nbyeiXlhioIq0Ps2XhBuzyyssGxuZe\neZ8ojzzUq1ioU03kYgVb5U3kSgOWC7fjF4eAO9/6nX4SxfmJwStLmuDwlmNV\nyez+sq/kv/Jv8p4HQCuexnFGJWbHVLjEEisMHQ3iU+CjLZCRDjT/I3egSk2/\n0MXZAW3rFjTj9flidEiZZTeEFmeHaq3WErdg6RgmZKaWqFjZoWFdV/4sat3S\nsc0s2IJlG502TBhteiNKBX4M4kvgECGQ3l/A2BRwa2rzMOMkHNP/uCRDXXyl\nrK/Z7Q1MrdP6fttPaqjywLRUdYBLO+BhBMsAdYHuRx1q+zSrpxUoRPi//thS\n/4EZ\r\n=UWSn\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"95092c52b781f45d86041f33efae80a41ad0e210","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.2","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","jest-date-mock":"^1.0.8","jest-fetch-mock":"^3.0.3","@apollosproject/babel-preset-apollos":"^2.42.0","@apollosproject/apollo-server-env-mock":"^2.42.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_3.0.0-canary.12_1642780504322_0.5284924377065077","host":"s3://npm-registry-packages"}},"3.0.0-canary.17":{"name":"@apollosproject/data-connector-rock","version":"3.0.0-canary.17","_id":"@apollosproject/data-connector-rock@3.0.0-canary.17","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"73cb21e74fb02a33be41660b44d96c017f0f3640","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-3.0.0-canary.17.tgz","fileCount":80,"integrity":"sha512-PjEcEMfe0cDkt6PFzvSY7+vPGuPW72hheVZ12ss0MNhB7zkeNb6u4bUNT0EpPVsi/p6Ykm/B0206yZLV6aTykw==","signatures":[{"sig":"MEQCIDCXl/xk3xjtWcsv46iL/HsarLTq6XDTFoE9l6vCptWPAiAzRTg+Xr4/QgC4MLOBrCHRRyalUWpccIWkVHAMfehT1g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":366177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh60wuCRA9TVsSAnZWagAACJMP/2yupftKeEE92ilgpBfH\ncEZscfwyAdQ3ds5XyPMu0M20sdLHpRfC4Y+Bv2c6F3n3MvWRmwb37c7FTc4j\nhSXpVjasT4hpvWxJg78OHjal+4hdn/iDIYKa/ooGPBwWiRuvX6DumkqkLTNF\nmZTXwGaWWn/R49rxdIcmPeI4U2nSDrdPB7vd7dZcd6bjG5F4pxbvcgRl7gja\nDVkYQYg7IzHIemKFAdg+AkZPb3YQN29f1zXUPEBwzJTtILIG5M799A330UiJ\n7/BjvE6Ph+SEpKSacHswDV0AD8VpSj0qINlJFiwzFIJk9C7AJTQIE11aX+Cw\n/hfS1wyd+/ltcAfwIH0r8fzk/heKqF2iwtZSm3HvylCk9b6EXrccv5SHkJnt\nOJ6adHC5XzxLp9q1G/QTB2Zr8QnqkYrUwOOdHI6yWkuSxH3k3cqWralGwnbk\ny4Va2qDg8X3qwAR/fVmHtCiMtzBoB3DkpdX4DJG3c3+QoygvGS4QlreF0EES\nhpqv1uV5Zo07FrnaLkHcNJ0XD8ocwOQDOUTrlAUk9ZG5YO9MDvMUlNK96BcI\nEYJkdVVUZpyyTbBiJgzutwfrzNV4fXfmWRi+GoyW7HY+EwEigXBZE9Qz2vZG\ntpGwoskQhqyKIRR0Zp5Z2zxG4taaTyPo835MXGo0h8W37TOoYCkGnppcPeM2\nLZtD\r\n=MVYl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d20fb32bcac25d17165aef4da77a4006157bae04","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.2","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","jest-date-mock":"^1.0.8","jest-fetch-mock":"^3.0.3","@apollosproject/babel-preset-apollos":"^2.42.0","@apollosproject/apollo-server-env-mock":"^2.42.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_3.0.0-canary.17_1642810414580_0.1975959859338614","host":"s3://npm-registry-packages"}},"2.42.1-canary.9":{"name":"@apollosproject/data-connector-rock","version":"2.42.1-canary.9","_id":"@apollosproject/data-connector-rock@2.42.1-canary.9","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"93dd6e725f9926c762a2d54f34300d1cf404ce7f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.42.1-canary.9.tgz","fileCount":158,"integrity":"sha512-CtVmt7O72gzNrnALPiw6T7W0UDmJo2dC4diVNlzeKtgQ8ozkjL0TWDp4UYqdr6/Kroa8CzOKFV/s3uyzWeyH7Q==","signatures":[{"sig":"MEYCIQCe2oodVFnzf54+DVi0sK/BF3MB8QF3GZcbwDuZ9WCnzQIhALK+0M5JDsVK3Q+rTRBjekEuXpavL1gZUfq4zyOTDilv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1086643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7rowCRA9TVsSAnZWagAAM6QQAKRv53F716VTeCS91fMP\n9U10GT4GjvATieHmk/oopgrWtyKK3siGpTOk6ump0oBUEbaan2Pz2wYpqxPQ\ndx7yeyrg2ZzItbnTt02E8aYxF3bCEaVylUqxfXn3L2hovz+GvjiCQFi3jYov\nZGCQ+lExiktdkcFXGfHYQC3uiWjD70R8+ly9z8v3E36Pge1pURqWZYCzxI1R\nbSiclifL+AJgiZrhCysL17mtIoUebIX5jsdh70OYVKIPh+PUy40vgcGFw6Rb\nQ+awGeNLJ2RBlwhltQDw7KJkiExyRCxHO+sqZG99hdzaY9aXIJVcoNdi21G3\nK3pwaWbfvOBsem5oDT4apYPlkRZA6v/uJfqkD4OxXugH7fozd/sPkETF0En+\nKlHinnhcVuJUH3rNcfzSEi5952jsPyHhTn9c1Eee88A+HYM6Slm+vkhsYHaS\nccTU+MTQuNIwpeAkINdN89JOzW7Cb211dSgyHFIG4wo71Iqcydc3o5oYwmLS\n5OdWH7UZE5AMj9pzCrrm+63/PUx/tNiULbjsdhg/OWPEto55o6dg48np/SbW\nOeVRwXdG0+5CyrpMvEobd52rM5wxvyBv07MUSLziUjhmqVbOjcu5/Z906GkV\nVaF4JM12rNjTFYbFxg/bZLc0CZ9WWvgL9gOQFbVLm+PNXn3/ruorAqoOYAUS\nCvTv\r\n=AhX0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"76f05b65e7794fc9a63069b70573e4b202980580","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.42.0","@apollosproject/apollo-server-env-mock":"^2.42.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.42.1-canary.9_1643035184483_0.6148049394107089","host":"s3://npm-registry-packages"}},"2.42.1-canary.18":{"name":"@apollosproject/data-connector-rock","version":"2.42.1-canary.18","_id":"@apollosproject/data-connector-rock@2.42.1-canary.18","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"acfd66540a3ef9fdf89a6e0dfd2e50f2a8fbce0c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.42.1-canary.18.tgz","fileCount":158,"integrity":"sha512-s+2RywZmOmRKYaZau+nQp+is/3vWKJkdHYIufmAjdZB+bfTBdUiAaJ8Q2EOiTVNnVLRLzqc5bh1ffLw439UREw==","signatures":[{"sig":"MEUCIGCNxECJ0f3il/GkWco10z3+n+JETrAiGenf5CjCD0/AAiEAlq1opWn5bnRW6Fm80ntdM/E5kpMGP78+kAqNd1/5MVU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1088541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8vcICRA9TVsSAnZWagAA+OMP/Rc9/JLU4J9/HuuKNcZH\nyGIlfgX8EbGMSdIeUEX3RX7b8y642sF+KaAaTLlC3LwK7sfPbXYJua3tChbs\ne/o5WZPfoqkw4jOIz37FspWgyMWZ6azwkDC1uuIX7j9ja1k8Yi90impr8gWe\no9AqNqmjnbfhM1qZ+iXdJTLsNfVeNqR2NuipVTF+WATevR5ZY/i8yrDjpC+F\nqiNC7BzUtmVHUc5NvF84EmIpOhzTP5A4VQeNN6hiasi4Gqpe5+T40/i6Oxq3\nEtEHV4+B6sCgvaggFO+m1XOsusmD+8MeNKI+NKVTasRUuW/B1tDWfs+2BrJw\nh/ihsR9Agd9h3pu7XzqM6WZkScYC1YzuiRznkk5pmncty0wZEojFrMhBUBw+\nbeBQO/aWRAgBy2FOQ5o73yLW+RdSmiXA5JtbhqGidE0fyhQSsU3d/hHy2yG6\nDwMYEtT3PJlBCw6kUGenq8wvgCoMgltc+pMotrdNhFajlBLFpk7VODqR7Szk\nuGsrdPT4kQsInlO5E8h+3sJJ8YldtT1seTxTrSgXEGz4XljnO4NBxfQkHV6Y\nDYSHzbpsaYvntkgR5q1k+Xhra/6eAj1UCS73KIm5/kW5oZLR/Vcyl4+7EoAc\niTIQqEwAoOCViNk+G4tGVKh06VQh0yFhBRwKD9DwwkCFDHXJN4b76NM7Zg25\nVKfM\r\n=Nf2f\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f95a5f50625035d85e5b1dae3415a62724e9b894","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.42.0","@apollosproject/apollo-server-env-mock":"^2.42.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.42.1-canary.18_1643312904101_0.46654737065215235","host":"s3://npm-registry-packages"}},"2.43.0":{"name":"@apollosproject/data-connector-rock","version":"2.43.0","_id":"@apollosproject/data-connector-rock@2.43.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"710c018f98e4c3e4a812ff7c2734a281845f7bf0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.43.0.tgz","fileCount":158,"integrity":"sha512-hm2jnh3VXWwYov3HFCi7VYOQxyJbcOgY6dV3U89+Z1vf5QVUv+7ZrTpWEpNNoXq2OtrPbykq7OO0utwxTxtfIg==","signatures":[{"sig":"MEYCIQCBMKwMLQ0aSEFzdVicJiDpOJ1eqIL5sLP73iEIpMa6pQIhAKzguXmUjIu2Ov7HLF/C912LqmApUL9uD3ZthuUz3Ow6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1089100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8yV6CRA9TVsSAnZWagAAfPoQAIq3Z1c7BSfkkc40qMA9\nCabqLzIPq2Osfnm+cX4pNBsLpB0ulJkf6jzqgSVS8m/CDKChLZAOWANO5iIz\nXIiQBNl1NeWMy2J/qTPSd+GjSxPvvgalMtWBcb2xNSMpPXPG4jsUz4wfmshT\nCeQ17g18HDZukafrPLI27TP0wlip1Np31/XHqrL81Z8cnwXLD+HdMQo1Wq++\nQh4enqMKjCcE3rJAuEv01N161Ov6rSTydQalfHt6p8X0sAW4K5iTBJtrz01m\nKqCqCIBkvLE/T8wA+7cYlUYKa19li6yISOzErqPBoYijCQ9y8a1YCOEZY5ku\nvZthDTWTrukQYH0o6+Kz3XcPpaSrwC9knJUDJKs7v04WDj8Umo9yny7IS2w9\nH54tTf+Ilg8fF4tqwDPYK0+yyXH/s+Auet9224xokSKnViRGWEaqPQ5j3Swp\nSszbyi5d/94xwG4TUh/QcEdWA/XyKksDuf7J8nq2yiT/ACNEvjSVbq25yeHV\nSqxhR2vSYQoApF20pLYCQakVwUC3d9gV1D8wAGhFSY6zarRcAzgiAr6VPxne\nyGYDIsIIhxuSeCowKZ+FL+YYS3yQivWqFKaopTYjZ7gjRbolSLKzJt68ZyNg\nPZhQH4tbPwyFL0GnezPjUBs3Xfmo/Olz2XU4jJp46vOUbPpgHcJw50yN0Fr+\nMxfr\r\n=5TjU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"d6765b891d1813cae128ae764c7bfde6aee3c7c5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.43.0","@apollosproject/apollo-server-env-mock":"^2.43.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.43.0_1643324794765_0.963317739188315","host":"s3://npm-registry-packages"}},"2.43.1":{"name":"@apollosproject/data-connector-rock","version":"2.43.1","_id":"@apollosproject/data-connector-rock@2.43.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3f1c98c97b1f3200805a1bfc5dd7b8c96b86acf9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.43.1.tgz","fileCount":158,"integrity":"sha512-z6+CKXw1OYiftH04tkwYhh2L1FuRU+v8d5ac+tLvYurMrdVPnwCJL5w/NhELQ7pSVhsNSoywkWwR+BJq3raL1g==","signatures":[{"sig":"MEUCIQDU35YQJFF/L4FzR+6u2ReAethc0Dvu2kASXbwfJofM5AIgJ/MvNGoOl5u1shKIa6SPqW7eZ9jY6PoGPJyxQrtyU0A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1089282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+beZCRA9TVsSAnZWagAAQlcP/2sLEPQDge0sF3N8sP7n\ngL507n4dN4JVaxb1NIAj1mGKu0MBCRtkVzPLZJj/4AUV42sKICTcxNU8tgSx\nRvzvEXt0W2q182WDQ6RvJsK/0ay6cNdjqNxSLuoOd5d6BBg8glYPxpUzbU2j\nGkmOw++M+36e1ZMhK9z824rPzW8IA7SCx7W4VfmuXWaiJntC0oEeJj9uPVe0\nUYBsPpqK5im3voRIaX+uR70k9KzjnZCxIDQKRe4Trhx662/WQYt9h4B6T09P\n4wFqXG5zBZLSsJfvG4lkd+C57RPyedW12SO+3SRyLw/BPFct91k8yR4glxwP\nBIJwjgVOSyHBP5SWkfHmh8ztKBwpLSG4oPAbCalyxJMKwvo8ZY4IFSF+sha/\nRIBByNqI1U//nibY83JVg151d2LzYiuqdXxoYlrgnxGJzz86NwyhyNv6jBG5\nQiY5od+9No3MWqIUZVNWIsx6n/VVUDxQfgqUYTVj2fvnMLb23QUtDKABAVHe\nSOmJ4ta8KBDS6RwL0vSb0co1wj1GXoCzr2vD9odgJpF3+m1JBv7J37RbRIru\nVwZId8rGlKBQGLfmTJlWcWL35sNv5znXQUnik6V3x/WWy8vGrNpJVBXOK+zz\nMnL+MydwxDoeX2P+NvTC4QeR+h5lm3T5CiTRlAB4yhAJvXoMkx9FTxQueFg5\ndyfu\r\n=5dfn\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","engines":{"node":">=14"},"gitHead":"7cbe3d1415d201010e932e19519fb20ee661308d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.43.1","@apollosproject/apollo-server-env-mock":"^2.43.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.43.1_1643755417650_0.25487609751920925","host":"s3://npm-registry-packages"}},"3.0.0-canary.36":{"name":"@apollosproject/data-connector-rock","version":"3.0.0-canary.36","_id":"@apollosproject/data-connector-rock@3.0.0-canary.36","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a5a7d05c2de188875b2dd9bbd95ec59de8666371","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-3.0.0-canary.36.tgz","fileCount":80,"integrity":"sha512-ECWe3bQlkmgvqIFl7p1kpPbl/SRFUt/ckxc0jGA9Ct7efEU9zwNY6c1246f3AUo3vDVH9ZuhP+5sKlyUA1COYQ==","signatures":[{"sig":"MEQCIHL0qDRW86wQi/IWQZZQxqoR15whv7sFaEJ/V6D8IO6BAiBk4Hbn198OAly7pUpFkwc1pQdRp+I85pF/MJ2BXrIi6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":366973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+qA/CRA9TVsSAnZWagAAKqYP/Ry+mipB0T4sIyLFEqI2\nZE1VFweCvT449pUEcjTB8G5vtm8c554PuLgnb3Z1fqeStPny+0nwOpltRVFc\nPt+CBeCE+7ei5rvVAVR9NjRyvaQM5w4x5sDKHUBaXKIxldyuqGXltABXQrFO\nHqLCyOBuntqpSGIh5WfRtE+s0IOKd0DlmNYO//bA0TmX33FlVrk8tDeHmI65\nt90YAFAzIAUAgV6i13PKX5RkwTn3lAHrXQZn1CziowDRWnxZG3ejtcBOrXvL\nOuJCjRFbpky7dSrv5IJtrs1x7tNU+u3gIYoCmtFStGO3KIHU2/EQQdxt6RIP\nj3YPf5Uf6ncwr9oAB/GEj/3B2obvnrLqrly/KnvtOhtgJWTB7jSTY3iJ3858\nL/pMrvmCY12HVXx01Rd8R0Be5gBJBat+MTNLtp2+q8d/uAYmwKWaYv9HRJwJ\nWhKvB+sq2vVk3vSaHdBSer1xUs34UOrSXqIVSbwfRspal07u8xYByuehUnJT\n60qoRqHOkcVoJxNUE32gdxaJGnxFtaH1nK+sG4J2Kak+wwCTbk9v4HIbTNe3\nYzpaDUcSEjsNKxIpqUn2PdRSkKQUiQQAMH/PTHu0EP86/m659hAN5sgXlSLS\neifD3vGO6Y/OVyLtLAt7a484q8djhgAhawEmwGSHq/zoEaAzsfpZUWURxAt+\nUQl4\r\n=R3zq\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"1db55d6b0134bef10b649811d5ad9950d02ccfc3","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.2","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","jest-date-mock":"^1.0.8","jest-fetch-mock":"^3.0.3","@apollosproject/babel-preset-apollos":"^3.0.0-canary.36+1db55d6b","@apollosproject/apollo-server-env-mock":"^3.0.0-canary.36+1db55d6b"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_3.0.0-canary.36_1643814975653_0.35795528793562714","host":"s3://npm-registry-packages"}},"2.43.2-canary.6":{"name":"@apollosproject/data-connector-rock","version":"2.43.2-canary.6","_id":"@apollosproject/data-connector-rock@2.43.2-canary.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d533cf3b4b7aafca4f2fb9836b0606a890f29ac8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.43.2-canary.6.tgz","fileCount":158,"integrity":"sha512-jnJUwE0gbsnRRgRKJ2JrMTW8QN/B1yt+bC+Gd+1PtAtAHqq2BznM9jDex4ZDV7bUidYhZ82xYHtQ4L7A2HT++Q==","signatures":[{"sig":"MEYCIQDo+MMkxE6zYiSyOQopF7gH6iAzBUSrGU4+nS31QZccmgIhAKCCK+UcOMOTXhMoeBHOScJkWRCGdA05IUWf6zWKCRWe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1089942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/ByICRA9TVsSAnZWagAAcHcP/34xwiYabBhVF9SgF8oP\nai7ksTLWmUaqXJOElPkb0Dn1vwnbf6WFcw3Fjs2qhFWhII+5xKtLBim/fUGO\njCMWXg9PY1sIChIXYrSXqZGABevXDU7sRIlvxZI1CdGVwM3V7beIimZWIso9\nX7IX4+PZPNaBrI1TsNYW1qJGbYSR2HaKfNziU+sG4ujlYe6CoWFA7l1bHlMI\nltWGZ8pCy0cTW3kb2ftEDYHm+Nm9UsQMQCmYk4Wnx8mOlaRnKeJD/8X2Oafa\nxRsQ0EPYhnBtm8HbywDM3Rrc3cUB5ZPgAPBb4YufkWEZALe8NHKg8UWC07+e\nUzexh+gbC/4+D1/46p6l167dSj0V6j4MWc5xZjDJC4rmTGnB0i/pXJwlNBi5\njzoRrPsbeGSW7lJ75ThvNai/2LxG8m1t/C8bKuJjG9CmgKlClcHv5sKLC/0g\niljeyx9kLsJoq7MqJnqy0LWsgOJtLkdsl3usXBUk1hGpEG8/WBh1n9DKnT4/\n6pDIrbF+2rYFL7z/wKfGBgs8xu27uvqwFh7dA8iQUURtFVBpB27AtbPVqLX0\nsGtLxEltLm0dZpNTBMw473XjD2JyldzXs2yUgWD1wTjTi8BAmz1H2oGGx35+\nsfCLECobnRsFojxLCwbNLfeydCJIajadCwgW4bMEEBtckjVZE/5Y443uKy49\nEBwa\r\n=yTd6\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"04ada63ea9db1b3bfb7e8f91474c380f6c8861de","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.43.1","@apollosproject/apollo-server-env-mock":"^2.43.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.43.2-canary.6_1643912328380_0.6609803980370115","host":"s3://npm-registry-packages"}},"2.43.2-canary.13":{"name":"@apollosproject/data-connector-rock","version":"2.43.2-canary.13","_id":"@apollosproject/data-connector-rock@2.43.2-canary.13","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9d94e164eb2ce86d5b3b2a03f3accde18c30bd9e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.43.2-canary.13.tgz","fileCount":158,"integrity":"sha512-G5m0H3bmcaiC5TQisuhEIbYEDq1hvGfT+uoBiwNIy5GZhneJUtFuAaxkD4amLos1aRWnWuYUoxLkZlYRFMFxvA==","signatures":[{"sig":"MEQCIDcvFJPyMUHjX7ta/R44th9sXrO0ENG7gO7E3Odi9T1JAiA8ecL/WnhT7Ycq7XesDXuQKOcy7wrs8TltV5uaIzG1bg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1090814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAtHTCRA9TVsSAnZWagAAn1oP/RlbBebz8ntGOkdpvrY9\nAjSEFpGRhk/ild+6dTPYBxMcNNScXcbvAKSyxYtOi2ttChc4C+N4tbFRwbxZ\n951xFsp7Zzes8FvsAw6CJcFp6dNjktlbSC4PwH2H0as3LY3OF7lamKC11YUA\nMnYJCtL99kkQqP6D26RuBNITHBVvmBoMg+frw4PJZK5Hd0d+J7Wa+lBixIjk\nZyHTPG1NqsomdzVT1mFo+8YagYpbWB97xP0Aykx4KZWKyX9uIz6ZtIeJ0NOo\nwOk7wOdaWtWWDUjDnncIzWzuICEAxHfc42GqeUisT5Bq1gtSzUmDbMyDk1uF\nMeuhQ5CWU54WEofSrsct7VR0MpvpXcD0pRb+rcRsQy8CMTKDmygLzmjctMX8\nFqWLy7voc2M9//ZGirLV2HewwCQeI4pH21oSxmuvgVPo/0ZP6n6W+jE6ROEh\nFf02RZD0ElMI0Xx/uMyDzxxwCLm5PVdWSKIWC1rmrOvWt2rBcP/mx0vYEbhb\nLDyCF/JZGQip5WtdXl5uWeFUwNixsm8RSrBERAb8uMcsdbs6wRN85MEuIgTQ\nmy7i8LmZ4fUHGzh0HEL9V0rLKSN7Egc9hxsCxlaUvTIJIR/rY0Hmf7bLCx/x\nNGntBpj1u5YVwV0EmWaYGKXqNZKpxT81ytRjWgRRah4zIFPL3e2OJy7VYUir\ngpoR\r\n=ckQs\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f4ed02e5f2f62fb6101c5bcfe5a0480ea08433c2","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.18.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.18.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.43.1","@apollosproject/apollo-server-env-mock":"^2.43.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.43.2-canary.13_1644351955017_0.48818161094260004","host":"s3://npm-registry-packages"}},"2.43.2-canary.16":{"name":"@apollosproject/data-connector-rock","version":"2.43.2-canary.16","_id":"@apollosproject/data-connector-rock@2.43.2-canary.16","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d49f74c72f143470667917d6d61dd54d145c6e1a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.43.2-canary.16.tgz","fileCount":158,"integrity":"sha512-t3VJ4D799Ce4N6saI/TRT/AqfpJFWae9GHhMA3NGriDPCTCPtehziWkRkRtgFiLCgnYrj8UAbKlO83V9IutjLg==","signatures":[{"sig":"MEUCIQDb3pE5pGDgR5RFsmtuYfvec2AvsdyKlz8putA+/SuP/gIgG6HGSkbdu0BenvlGLYhjOkbVJE//k4XIgYDySgmbD0Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1091063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDQkCCRA9TVsSAnZWagAAFRoP/RUFbE+WMdmPxVGU+dts\n71JI3hOciVeVxcfeiOh82nRGcZOqhLuukKdrqh1+l0d0ld5TTo/wzxIHWsMI\n0a1jtVu+kUcfmYc82x0ex5opy55aBackAsZt7q5YV93A5yCAUtufv0VaEXrj\nQtIsJRkmMMueudxn/u7XKGVt/7QUxuV/+8F/soRjbazNodnXOkl6HcSt5kei\n+2jdgVK3+xuauQRd1mthEr2qGqkLCAv1Urq3Z5xPuCVKx2EYnIJ63uYhAeAS\nrm73oJlAz6JeMA+py5pcEPFdhtU3adJs8MvfaVG16ya3TBfBJulWvjfnszze\njEd+iVS32oSIOCABN2VnkAkHCXXDVdRS/GbTHV+ms7PEFFwEGTtil17ynhLC\nZCPzFDodetr8Fu59DUDBuQ6JRctXlGajkxDULqb0+Yasp40ybPE0cBDxi52u\n9fqADl7fjKjjiqpD+WN6JMW4JA4VLERlvGjmhjY/qovjCq/aw1l51Tg1Tq95\nn5h7Z7IPu5OGhrez7MqVQlRZvGCkCQ7+1smWswbtZ3d9fkwrWA4rxeVxXHsg\n90wTzW5lYF9dyJebZY3ropGnoNrwtuAjUUMTL5dcCKOnq0LZgZHKZz0yBdEt\nMd/Y+moANqUX+BCuau1C1j14WX4aXztSjjRWWR4ZFH7KiatppsTzewvdrXIF\nOkca\r\n=ysxU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"9b1f90dec3616b81d4e50e8d88eaef1caefcbb89","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.43.1","@apollosproject/apollo-server-env-mock":"^2.43.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.43.2-canary.16_1645021442184_0.8670767258811101","host":"s3://npm-registry-packages"}},"2.44.0":{"name":"@apollosproject/data-connector-rock","version":"2.44.0","_id":"@apollosproject/data-connector-rock@2.44.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ab89dc1f3785c0ff7a3ee5110de307e61c353eeb","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.44.0.tgz","fileCount":158,"integrity":"sha512-HbVf0ZifZ1HkbuG7FPPMYZJTe6YQyq7vQlO6qQoccYaEiSMpMKujqP6DskMnpw6brup8HYIEpv8WG0rJWyW/qg==","signatures":[{"sig":"MEYCIQDDttJm422TefS725XwqrjQVGFTT5uIsG5Qrbb1haA5tgIhANCdQ8BHwCW/EtmiE3brtn/4pC85+x5OXEa8aiF2Ho30","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1091822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIPxkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+OhAAgrtN/hrSVOmLbu/Q45/ikVVcTwSq/+tuFWvynxcz9hYu8JNc\r\n3xNQyOmkcJXzlwwnbrLfbu3V5+bh+JGJJQ+FIifnzbGrsb2niIep5PwfwMCr\r\nuVW3yGNA87UX80f79XenWxKmCpnmySi/WD50DVXueEDWGmoRebATPzGHuBtJ\r\nTz+YK0GdPaCorGsc+sw9hxo42Qprz8z/H2XTX9K/QWaKyj4vTIolt0RyIqgJ\r\n3B8c2bxrROwgErNf3ve9gJc4sLV11+XC3Ku6YdmhvjwjXYgpWeHVI5lEUUwn\r\nmJAJMHQB1weKf+xCiqI8rezSrGYUDEere7UrXK2bJdY6R2D5wbOePA2KeT3j\r\nBnrrlToxnQ3E/sxe1fwPAlORLMk2NGQ4NSl/g8t/ZE/nnQC/cmaiocWaObNo\r\nCyTUnKE9xvl1KOP+7N2VuFXrDb5hS/Nle/pbW2cg8UG07TvV0/8g+YIGJrr8\r\nnwioBJMpuf5zoUKVAriJPErkloVRtoToRGi8wrCVedjTdOWIFAJQoJQY1ok/\r\no1lQdamrdOWkHvPxL/AApxLm5O6IReOa57+6v0Vln0Vkynq2PeQlTFTdg75B\r\n4rQl7eAAV7AtnOMzMTGGokWs7Elu37Xru776ocPaS2J29UfimLeBaoc3E/13\r\nHdWt8iEuRgNS5dmFjAznqdMjkYwqxgeI74M=\r\n=TUEG\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"88311514d4c0b398c02a1ef97ba71cc7007b1ade","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.44.0","@apollosproject/apollo-server-env-mock":"^2.44.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.44.0_1646328932029_0.20704322202965275","host":"s3://npm-registry-packages"}},"2.44.1":{"name":"@apollosproject/data-connector-rock","version":"2.44.1","_id":"@apollosproject/data-connector-rock@2.44.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a168e7419ddf173e4c7739fcab9c0ae91ccd63a5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.44.1.tgz","fileCount":158,"integrity":"sha512-gNLJa3kp3aVBHgHsKsQ88IBB8YTttd4op/kHXZV2RwHicoWQV1NTXCxKAaeDrX490+hgEBR0B6PhwrVYr2WcVg==","signatures":[{"sig":"MEUCIBZsR+ixeOxjK4t577Dra4/d3RbFNe6cdsqHeNKHv7+jAiEAwRTQRvAZAX4MPiWGbviQ2772LVwTnvGzG0v5YRrm9yI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1092004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiITtEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJhQ/+Np1kz0zmxQZufywqtL92y9JYpi/aRQsCCABxsIyHRB7L3eCT\r\nab+WSfNg6PpyPOqPnAljY93076Flji+DCjJDF5DEjM1NhY9WjkMwzRY6luk8\r\nZ/JFKRYXo/bR2/GBJ8CAJd8Epi9d4NN/Q/gAvq0SRzKAEZDWMGQZ+IbGBE1D\r\nucxaf/wvr2zcZnhJ/mzOr+rmPyv000UmKoiAC2ptn/F+bKiLqUZrLZYpkIF0\r\n6hMUvc1nWm6kqJ6KWMApVAQFVPMbEcZ+2D5i3R0jg2Wl7I8gZhCc5twahxG3\r\ntrXWA7c+hgeHkH2bnYA4Mw/Z1YbqNa5ncabxh6JCfkbrVuc4IRYcx3GJLRhD\r\nyqhGRWSkspU+vLVY3kU8txpZxIdrvWwUPxWCWDMHNALYZ0vBIuou6Iumn7Xs\r\nnFUk6Rot/N9HL4tbnd95PXATc4ka6u/1BazqB6xWpXJwnR8t6rxlLzI6dBlu\r\n6oNk2IOEK49Z8k//7C4G1Tg9i0Hbesv04TbefhdlF+6EfQq2Mvoqn8lOZ1nl\r\n9KwLpp/41pW6cKJdto2sUuvgBfxmn3+4z7xuArfTvKsNTImHqI9WvLnsWmT+\r\n1XCOK8DPSP5njovmt5KIM8iCUtnKACH+BSmiHoKmNxlElzlImHdGzRLrOnkR\r\naJCUCpKCXiXX0a5/yDaOKr8oq1QUQy7FPa8=\r\n=buqW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"76ea66f2bd57d573af16e7464300c61be616ced9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.44.1","@apollosproject/apollo-server-env-mock":"^2.44.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.44.1_1646345028716_0.6934741645471396","host":"s3://npm-registry-packages"}},"2.44.2":{"name":"@apollosproject/data-connector-rock","version":"2.44.2","_id":"@apollosproject/data-connector-rock@2.44.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a1b246f3a628702fda0b8b124481d2667d780c5d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.44.2.tgz","fileCount":158,"integrity":"sha512-C3pd9jKbg6AIRTSTw+bezDfuDhpHXfG68QHUCDwgNePEcpYhGceOTg3pVrAujNehrmY+CwUzx53vi2K4TAcGzA==","signatures":[{"sig":"MEUCIFO+3mjdJYc2S5sVJgEf8Iyi/+iZWBRcdjjVNNkKz6DfAiEA5NkxgiEN4JeFJso6XDitZhMykJh5bgJVYMvq9vBD2jo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1092186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIkJaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonJA//cA3TEyvu55yQQHTAPR69RaQ6EEz/PJNS+PURFripEzOf3Byy\r\nw8wwEbAUv6kKr7U8b7VFLq8PLm1GV1EUw56fynZ0li6Opgb/CxQvqxAyzZwO\r\nNeErrom8mGADovJZH8aZhFqkTSp7R63u/X3yEUspd7WarNJTDLRP2vruAW7K\r\nbedCedGLtuZwEQVhGhX6RLFXA4sgpwIq454aXtfLLHqrkE3JXqz0AIPx5Q7W\r\nKkYYeVL3hV22zo6i0OcTIBpw8MvoEf7cqgLNpjpm1pVxowNHJ6ZQKOfTq2xk\r\nRX1oltY0IqVN6YBGglvgqyV+QLRBIC+BLmLqRjQb+m8Sw5xJkEJaU1KEZFNp\r\ncQqRbgMwICn5Yd6LkXKS8WGmYOnX2g5DPyy4W1w9WKUBrSy4LYm6XoVNj93L\r\nSm7ubZOmzMM2yF6RrnwNZl+Ex14JjPhbVTWG1N15X4HsY1/UNFIo82sfz9FC\r\nFiCBYDnwkWv/flfqV1x6C9/ykqaKzz8MJ7uNhO8e8XFXHXE4e5QkR5HaV5VX\r\ncSMqZ1ESP6MMM7BLUlo0Eq5fgYinwtDoVP7Y4aKhmuthRUu2Ja2sPBIk8S21\r\ndSnlFK85l0NqMM9jc12FwUWWFFm/vlq6ZsESAcx+mPhgOeWdALNffuULXxnR\r\nS+HN99eT6smsAeo3X/TkH2X/1MBzLP1FElA=\r\n=erWv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c0579c69f7889a4455351f8509b1b4cc674123eb","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.44.2","@apollosproject/apollo-server-env-mock":"^2.44.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.44.2_1646412377940_0.17805188557458296","host":"s3://npm-registry-packages"}},"2.44.3":{"name":"@apollosproject/data-connector-rock","version":"2.44.3","_id":"@apollosproject/data-connector-rock@2.44.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6e9f217327d967006c2281b8b519c2a70a203be3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.44.3.tgz","fileCount":158,"integrity":"sha512-7yC5g7ZGc/2UINGEizm6Z38RZ2545BJcCQe7eB2GXdWZmcxCTzfzj1rW6XBIcaxqM+hSyCUlBDfNyYamxnl3cQ==","signatures":[{"sig":"MEQCIFzLhLds6zk7juKQ9Yk6Uq/ywgUZxvp/sh0t8Q7Q83V8AiBk04t2u/oysYQXRBsDH0d54LXHGGdas7G5NPm2UOaH7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1092368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiL1LKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpXcg//ZkKaSqdur/tg0VDG4x5GDIYxWHaFizK3Zi2m0cHS6Zd//O0u\r\nPno1E69MCk+JfwUyfadx5KE1oqrF7GAEeKOyx/6KHoXCRywsp71ewyW4XY4f\r\nOgCSHubZye1OpDblKi9En2OMKDZ+jOqd+YtHBIIhzeZVh7Of30ECwBcEXqvo\r\nF8aR+ZwIktVSfuhD2bYjX8Mk6gS2k35FFNDKXvnao9x0RQjI1+VrGbGhhz5u\r\n6Lb77dntLV/lIhWuwQJWUf/7c8asAFlOXWoZ8JPoogKibYDX8gzWao5TvELH\r\nHkJeEGS2HzMPaPF+ymN5BNs04VxuzN1DlFZ8Teb+LozXpOceh0eyU7ZCzftN\r\nmUySXG9ymjm6yw8DSpi3JaISAYpuWYeDaabwfLKvMWK2KEoNdj+WJSvmCzWG\r\nkuqY2t+V+EsSzvOHaRWSdUOae6bTCbwYiuNYgImHIhrANbxiV/WFIU9F9/4Y\r\nqY3LqgZyk2KTCMEfBM+cSFWdzKRaXyLJfpK/G9/1cEbqNocj0wru6DLEjxWG\r\nbZVxAFZ9Rg7tJoOpuHz/1SqhpkwJz1Pnf3vc8iFuhUv8ZaS9EEUB0Jgv0xV2\r\nqkbVYX/iN9bYmZvJ/35bKMSDBkAMUm9t+XwJWOCsN/R+N9Dmsxi+ErfXFdP9\r\nqA+acikHt7YcPYu9Xyfyv4oyDgDiyULehGo=\r\n=ztQu\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"415a1f61343795d129f7cdec8d48cf5221a6a2c6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.44.3","@apollosproject/apollo-server-env-mock":"^2.44.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.44.3_1647268554033_0.8872121905962189","host":"s3://npm-registry-packages"}},"2.44.4":{"name":"@apollosproject/data-connector-rock","version":"2.44.4","_id":"@apollosproject/data-connector-rock@2.44.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"deeefd4b846dab6c5b9ba6efc04758a4fa5ddd24","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.44.4.tgz","fileCount":158,"integrity":"sha512-Wtm/o1LYl+dWvv+ovqFgkZZUfe1R1wNDM7eMKWoIQRFN8jv8wDzWXlMZPys3kuSFZ5WA6GRZe64dNksW/XUNNA==","signatures":[{"sig":"MEQCIC/qGQJ//s/riIvBWQwuignCYnXxWBes8/ZEk0K03RneAiAfN5Lgin2qP9KfxnrqivU+MH/vMf9PLRMcwPFWQtiX8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1092550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMRzzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNSw/+IC+JMdXTCaVuUlGzA8NkBfmDpuoohUXp8nbiunFeZALv5hib\r\nWxIN4uVjBcGKNStybMsbu+E2qFlSEk5IUU2eaQjbnxMC2WdMIT+7/iY+3s/p\r\n0LAQrABTNAVpOhCES4evHh4PaR6FWgqzD6XgUwot2NxbKb85rChbjaz2wxvF\r\nVIUCjzUCcht5y1C6OEO3lgx6xzUgYsjP9eD9Daf1TzurKPXiuf4UKZ9Wawme\r\np42Cw52LkEY9Qqf3KCCzYO+FDbvN0BtENV4/MXjgC0/7NSbFcRBMbIQ1CnKF\r\nJXpIflxU7Rktcn6C9qnjhJagsxDf9LN11fXPzLKUi6W+aSqXtU1YGRLKNmcM\r\nbT+70lKfOVTId3Z68prMVt4tyUGahHHnA/Kgt64QTW6rnakdKfyFPNSYH03h\r\nAlUhFj81KTliExTZxu+8uievMJLN8+Eam3kklsNoqExgZhkaQK/Qkxr0oEbk\r\nX+nXJHULfO2zJoy5gAW4KAoy33zVW9mTEwCK4NStJwbrUR5Oj8Y6zrO2K4HR\r\ngAX+xvhNYGjeu3NN9lZNSy+qF2KOmXYP3e+AvD4N+AyItf07gILsbir5g+Jc\r\nXOnYyZQS1XYN7cjXzC/PIIhAlRwB7MetpUblIDEmQz8e8rc1aJGvaR8CKImw\r\n/4Uz6jBy9yds/KXqeVG1utrbMaFu5hC0LOQ=\r\n=NBrS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"19a714fed2a52898b4eeadb46c2059bfbf136870","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.44.4","@apollosproject/apollo-server-env-mock":"^2.44.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.44.4_1647385843115_0.29734737931851885","host":"s3://npm-registry-packages"}},"2.45.0":{"name":"@apollosproject/data-connector-rock","version":"2.45.0","_id":"@apollosproject/data-connector-rock@2.45.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8a51390142de999747a1f46e6c9944a09ceb2e15","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.45.0.tgz","fileCount":158,"integrity":"sha512-M/bHOB6dl1ut6yCPPkpAmN51j7HklNNZgtRVW0V+Jih+nS+YF3eOfKVR5ZTxqbZxme/TMsHQ/0wk/bn5KlrXzg==","signatures":[{"sig":"MEQCICnmW6sN8Lx+kvXBnrW806rl5G8J8RoHriWFQMBDAzKtAiBya+nzDPysI0uRu6hvxD67xp/ZU6nhWBNCSLoHzIbbfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1092731,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOikcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSOA//eli6sw5jG+ejWxQBZdhzjO9ODBQzeVlHE0jiTadesizzzQcN\r\nid4JWrxWHe6Xvcc3E0wtTc4y0ve9K33bZAAUuFssQ7ls5RgxXy4xrsRABSGk\r\nONfYMK4ObOt/HpjicP7AKP60dfvCkUV22Wlpcg7r6Uw5bRVnWe2CgAAltRsY\r\nqWzMHdRjB2HZfsH72PdPlha3fekmuD9wnZOg35q4vV4df8dqDnXklqAYF0at\r\njwewzAKOvA9InmETkllHsF5mvlpUJX6qbrXyJQkDK3eaf99gWWkmQ+cVUyZV\r\npH+OtXRPOd2UpMCTDiN+Y0eFM4XwQ6GBTegS1XTa0mHTNMjCCFWzZ8SszWu9\r\nkUsRH69biTrFKUp1N/JQrpvm23/uhokap4QIYU4vuyttMtAAusF2whIJA/RQ\r\nZaQFgGo4pVz70v2lW7j/ZtsHmlC2L8eror9MN4anUpRqFuv/bX39Q566ilR+\r\ncuJ3VcQlwOCzCJoLBUt16Jxk/iI+UowSvGZzfi85XggnKgRHcRKid7Bs8yW9\r\nRqkxGpxyJaOORAj7B3dfkspKWhnU/TuJVm7pfzCreMYhg9mtdtmXNMEaRQqh\r\nDbnDBtOMNrk+xXWL/C0aUdhMVMvh/mY35Yp0p0bAicFf0O+HeVK1wSMBGvQG\r\nKpCpoHoFWhxmVW+v/ogVZI2sU5S47V1V4Yg=\r\n=FIJ5\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f6d4c72358578c7447743f5d979be1600675c25e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.45.0","@apollosproject/apollo-server-env-mock":"^2.45.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.45.0_1647978779865_0.7498614814556737","host":"s3://npm-registry-packages"}},"2.45.1":{"name":"@apollosproject/data-connector-rock","version":"2.45.1","_id":"@apollosproject/data-connector-rock@2.45.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2c9b93f50ec5f388f06c5a43f049e498bebdfc99","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.45.1.tgz","fileCount":158,"integrity":"sha512-y9i2kSNr5VbTcrdkzTMLr7kSBhpk2fXuq335J6PE2i74UFdhsNFxIAEbK5LFpzL6KEglk48ErMtsWlIFYI57iw==","signatures":[{"sig":"MEQCIGh+37Eu8u6BPRSAjLia56uKHz5vmScL/vR8lxIQtmrbAiBkszv9xuGS+ufvYiqacp9gsQAlkmzRYwN9NJCVnmd8FQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1092913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQwp3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1Zg//cMl6ZF2kowN7e1buqUqH1HUKrLvQ/wBQ+HR2UryulZTahzrT\r\nO51VRiUbjmPWoPzO5xqp5KbxXj834dyIuzbelkYBtj4fTXqWIWuHLFxKINtI\r\ndjDQHd8YtkhK2sEJzdJlzQH0CdaQGqTt0mhiqN3EGkByO2uykHPg/n7pIcoi\r\nr7bKeaS/jd4WZ/tIOzBTKk5zIa7T33Ule+66URt/sKJM1s4fKLeIKqlrvzzs\r\ntfo5HJUsM390g8aObwoMJYQPPlOC7VeXeXo9jPfUTXIPGm3dQgqaYOUST3yb\r\nxb2cAigW32wZI7ZXNXqK7OjsmK7HeSRQ3yPkxhII117Q13X5jUhiUBazlIYi\r\n8+gvh3ofnezCVAx4VIfgN1tQglt/gAZkvOwXkOYERoTAZ3rqqC30iZJYtOEH\r\ng4wnVS7ytGO2PwoldvL3NoeZpCgZL/0iupedldhGnDunU1AgRLEFRg2v9ILQ\r\nN6net3suL9J55QhsWTfhGaCRXxRh0OLiatb1aboAkR/zncJsNnGGQF9dnvEh\r\nEQUqzePfGD9P9VHs+5cUaoQDaJPomLbcooTuF5mMrJRg5iskWngl/pxvXWJo\r\nrBnO54h/5MJGu1WmidK8Aks9+HTNtVflDGr8F1qRi61hCvB49iAevttkMFTT\r\nCGZ1+hvDRu9zYsciquUNrStctN7ZW64xVdU=\r\n=x9DR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"61e7730ca9f630dfa0e8fe95731cd911628c7f9d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.45.1","@apollosproject/apollo-server-env-mock":"^2.45.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.45.1_1648560759084_0.9162211280282533","host":"s3://npm-registry-packages"}},"2.46.0":{"name":"@apollosproject/data-connector-rock","version":"2.46.0","_id":"@apollosproject/data-connector-rock@2.46.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8ca778fcd4f9cafa3d62ed80d38172b92250e3c5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.0.tgz","fileCount":158,"integrity":"sha512-Mhsd2SOPSc3R2q+0KZhzFTwNfWrqRln4hbLo9yxw4woeCakDbTfYxu3UVBJ/K88W2SpN1lb2JZPcLhzMmvPJow==","signatures":[{"sig":"MEUCIHMnbAaQyD6WCEUy6gbe1ht7foIXN4qxkFIXOT7nSz3MAiEA40OJsTTnaGZgYTNF9p+mgo5ZM/NK7D1FSJ00Tx33/Io=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1093094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQ1AFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmocpg//Sbm3ybdM1H/INIPq9n6IVwKNnjZL8SXbAbgSR4kiQV6at+0s\r\nFZLpvE22UHoDn+9GQxriSQIeW318d6gJdzLSxoCEulY9MiMhYdNBVm4SQIk2\r\n3J4FFvobwYlnu0xDTipdpWAvvR3sV60FnU+KBInQIJ0GdcrvoTGFm4rPEk5p\r\nDLMdLlltmTgpZJAbUVmfBdgsOk1AVWOkGlYLDfCgyC50gbvnrA+Wooj3J893\r\nKkc8NElfAdIlEvcoIbC/SCy0kFYCYtb4PgwmgxqecYsClt2ur35V5NC6ODcv\r\ntaa26i1PmObHDnS98ANgmMU/3yocpov1yaMBdB2FFgyYefx/95UgI9GsmuaC\r\n04/b3wBlntoBOkApq8zLK3tNObviTJneXkGlJnd9ILajoeb81g4XNVwfq1fr\r\nZbolPcLmnYQCkYDcivHL3CB2bCUDkx1hWYEz+DsqBNPRWAka5jWTY/Zc48Ws\r\n+nseWJPcT1eYhTrkkIU13osggXz6Nd2Udz+yABgQM8+Vm1qa8bhcz3vQAF7P\r\nMtAg11Dd7tVbNykVc4nkirjX9onJZQ2ttpwMMRNXSsB1ZMHJiGGM+6SDBSCR\r\n3E9GZZhK/h/U06e0u7hnCRlfcb14+Vbs8PknRFrbAoYlpVvSj7D2nzZ8/YnC\r\nDyS4pUsibnjxKR0fSkdB38yoQu3DOGt69ec=\r\n=B0nL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"1b53b711f6723b9ce61d638b0600731ca40b3a27","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.0","@apollosproject/apollo-server-env-mock":"^2.46.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.0_1648578565175_0.47136630639214583","host":"s3://npm-registry-packages"}},"2.46.1":{"name":"@apollosproject/data-connector-rock","version":"2.46.1","_id":"@apollosproject/data-connector-rock@2.46.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"078060585845e66c723e1eef236058fdcd3efa55","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.1.tgz","fileCount":158,"integrity":"sha512-3Zy0gTLQl/ErxJtQWpSRtk2ncbmwuUUifZvVJr8LIfLK5aszuk1WtceyTsEb6JrSqxcNozQudwY6iAoHvqUZzg==","signatures":[{"sig":"MEQCIEBDWEkvWBU3FajOz6Mg6GlFZtR280RgFozQjnP5VYK9AiAYnH7AaiFCEZiKSPC3CX9iTdBIQnEM6G27oH2hIzp/QA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1093276,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRHL5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpgAA//ZN5yIwmkW8U3TR5dyBzjm0UDlXyn6SWMr+taU6evDakDtNgr\r\nsJeRSrEdh2poYlw56dXjrScG1cEF707vza4hQq4h4il/ieOqWmBlxoIp5ZvT\r\nMMCcrFtdgR5qjD0MUCwwcOv7JmCs258vNiMYB+uhs5guscb+zDMG36kd98pF\r\nZy6UQqx4iiOFy/EERhPPvUFbVkqJdP25649k0KjU6U3vC0E1w3OR9i4qDtUE\r\n5lg0LMPBkDlrzNxMzFJvA/3B3JN/pES27C3ikXGW1XHFUYD790cZgTzum1bb\r\nFxIXpYqjeUkw8E0/AmK+/OpxP2o83p86FHKE+l+cVneegDRHlR3+Fm3OOQwW\r\nndb54oNWSEINOcEf+F2o4PBGmQ19JoQMrKQ9a4GdjhN8CmhOUhTu+/qVYozr\r\nfal2QXb4Lk2uwhhhE2v58VzNspqewMCrp3c/hP+SG4JwVvBT1VfhytWsZuTB\r\nIMoIbBjgSa+znMpTxtRHU4cr3ugDHeLGP9Kk0VwU/gri+KBxUPJpvB+Wwyxo\r\nuK3XZ+LWBYCffxP6X9Cs88lQZxFGbHmFRGMZj+XZTc5USA8/dkqJw4VN2FbF\r\nI/5ptGaZ/LxGmCeb2YkFV0fUGRge2fz0ohn5+3ZIG5EpIyK3jo1mfptkhOke\r\n6edukhLehHsF1bGAvFQ+kft+7RqpMwUwDtU=\r\n=SvkU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"55e1f2dacbc58e6d9d7edab4eab19987912fdf83","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.1","@apollosproject/apollo-server-env-mock":"^2.46.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.1_1648653048975_0.08598825349371864","host":"s3://npm-registry-packages"}},"2.46.2":{"name":"@apollosproject/data-connector-rock","version":"2.46.2","_id":"@apollosproject/data-connector-rock@2.46.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a71a6c79b0b644c17d965cc2e9ae15d30c070525","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.2.tgz","fileCount":158,"integrity":"sha512-TcHG9azTJnDCDfZngV/G2dJOPqxU0NJnPOZU6BozcpJ9zSpM3IWMZHq/6+WVjq5KhdhhnkizAtW6MEyovPTUyw==","signatures":[{"sig":"MEQCIB3Fj/IJ8M44Df1UFGSpPwgHDeBF5dkxgRlaPwsOgUZQAiBHNI0WsMfYolpAqs9UCobY4nISlPuXp9ppuvmOXZtngA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1093458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLFoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEoRAAne5TaLHAEK+wbgReMZRvB3/XuTESYBgojmOGKb9uhtfhtKYm\r\nANXoiazlla15d/Co8HwYRiD7apHkowtkaAPI04eGxZiksDpfoUG4eIizg4GE\r\nSaUcMLLUAZ0zGBSOq7X6kq9H0E9whO1MVfRR6W0TxId8nD6QOaXrm0q5cFIw\r\n70WBn+IZrTJRQkfBY+94KBzo6idIDSxFm2CQ2eRWNclslRsKByEwk2PxqaXx\r\noN/1p16rfAbIo6+zUkpzZ/Bt06TrNTLd36d/OtdcgEkFY+qAMRJ/z0/FTZx1\r\ndLPPlnTN/wr/hRj5ypFLXgoFVzu8aVzJgadul9rZlZfvjFC5lG3BGjSTnOGQ\r\nsgUvQmljW8RpFzMINq/r5mBK4Iiv74W0+uP1YhKXoHjiGRBjURZBEJZfQBk0\r\nL1WtZMZ8YAv3Lr6M0qgj7duiK7TKh/VJWibFzdhZuK5MdHCNv5SC1cR5d3UE\r\nQp8tetW87noW+FjrQ3jMOHS8XBZqDz5ONQ14WZYbW4S3qEUN3COR3Zohs7RZ\r\nG9ZYb5UVAaIWVAs7zQfA2EpsNOmubc+Evk9WLsx2etMvAcUIZIfBkUl189AN\r\n+cNg9TK9KJFc1objOgQXSYdz25dFus4Pe858JXo93ucd5myN0wiWfRj+2jmV\r\nQLnahz5XOBKLgKMhPGuAocmETCbFx9NRiHI=\r\n=YTgI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"2055046e5cbbf1fdbeb484fa1c6210d4252a9021","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.2","@apollosproject/apollo-server-env-mock":"^2.46.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.2_1648669032053_0.5154403217905092","host":"s3://npm-registry-packages"}},"2.46.3":{"name":"@apollosproject/data-connector-rock","version":"2.46.3","_id":"@apollosproject/data-connector-rock@2.46.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d811734f8d0dd063c7153b3a6d239a0079ceb51f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.3.tgz","fileCount":158,"integrity":"sha512-clciCnuRobf71ukhcj4wrx1GjRhCfZLen9Fxw0faYGpNsZ3tTa6TfEZFAaVa+xqU3oGiHVVq6+n4Mny5f2HGvQ==","signatures":[{"sig":"MEQCIF4ufKJaE0nHCCrIJ/HYMk7ltTU7ZYYn6lxubw4HmWioAiA3ccDVQy56sQ08cYmZUdNF9JdmUmtgB2vXX3bz2kZ4Bw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1093640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLIbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmry7A/+JRXUS7wYtB7HawQo3NyH1mjDjdjFIwFTKtaq7y1jCzUEF/Fu\r\nAmiANG1a+GHQ/kF+0TG4nQjO39hJkZWj1tJ80EQL1iQtdElPb0ObrHrY6CAi\r\nZpFBHJANxW6NQOxcFOT32nyIfvBQ2OMaZhs9JHEIJD9Hq3GzgIp1BMF1wCpy\r\nGQwLyCPOSxwtHU3JFXNp3n+gPqN2gHnvNzvqZ45HSXomceENPIHMwUg0lLSa\r\ne1kGxXIgnJ5M8a7wlGhT9NaXeTm5n+vd+hxBbLm+Kv3GlDjz4QtBpvHfUedF\r\nmK15OuOAa9A6SGj9Onoo5Aew9t40uxXDoXjGKI0ieo17lgPjQq7hnsog/FlP\r\nCCEswNL7w9qkY1WIW21LvfKgE0DDi/eLP4CwlEL9xS9nl1ZSQtT34ystiOSD\r\nlVs1FnAjAYKstJCaOQTeRwWBSyINeLeEx5GDkmIzvvNL4wLCNoSOJyU2K+JN\r\n2R/51SjnLUj72mu52j6IJx8FzSku/thtr8I5ywAw1WlDIqZ/cpdGxo+t0cBz\r\nr1GyIs5Os0T2C3+7/JemXzGqh1bnzYGaCehRrGvW7JmZrozo4B5uK4QYXLPO\r\nd46pRVUL8+OmYiqtNIZH3Ljg7qIm1QoJHYI46kmIe9fPH/jUG2H3yuNFUTGk\r\nLGf8DYch0atBk916ooeXobCbk258V0kXn3Q=\r\n=k+Wf\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8ea7936670611cd8fb9c4269585f37db3c66cc6b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.3","@apollosproject/apollo-server-env-mock":"^2.46.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.3_1648669210912_0.3504478315502686","host":"s3://npm-registry-packages"}},"2.46.4":{"name":"@apollosproject/data-connector-rock","version":"2.46.4","_id":"@apollosproject/data-connector-rock@2.46.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"219cb87e36d783f978ca419d0867518c1f984698","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.4.tgz","fileCount":158,"integrity":"sha512-KYEblAsKoUxtNYP7j7FCFUI0YlZ6TTYhBbV28aeNbh0ZPnhgTYSRcIPKjhM6cwWnSw/lH9ZYtNy5mmTQ5DjRPg==","signatures":[{"sig":"MEYCIQCXzOOKGUVnl9BdI+mMtJZdmjS1292Ag305zO0R/+L3SAIhAKpH1WNQ5GenMPeOixb65/+2EWCK1edndDoKFeGLKSxG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1093822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLL0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqn9A/9FfCsItQ+cMfD6n3pe+HKiL1YVUV77LUSKGZc4IMMP9LW3nx0\r\nDV6HtdYpSrqbC7SO0qLuW1QdyAts1/Xmbm55Vq7lLK4Mk5Xe4ktnTe8BVOYJ\r\n0hrRCtZhGCCgzfv0+m1gUoj/RlyIa8q0tngVtYyvu33EGrCgBiX9ELPehuqr\r\nyg807Wl8d0jm3EaDGgdwgQKrSO2ELctiM2UTAq6VXNfjjrkCAlMkgu0f5iHy\r\ngVcplzSRi1226gw07BHqLgXiwslxgGAgbC9WebLo2QFynJVttMPIsB77chHo\r\nHhOON4kF+ti61rYDbmH3MVKgo9ust8m7yWGPmhzFMeq+cN0wf1kt0Qe6pPST\r\nGUSAjZIJQu9FAJnmVV227R0MqkPJ2RMjbs/5kT7YJkN8YxOmAUcPt7jEEYLT\r\ng7kFj+fnwUJWmRvRmy2mOV+fmEQ3E+KGh40gRUF7xbFdGR5wh6Hgaxf3gKyf\r\nsot/kgr+JruzHqj1BbFu9jIhLKk6fZuUAENsSP5g254GP6+V6TgQ+AeNwzBZ\r\njYawdKj1KpVSBxe8kaRfPzkFMlSaAmjamdDup1vvCFKvUXrWD/jidS3hj8tz\r\n5zCjVZ+j/9ZTyTM+psCdEid4TexEr3teWGWu+W2CvR6V4BzR5MyF0H2A+hpv\r\nDiwF0j+MPGQ69yhfnbSydZOFICRHpFPiRo4=\r\n=7aZT\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c48583d94569acbfaf3c8565b45df0ba7dc19830","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.4","@apollosproject/apollo-server-env-mock":"^2.46.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.4_1648669428672_0.6445052758700764","host":"s3://npm-registry-packages"}},"2.46.5":{"name":"@apollosproject/data-connector-rock","version":"2.46.5","_id":"@apollosproject/data-connector-rock@2.46.5","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"558332995dbf3f18564e202384d77bb821fc6307","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.5.tgz","fileCount":158,"integrity":"sha512-7aexeOgYIoFF+OEx4JMBqURCKMVFyl91wAAM+XbJsBWnHWX+VaJnRodU0Vc+WEg6XEY/gR6GMIYXD83wfwR2qw==","signatures":[{"sig":"MEUCICR7imERegzOoNe1/dsxEl4df1KwZXp3Qia1XKnI3rTpAiEAoHtRNiOAk2L7HogNRnal/66/IeiPkzloOv93G6y1HtM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1094004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLOuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcNBAAmjy7ep7CxsQ0DF3CzUlzA9VZfIzxbEaeTFfqaeZ/DxPdnYKE\r\nLyeyGIUmYa7CmjV/PGzZnvCkajWSAKTkkHbnCxeoejGMVhwFEYPs55vNJQKy\r\nbE1vLo5GficKedMHuwkf6/Z3YCTxBkCb6nmsaUVS2iz0ya2SmQ2qdJ7AmVDe\r\nlh0YGCoqjHdOd4tQQpEVHAVNw/Op8g2rjBjb54PW5b4I5jjE1vxRU7wOOTA4\r\n+GhpBeQPGBZpZWGYKdwhLWaXNHb+Vx6eYSbGMfK5xjZiu01rt4DgRxeQwTU1\r\nhtIbmdX/6XioWnH/RPC7vKpSsyJ0voJyVnhA3lCeu1XJwpciBZLTEf+uZfh/\r\ntu0md/uFwCunaOGkF0Ns8IG7YEjK1tZR2xfOF+AA1Q/XmPpstalv9y/OuFUf\r\n1fYLpoSXOHVFI/Vfp+XoMuHO4l0LiYeRaPyoG1SbCaZS7Bt25YY08N/2FP4V\r\n5QjbFAynIkHOeLOFrFvDszsG3FrJELxffsmjDaQtxvjWPb7odouz/YoeUIZt\r\nDl50sBjqpTk8wqes8jBJAlKMUo6LDcKrfhd6FRb3605wFm2RRsfAelOiLAD6\r\n1UU7Vo3m18IULEju9QaOjk2iAPrl0mpXH+3uw8HPDIXbl5gSfAnuACKESoIz\r\n/nCONemijenLcYa4plLv5EOgRi2nRayQD3A=\r\n=bVaL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"b08250b53767f9a1bf580dc74cb59b2ab3c68f96","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.5","@apollosproject/apollo-server-env-mock":"^2.46.5"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.5_1648669614684_0.9229824048552657","host":"s3://npm-registry-packages"}},"2.46.6":{"name":"@apollosproject/data-connector-rock","version":"2.46.6","_id":"@apollosproject/data-connector-rock@2.46.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8e2ded37dce866801d38137b094ffd82e792c8c1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.6.tgz","fileCount":158,"integrity":"sha512-Fto6CsYb3ZKgOHOpHdX1bSuhwMFEFeXAZ7NoL1K0vubrhTl2wBWxIunbqe0+VuxR0Ol7y+zug1g5GGHBDyBBAg==","signatures":[{"sig":"MEQCICX5vJBBHxQCrLixrmLVlDRoVX+Z3gnjOzc6CxCuVgSKAiBOwRq2PkeG0iowtduPjP0l0tGEg/R11KkmKJixfeXopA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1094186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLSEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqS4Q//Wkxw9Z3HZ4+vzXGc+rv4ljIyhTtVcwGYyW7hzr8Z9SjMxBW/\r\nuvCEU1HrYTMuQYXIhdTT+nZZAc5EqS0BA2pXFFdarQK6eY7+oMy75v5WGsQ3\r\nAw6fRUA//lCMQU4viFY6yAV+jsgmV5PW1ON79iDB4iweiryddHJ4zJEwmEn6\r\n3Bd72Gbkth6lOBGNlE3AgxrwimOaWBEao5PjyxoQpv8SpsyjH/mOsFtQp41X\r\n2m7YOCceuWYp0+UPIN+nUu6FsLORoEZ4b5bGhHpy3x+0lKj+J5LRx8lo6Z+j\r\nN7a6sAzshC0RfE2HywHD9zcEK6WA1jEOdvQBgne38dk39tOsTBo1jURVc17B\r\n3VKO3XsrH1issQ7qamtOJHj2CNtObHxRsEMKpJ9Ioe2C3y20K2bL1TWH2Xsm\r\nuU8/+alYJ60WI5HLafXB4PA81V86ya3zVRYgT8Xe0RLIXghu5B2V8Jwop85m\r\n6WYXFodBBrHJmG495k9/JCQrenMafckW+DEPLavIEuHX2RlCP0EEIvAdqLE7\r\n7CmbYxuKYYSQbnklBSMculDqiFB58cNO95C5S6isPy4BqioHTugxJUR+riiv\r\n/M1VyRQKbxnTsgG0w70JR20mYQ+dcX7OSMeUvEuuGQ2S8s6GIA1m6wauQBik\r\nCogZtMWgikAHbQGKWSDp8engUOOprvg3efE=\r\n=cuDk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"769c125f3919a1c240f8cef52d37e204996f7167","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.6","@apollosproject/apollo-server-env-mock":"^2.46.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.6_1648669828211_0.9876237284324718","host":"s3://npm-registry-packages"}},"2.46.7":{"name":"@apollosproject/data-connector-rock","version":"2.46.7","_id":"@apollosproject/data-connector-rock@2.46.7","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c67a6ee81e1cec90f7bb8fdcd6710c9dd6311f64","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.7.tgz","fileCount":158,"integrity":"sha512-EYLDI940rbpyLnPJNFB75CiGBmREDi+3fYMT8fReUbc95KOYPh6Lfl7xbkQvj41b1wzfqYt6FojhPTlbslzE+Q==","signatures":[{"sig":"MEUCICXhFA47eJpTY2RibaxIxV4bz4iHOkpp9nAiLpoz0oUEAiEA2xE7JMEyV6js2Q7SLXfujwvMJIZ5OHKrI1a5vMo07CI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1094368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLUnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrdnw//XYOS8g8Hq2OXKP2/VcrPwMu5Fey7f62Cy+phtYYkzq7vHsLW\r\npfq+/l1ptO9OTtob8OyMkUnxWgWyoDGZNmdbe4Q+hUt/HLVUIfbv8TegaX0+\r\njK8JadiW9iVJb6lrYnXW01GDEMSpHL+f5f4mPyNKrR4ri8FrooKL6gRhFMi4\r\n3LgFFE6hq8Rce0rjEe+C7KAABUSAwsrn4SodcQhV5GItXDQLaRqamoWHKpmU\r\nh/5VOkI9qcsi4XMcfj0SwTz6ygBvbZqWZ42XtsH68+Ux47jbDceiRdjAx4Ht\r\nGE9UwskMTK+fuNQu7LdbPCVcvMNEMHV4zYU55FfkSo++GbZ8Rc98oMUj/j8y\r\nCQbbQylgvOEZnsIRQtnU/6LXVK6u0A+37Zy22N0+lAH45k34ScZNOz2hOzw7\r\nvXrJp/InEZ6B2Js+xH8Wk+Sc2M1H2s+I8XeZ3c/E34pBHzf7+iW+UW1p3k+L\r\nLcfOjdpV2ffqqIdjrxSUchGnde7Ts7SSvg4gdpB2d73O+jLWU4mkyOZPHrSo\r\nHwC7JS7KrDweanIj8QSXAGTPDqEVNZ4595a8IWGcGRLzJQY5icArYP8Etl6d\r\nG1iz1/RnGekWRySeU3yDyKNnHQNlyEjKvpcpPJlNRXvXqqIHfv2n1tao8bUK\r\nID0DsZfa5XV9c3TfSkdpUVryLEmh71Xu8R4=\r\n=Z0hZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d5718a003f67a961c5b03a967c68a9e0fd77f840","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.7","@apollosproject/apollo-server-env-mock":"^2.46.7"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.7_1648669991642_0.7404323265677211","host":"s3://npm-registry-packages"}},"2.46.8":{"name":"@apollosproject/data-connector-rock","version":"2.46.8","_id":"@apollosproject/data-connector-rock@2.46.8","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"fbab40964f6558988e201c94fc7334527c8c1442","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.8.tgz","fileCount":158,"integrity":"sha512-JEVWh0Uh+cMuqKQrFpd3+8BYTHt+bS/Vo3CMiIlXcgl6e/Pk5Kq8+ZlFLfl2R/z3Qkb5sjkdFFIZk9fFQ42mHg==","signatures":[{"sig":"MEYCIQC1pkmw0zJCz1BDjXviad46JVwBK1K0soR4aULU9qXAaQIhALDoT38pbYZr5p97lVK8vPgNvG2bm0a+SXL4DbwG+/zm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1094550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLXGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLsBAAgLuF2CYLJwVaXEVO32z6ud3ziV+QXiU+X83ipgUqCLfEmUt6\r\n8C/6MYE1fI+aga9tyhfvzt2+HxouuaXt37QAa0LWOvhDDOeVUZUF1jQ3NWaP\r\n1CYpHpXw761hWUutObMIJZjgMU26wcMOi2il+hKGue2Uom+orM01VOAzpbm6\r\nSm+J06pOpFyB8KjbhqhKeFJsSkZofoD/Fr1o0EiiF91cltLGdwrRrtlTtWUh\r\nFwIdHbNWm0M75WGBHKf6oPJSJz5kZKYB/qLdNhAcNP8K0E7YnFdP6m1oVvHy\r\nkInvaLqjRvI+6+8/lkEfIhi7NwAW8b5vWZpGrxD76R/CBw5tbjHT4qzDVXid\r\npeOrtX+ZUmb8HFiVUMYIv4HIsD2PR+uGCyFgItjynW2R44gIicAk5+EyN7cn\r\nJ3clKYh1req285i6439FTy7/LiKZG6Iw3hFJ8MTuzmx15OepDhU/leCdEMBN\r\n8Hm60tLgp6zmpiuFFXwLYNW8J7t2On/0j3dvGlLqVr+dpEc2vYfAaOtRz4U0\r\nyrRh8WeviIrDAnN5saxKGif0J48JcAwn2ViYtxY6gNKxc+l741EYDnnnsaKU\r\nxu5Xgi7a8uXQ6239ABwHLRMMZjbiNQ8ZVixybGVo9B+MMpTejlamIuWKf7K/\r\n/2feRpth8hIMMgz1WCIYEyCPjxwRAdVpqNw=\r\n=LE+P\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"060359d8d901806bf09acb6302fbf35241b10241","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.8","@apollosproject/apollo-server-env-mock":"^2.46.8"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.8_1648670149828_0.2340911733458828","host":"s3://npm-registry-packages"}},"2.46.9":{"name":"@apollosproject/data-connector-rock","version":"2.46.9","_id":"@apollosproject/data-connector-rock@2.46.9","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"bfb0beb402bc140ba4c902decebac1fb67224352","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.9.tgz","fileCount":158,"integrity":"sha512-H4kjgvSJhEtIWSAcxuERmV3eAPU+U6SkG8vlOwIrdO3myDfrrHOafn3WDnvaoDdptvnnwIT0SSIn+f5IsGRi4g==","signatures":[{"sig":"MEYCIQDnNdypFD5mMvhDv3qv0ZY/tzdD5VZmUAho2n8mhW5gKQIhAJYPznuE7/A4WpKgJ+f5CapFCijYHxOydDvw2BxotUwq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1094732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLZ0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpyeA/+MdFtp1rmMZYjafAunAD05XKKQHygFPJvnDSG633bxVWbiP8+\r\nk6c1/ggdW4M67PxZZUOQnjwgKJiYqRcUC5K+I71+vAYhRgMoamxq+/70EkQI\r\nAAVB52kfSqNevk3+rPwUFPh8AhO7UmTjdUFk1X01nnENq/ZmSbdLWxFgIVHs\r\nKwcuMbmWAINxPlrFkKKWBKL3ApfGIOoagDDngmYIdgrEQIAfJP6bx3OTRkUi\r\nI8NAxisEhXLBLzcTHMfPZu52uPkDNM7AVthiBTAbSVNxqZvDsLS7t8YoC9P3\r\njScy1gLkuWV6dr+MdrOJgTl6nA25WEnxsZdQhFLiz9UuhQNUpBlGtrB9Jgwa\r\nGlcHDCyRdy2tAEXn0yTY5yYXB/QtGpyZzgmXImucXKr3rt7ccYHe14lbcbCN\r\nCos5YqjIoWLJ6/8AkFzQyKBb5+tiD/8KhAx0otiN2y3tZgRU9EG4Zt8LV09W\r\niLFRIUyrkTCMH8EcVIXrP5mQ6BP32/k/lDVwFmaEGfKVLNqInQrP3CD3VQox\r\nXwrLLcAGNz8EbgdAVnDfH0k0+T0rM23R1reKntQO370sOe2Jk10xDwO7LARQ\r\n2eGLIETR4h1Y6tD8vZx2itKk2QioFfLzHHecJFgmE6tORat5aqKgovMfttp2\r\n6WC2NdlOoFKTb9/D8Kj5sflROks3AkKeua4=\r\n=mZnn\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"ec5b83a84465b89beaed94ded0c4b2d6cfc399a3","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.9","@apollosproject/apollo-server-env-mock":"^2.46.9"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.9_1648670324291_0.4733167932884965","host":"s3://npm-registry-packages"}},"2.46.10":{"name":"@apollosproject/data-connector-rock","version":"2.46.10","_id":"@apollosproject/data-connector-rock@2.46.10","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a4121ed36580c294aa67602c8746c58da0c2cd32","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.10.tgz","fileCount":158,"integrity":"sha512-u1H+RKTJGByZWkns9RdcRPQgPoqIFdoR9U7SWgaX8Ct3wUAwCZQSl9iJ20zwlw8xUOGgfcFABUSuCQHlC1kiGQ==","signatures":[{"sig":"MEQCIH444sk6yMNwrN7IVkTjDGNAbXYOOOuR5ietRlhTqTE+AiAbxY04md3cyt8qpS1i2dNLknfF0OhEaqF9LjgxEsOyJg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1094919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLcmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+cQ/+NKb5PB/EKv9bzDk4uuA2j9le4Z8JxSbFW/EvHHT7UurUuxyz\r\nw7DcNjiTpal/oJ/x6CZZRpkEZQudsN/eth1zS2CdKbLvFl6gMq99HkKWDcvP\r\nkYv8cFgzc2iJC8HUZOwW3u+tDizvTWqvpwOgR5n7CkBzf9wU0bK4e/D0sM9e\r\nQoL3UF1uigpan9Bs8XRyqSKqcHxph4UEHlvPr5ClteThkI8yi6grRHVbt6Ff\r\nUYfRTIMF3Xn+ExLsk4x60i82pZqjPG6sAmQsReFvL/uwjxkbk6f7LMwr4waz\r\neikDDyAl7FZsmfYi+YGdNoD0fTHxv++zbIcNaDROLFLHmgbdK5ssAxo+mL7r\r\nL8wp0JxtPkoE6F79NF9mvDjRrK9Ec8ne4KHUdZOx0gcH3ASh1TTEtrvRzWVX\r\nVKOIweICtmGduIaoxHMyxvqoysRVa+1eHY4LRs3Tpj1b+e6yWvqLbnvz6Nxb\r\nN6KrpETSJQXpi5Fq+hHE9OAnFzZJpKZulaFZeaA/zwFwapjJ8XaQGq7wfssO\r\n0IKYseM5McYcjO8xV242ir9ZyOQj1RFTPsAncXRKfA0tXpQo3hmPBAd1hs1Q\r\nCe2ehPeVPe4bhyK50iR+IgWKrlGInQw5uMfXxVDTMzQ0omSEQ2G+xMP3JbWy\r\nwqxeLI1OcuaVdND8McsYYf7F7buL9cJGVKk=\r\n=oyfb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f3a24f5bf298afd9d054863248cfe5af1ba154c3","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.10","@apollosproject/apollo-server-env-mock":"^2.46.10"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.10_1648670501844_0.8992897857257884","host":"s3://npm-registry-packages"}},"2.46.11":{"name":"@apollosproject/data-connector-rock","version":"2.46.11","_id":"@apollosproject/data-connector-rock@2.46.11","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f3d33a97e8b5950739ec993d164d79eb4c01c101","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.11.tgz","fileCount":158,"integrity":"sha512-kwWIJag2/PvkiiE8tDVQdVSeorFzzPIl3ksB9WXaS17Aa1oFHeNrKxfeWwdRxOktDJ5gBSHK21GFUUMxTbK+dw==","signatures":[{"sig":"MEQCIFuXvnA8bBDAJ2cqbRweKUU7x6FoBwZiuReR4CODLg1wAiBttEMX/qHi8y916nzhF6bXUgzQeNoUs3IFwXh90w6VWQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1095104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLe7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOXg//bBZ/FWhBV5bA4BDklgK8zYshFfsyZPHvk7py1i5WXXp0yLED\r\n65EFJiTr9Rg8OxM0SNs3oDAtYlBpbg8U1dlmDuX6u5Q0DQEHGZ6TJD34A4DI\r\nu+GusQj+91vva8QPYSCBnZ/oZLlvQo3MfY816JvZf078znqnisI3BUROpFCc\r\njcf6R1LaY5GCPIYF+KHcM88ScWgR6ahZ6+GB4/rSwvz3b9SoNKaKmwQ+A7b2\r\nVf0C4XyV2G/DdbO+1Aw3EeOr36mMv3UyYCp7k+GMEInlXilVSiBOg2SeUHo9\r\nHylB/KM23cmkPyihCTpYubqiSnS+SDJ4YHej14ECp/PsAG7fVqiEcLWEh5HX\r\nHZfsBe+5NUyb/aAoDU3sgAzNCsZhc45PqX6CFFXJtFhcEvSOh3asNVR8zUci\r\nOc/o0yqHXyTFTAwkHAD7SzK16A+JhOtBebiFzE4MdLrebOUNHTRcIkUME8pp\r\nRe9PhOR28PntzQHdYN7mgv0W/CrIfsiWmZJPw1ueCjV4NIJI2svPM0dzBXel\r\nU8+5afoN6wM5UYjENPdkdbDqQ/MVmEX4xUShWs24rpwdAGkB2K0/ZbLW7mG2\r\nTwHkJvfXFYVKZf9VNXASLZCabNZD4mjp10N5Tn0u90RpzBgkUSzNRwOZVKLr\r\nY3mvMRmehS9KxRvi5TdB6P3ZnZ+btGXVows=\r\n=7sJ0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"b009e6e643b5d491633984ff2c6b24a8b6a0c4e7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.11","@apollosproject/apollo-server-env-mock":"^2.46.11"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.11_1648670650936_0.00126871730313316","host":"s3://npm-registry-packages"}},"2.46.12":{"name":"@apollosproject/data-connector-rock","version":"2.46.12","_id":"@apollosproject/data-connector-rock@2.46.12","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b243be2035494897fec2350e3798dfca16c6aa3a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.12.tgz","fileCount":158,"integrity":"sha512-YoTh2KlwKq4PWvhtjcDOs5A4GhidSxdy3Ml8my15YMsHEApI/wcgQSWck2Iij4CWFOlkgChb3gDy7wUCTpLoAQ==","signatures":[{"sig":"MEYCIQDyxxFP9EwiHXe5GGooLqe9KYp7LgPqIf+bebPkkQIntQIhAIi2d/xDm11hLdy5nPiHPacjqSpC/tvHDZtGZDBhHKHK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1095289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLhwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/LhAAjfCw9llfz9Z7kvhRY0t/uQKeLzZ7JxhZk88VGSXmVslZEiKn\r\naUz2odXSx0t8ijRSHgQgTusJUSU3sZpFR8a/uu7UkTa22lTfeeh6t0s4+d8l\r\nJTas7v/dZKKdy0HB4h/Qt7ooL5wSnJTutPzu6nY1ALVGsCrvZdbU51uq8bss\r\nAavmQwEIQKp+OQy8G/xTutfOd5pBcu0uAa37ngIfY2GDrQq2p+ZcOmfZLPC9\r\n5VaMmq/3JrG2et4aySXHdiFdoAYLRzxPx2Um6Y61G6k25+vqTxJLlhgwsYhv\r\npoq/V/FGT6Rvr4p515yOES75iL+oNcc46UNEXuaQuhdJQYdri+D3bED/R/hV\r\nL1XdOJ0/jyyETurQ1OIvOH7+3VsvYu4vR8Qn9a29CEfuWs3xniWsQ+O9vS5Y\r\n/7l5Rm6j6QhK/h6KgB2/ajCvP4yCqmUUxREdKTvwzaWp+eXnfLrsL1rZ1cjy\r\nC/uMyZW8ssUGD+Um22T2dVVFdKRvq8T3wbb0bFsxuK6aoFX7yuh/wTlFgO+X\r\nSjDKcf1/QIdYSaOL9o9TN2UgS4byP8Q4y/zGVkS+qTpV73sWKsWKj0go/PiX\r\nFZjCt14FlejDT4BieMv32gZhExw5hvfCy+B6ZOoauh98kWM3MjI5WppMYE+0\r\nkH1LNQVRaLeENohoEitNqczFVrjN9c2sBMk=\r\n=U7b1\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"fa8a23dea0b9b8aac3bc51bd7124f9bc102977e2","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.12","@apollosproject/apollo-server-env-mock":"^2.46.12"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.12_1648670832616_0.1991748896124219","host":"s3://npm-registry-packages"}},"2.46.13":{"name":"@apollosproject/data-connector-rock","version":"2.46.13","_id":"@apollosproject/data-connector-rock@2.46.13","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"06151170e9661dc14086db71afb6a1ad10764344","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.13.tgz","fileCount":158,"integrity":"sha512-eE2dZNs2e7Ar3iLWc1zHPzf0iUSW2rTouPdlZwiL7YR+9Q8FplBaqRNfNLRrpt0d7+2GVAb1MB4caGLNjUfd+A==","signatures":[{"sig":"MEQCIAtUKbkCVMKQNN3lVC3uVuIIugFXl8J7U+D/pN+84afPAiBphG8SL4u/4CHiEWbkf6ftWmKlWQjh6QFD2AEwyzac7Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1095474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLk4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZdA/9HnSkoD/zg88rVrHa1A4C0jsyHK79vuDTBWL7Vx2F4UWWhSty\r\nSOq1CObJcLxkMK2I35+W/GHQEdyjTpqpaGQj/EpnOSWSG188l4eq2IPd/+l3\r\nsHXiUSMYZWFs1PPHVsT7ep+maZy7wht+qT59GC8hmfwyRz3hJ66THoQyXcMX\r\nnShN+nTVftrmPzGuWgnPBsl+dHin9gsA4OzegFi6vAXJg3510fuL/uaXRbUA\r\nnsJ+sgmd57o/YnOMUiDEz20BNa2xpw1L03xG+lw03r1KgYozS1iGJL2Wf/ky\r\narAgpP5t8P5uQFqo9DENtyPOTJaMnnCv0v7eG2ChTonO0K/yk8MGCkdQAAGR\r\nr9aVCrr9i/B5wBd4T+RHFN4oL85SjFdrviw5WY/ASb077T9jTiwrzLDNpjom\r\n4TtgTPNLI6lhxigqN+ZyXZ9YnVGyrHsJ7yy7NzKpAyfa1kSuz/ZrtQY/2I8G\r\nopdRgOydmTNOcDYhV+tU9TwUMM2mgK80dDSJrBIPdVi5u0vb7BL5+vGNBnze\r\nOI+Yhr3OIejV8bmHefkww3y498qxi3vB132ZSdRTIeLZwv0lthjrce/TpxKw\r\nOr9+lWG8thAqGsVgEaN+2SVHlEbws9U3XacHF9OZl/gSFCRdHWGmg2FqHjS6\r\nfen9oL3cYbnvZHKI0ZV7ee+IZjZ5qJISRGE=\r\n=kMsB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8840495b04613d6e5d609047b8626637c2f38696","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.13","@apollosproject/apollo-server-env-mock":"^2.46.13"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.13_1648671031829_0.5624228618480511","host":"s3://npm-registry-packages"}},"2.46.14":{"name":"@apollosproject/data-connector-rock","version":"2.46.14","_id":"@apollosproject/data-connector-rock@2.46.14","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9fea547c196de5ed4a26325a192a1f8519a89f10","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.14.tgz","fileCount":158,"integrity":"sha512-tB5rBljdEIG2hpasZ3rpjwMkORffprx+HzppFeUF6wr59rtCRlQNEKXZuY6VZbUUJHjU4u3nR8a4SvdEVhoq7g==","signatures":[{"sig":"MEQCICc+ux3drKGRxSo6Tqvo1vVsAb0F8M82QtYUvinaR/J5AiApXt6wjpSW7xX62pYgOvVfZ8nQ0Hjjx7ZEjWLgSlUjOg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1095659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLnsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUhhAAgDZ/TN//j+icuONbTsAI5QJQ7xA07W+5bl/feFQPg8OJhu5e\r\nuhYa4XU1harlRA8p11z0Qh6a4tj9ixu/7Pbf7kk+eGvYcoeM2WUXSyro0d/s\r\n6nWIodUn70aN2X56LjbSKjNFECN0iQTyYzJD90BxrqIazSNeEtLd7fSGZXEq\r\nqOEIEj2F0aeXzMzKFt/I9axH85X9AJRXZMGnDwF9ZcDxlBgMHwhnFruitY0n\r\nZfGaSP6FDVcWZBxgUXj1EiJuPjEpuoEWHt+/e9VbikJJxJgKaVuYfQS0DV96\r\n/sCDc+yPlv+DH3hfYCR8N3VikjPCHTZKLp47m7QX4BlupGG9pwluN85ybxWt\r\ngQAONq/FpZp5T/kUs76nBmELDaEHuBpgow7nZI8A5FSxe6Dt4ZF2vvNhZb/T\r\n4yhDcLECw1Yhcz5G98A+8kFlp9sLSxmVgNpNAeSU6uD7TbA21J8KOS+8aQCM\r\nzXAXSFXbISDaHZlX/eyQnfsk2p44VvuvIKCHcFBhrNgq3UgR3dEp6gZct/pI\r\nA+d/yxyyVbnPfzqK1OSe5fTAu0khS99rVVbV4RUU8A6i+kLt7SwVnaJi59UG\r\nG6VX5dUyrdwX80gozlcaDBTwLbdyKchCUG9xDhO950zGQKP3b5kXQ15abmHm\r\nN9JVJTA4oYXVP1N6yNXdNvGd2Usj7qc6mSk=\r\n=X/On\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"4b7a688d787bd30e60c77ee401af83208f65969d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.14","@apollosproject/apollo-server-env-mock":"^2.46.14"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.14_1648671211883_0.26192689838351435","host":"s3://npm-registry-packages"}},"2.46.15":{"name":"@apollosproject/data-connector-rock","version":"2.46.15","_id":"@apollosproject/data-connector-rock@2.46.15","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"676c331bf08adebeb78b9c97ee25df9faf766b83","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.15.tgz","fileCount":158,"integrity":"sha512-g7FhYY3M3CwprNcDNGeDyhgVOr8S1M9Zv2j+TJvy2KlnOdieHiRhhz7ybs6P3hzBGSyl+2J8mrC/4rC2HDWJ6A==","signatures":[{"sig":"MEQCIFHmk6OIMHujqoSSXTLSsIo2SVXNNV1uCj43TVp1I2zrAiAwlv4pC3zoWPsP6qd/AkrqtgdCi9XVbDDV5pvmFZ/r8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1095844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLqiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvPw//ZQkt8nOhXGkmfJVtcpLRi2L7lJHugkQBh9UeuIlixKKI08NT\r\nT/HvL594YgaM/5TwrWTEHIx5VbEBsIkE6P3oSMFT3ci86Oucr9P9BM6CoMxQ\r\nGTSOJiDpPsg7IOc8yx3muvoXByJvuqMrxIYsWA1XoBFwNdgOx3VX8VgPl3/Z\r\nH7uTc0UXj2xMLxc+Udq5aPutaHRLkU09W/Gl9sey/MgjwzonW+99pYOuUtCL\r\nb2qIQtbL/VaIvxjl6RT6JKjdSTJilg5Buj3nZG41b9ejvHrYdMstcT0mfAwz\r\nQZhteJR0c3kPuUsCZ2cHBje/1D0qLkLyrAA6dwfo5N1SBLfnuL+MR43l0yFf\r\nfVJKdzmDKlgBJNd4E295Q8zbJsZBiR+0uB9N481hjLzJ7dd7fs8V3yWlaf8w\r\nzeUcpUwp3ZKvfvpu43fpwTCbEv/wm6WyqjJ4oDbK2OmaiyQVwRoxdFGZLifH\r\njlSJNmtf2z4IUvlWYwb7JKil3xskwTJ2aoaIfeKn8/xburLeA5vDCQLyJpDs\r\nJ26PYEbs/dWu4RAAw4sybWtgS2lND3j39XZWe5BmPgrVss1i/LUopsPrktyE\r\nizXFnOa6zcEO9BsekPK9u4b954Fu8216C3awO0ZCAXnsgYXtEeHmnyETY9ya\r\nekhw9+Fw3vXMDndvVYZ04rg8IQ7QQ8PIMkg=\r\n=0w6g\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"81e8ccd71efbac06ffad1ff05cc658e54d3c0a52","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.15","@apollosproject/apollo-server-env-mock":"^2.46.15"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.15_1648671393840_0.5442496854812346","host":"s3://npm-registry-packages"}},"2.46.16":{"name":"@apollosproject/data-connector-rock","version":"2.46.16","_id":"@apollosproject/data-connector-rock@2.46.16","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d80ea49c1be65338715b08851f85a8e8c47e4072","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.16.tgz","fileCount":158,"integrity":"sha512-aTIM6+HyDoghJZJYS4qti1DFoG1zeja4y+qEs/NTGPDckPnOBYqUoZOs9BSKZVpncOZZiYxWmkOjU4gmL+ljQg==","signatures":[{"sig":"MEUCIGC8bJVjFgdgpgOAQrrpDB6Wsmrg9XmGHuN2LT99unUWAiEAtYEmPFFGP5nU2jGkCCXWviRbLOp1L/R3ZTWk9s2U+pw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1096029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLtQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFhBAAjgahBPxVxEjGcTtQYcxG1d4MqbgMZ8oq3jAA0J9B6Q86IYr/\r\nCTGfquxmFXh1JbLIKNrcDegXLiNZ3H+OhK+RFCPndZYOJEz3OkH7qwWokH8Y\r\nPfDyezJTFfmpi2YVAcAab3exepIrHRsafcXVWZor1IOzbqc99S538Fapbnd/\r\nf1t2AbiyizLuQMh/b/NteLQeezXy8+PmJpTSbgRhsQe4gIa/7SJZGnNCbzB8\r\n58tPhItr7dnb+f/rYCkSSm/IWpS/u20K9gabX1YKUqckxxZjQkWwJ9BWAQp9\r\n1lkODlQ52ye5KqhnFbhwnhLnYdi05d6zTQQMbRFLvse2zLBorvvFa6BOI5JL\r\nJJ5RyUWxNfvnbYGOsDzmogyYYuE2EYBhK3M9Qg56MrUi69w78R+TJMhYKbqH\r\nvqd2E6HouexI8ZkapYKg93pLyQ0+UInSmZyXvi4DloFWKnfb0SHm55nS8Hwp\r\nAsMDiWJE8+B5PprpFvpQDvuQtk2pMx3HPo/Fe4FJTIPvIouJFvN6z7RyYPH/\r\n6Gxa+CYYffI0IQWLhFmiDVrYswgfcVgfCzUHShChZhIacmbp84pWHTaBpqp2\r\n3HChTAE7yISPoG/FAcGl7t+rbOrLEXw0qoeq9qNxNP3F0I9hvM0nmwpz9Wkq\r\nt9nt6fyYQzK+6MCRW26ceTVrbBCgZxLM9MA=\r\n=9aGN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"01ba076f1a3a4dbd8f845da31249ca0a11b6dd7d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.16","@apollosproject/apollo-server-env-mock":"^2.46.16"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.16_1648671568213_0.9425353456188692","host":"s3://npm-registry-packages"}},"2.46.17":{"name":"@apollosproject/data-connector-rock","version":"2.46.17","_id":"@apollosproject/data-connector-rock@2.46.17","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"fe00d4510e0b309e8a5ed90106ee9fec33590142","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.17.tgz","fileCount":158,"integrity":"sha512-nB9QRlvfEGSRTj+tDB86WD3AOm1+WO/rVDBsG/BoowNZ1kose0UfxPd+B1YCrdD7VQC3/OrtDVrOPf+VmQSG5w==","signatures":[{"sig":"MEYCIQCYwpB4xnL0vTWQqqxauRndR17Xr0H62LiaJpnLUAmY4AIhAIZe60n2dynyJNvYFyJFE2mlFm6RyEcq7OsQ2RgBvucG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1096214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLw3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPyQ/9F/YTJslFzuBhHZzFBfRxoFCi2+W9hioQq3/MyvsQWWFu4Qsv\r\n10kWJXuX/Xm/ejZH8lBg005b3kjbQrCFTAcBaGMRMF4JYOIKNGUG7yKnreyE\r\nfFhWaNh7iB0ovTr57whRokNG7x4eczDHMI+Itf+ZInW24ca5kZBYOGnbI1ON\r\njlQZQLBV39MHfQDhjsFmA9CyJHM447yti0lWIZEjs5y0GH2havCkY5Y0eIMb\r\n2sVn1DHmGrzXhvWFpimoeEEn+u2H9/u/+GxG1bAeRxmsJE0BlJUA7ZEhTs2p\r\n9GF6U9msg4IJUPvBi1BooShDvhqncn/Co5TMnqzwmZECLL9SbkEfuBHGcfA/\r\nCLeDeYjIsU/Wn9vl/GARHVGJ1x3VhgwG814cJroL6+QNXIX/p6I7De/k9pY0\r\np809CNRKbNzL/z9mtMgM9lGUxP+u9GVUbs1yDVdcPtIW+yBmTME+EW7wgfvp\r\nE9QvoW4KqCjDu8CSKo1R4VrtBVMvrgsI4t5/mq7UkyCfcNgKfycni3t9hm3s\r\nRxitcmH68IrfoVPRObQBheLC28LbkmdJoZEcOEmAM5pv5kyBtZL52Sc4ORTn\r\nEeJXmtJrxyHgRx4tyyMfQGBFP4eZAdi7ySeBBGq6YGVQ0Rh2KO2YweaD9kny\r\n4Sro5oZuy1BW8G5aWdzrpyXLGyW2SMlIfWs=\r\n=kLXS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"e1b5312728d9219120fc8db06184cd3c94b338dc","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.17","@apollosproject/apollo-server-env-mock":"^2.46.17"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.17_1648671798981_0.5784826074155422","host":"s3://npm-registry-packages"}},"2.46.18":{"name":"@apollosproject/data-connector-rock","version":"2.46.18","_id":"@apollosproject/data-connector-rock@2.46.18","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"15f125bbd1f65a4c5d64f4ed207ab8b0877686f3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.18.tgz","fileCount":158,"integrity":"sha512-nipZv27o+tEQsA1GLmMs5+NhAUBe7Jkdpz8r5S1YFu2rT9eBbX3akxsE66yQlhMMYa+h2E73hl3jZWgPfte1YA==","signatures":[{"sig":"MEQCIC3eOMUwjwOcBP/60Ubu5fHXSXa+ablNhA3d/8/VFJnMAiBuM1stqkJ0KV+eQjMV5PZ94A2MfBfspM2CP1rWcj7l8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1096399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRLzcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmquKBAAorVWUVeCCRXYAK9qNfE4mHHlhoUtTnwd9Ocd8zWpglfWKhMq\r\nWezFzA2nnxH4FMWZim8ftZo6TR8S00MpYtQBUd5JtYi0CvMoAQ1YL4e2L1f1\r\ngzC5kwxaQmhuDxoLw9B9kk5S0hknLCTEXTs9hEVmGkxJlBEPOy88nMEZAaSI\r\n0nvNa/mNfvQEXXLZY1XyeAGnLuuocIJ5UKwCsY2fXszS7IRf7AuxpS1D681N\r\n59red9H4YjFXsssEeaxyNNplik9jfWEji5x4ZSy4dwjOOFWBZ3DzsLDypCT9\r\nhdVEksDE4uP7iBZBYpDwgKfzcjixbJC0UOZU6INrLrvNLJpHZ9F0X/55DDSh\r\niserihtiQNASXWfnxsW84U06P034tH77C98FP8km5iIUpyYRRrQ1nRGvgtFx\r\npQMLy4g+YgdOz1ETu5bLv8MCG7MXOEQKCrYQzdyezm/9lCEhVX5Vbk58BZVy\r\nT21Hn3PQTzrf4JxCZYk8S7jA7oy0eFG6Ic0Bc3IiVgPqfKbnS6mehQUaAnft\r\nQY7JexSGjT6OcB2w/+nPksnPqwNyrXXg3OTXvmbmLs68zqnqTlzrGmR9m1s1\r\nZXqMMiOyWRE/ZQRHZXorM03/K2GZLaFNHoZSi0zA06qRDD98IHhebIL4gOVP\r\nR0DSekvtxMwcoCzPVFELBc2sKJ5jrC4yevs=\r\n=FKlp\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"33d4839ca5f9b235c3ed7a62a4b0d4705fedf82d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.18","@apollosproject/apollo-server-env-mock":"^2.46.18"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.18_1648671964702_0.14994004132985417","host":"s3://npm-registry-packages"}},"2.46.19":{"name":"@apollosproject/data-connector-rock","version":"2.46.19","_id":"@apollosproject/data-connector-rock@2.46.19","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"4637a58c6e053bb5e5544f60f8d82d83e12ba589","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.19.tgz","fileCount":158,"integrity":"sha512-Q0SzsTpdpXn1gWY/PnYtRMDcUiZdidjCLX8ML7jlUo6KIB1iiGNXT1wQahSOUJBlKO5s2hH+rWs0IIgb/csVGA==","signatures":[{"sig":"MEUCIEbPM1JT8zUxfw8ylxnBVwgaY7XH1FkKx6UWlyh9OiFCAiEAjMDyjrHtuPstzMjxUBKQUPz0RKtYu23kNH1Pahipi88=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1096584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRL2IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCYA//QEYPOD1dbYpYNnKsW/xjV2ic6TcgOFgm2eaTWAw4lEF2GiT2\r\n/QQeT24BIMu+KOmov1tQfCcUpPN7ugjbX52rkUUxN5VyVtqLCWFw/rd/i0uC\r\n9iGit8qKqEN3JFQaLxEe5P60pWKU0A6XMwxfRbgKxwWw+HBrF6qg8XGGJYt7\r\nzrfeSrG4LRKYcN9/8NoxbL2NslKIcCnb2b2K5mOIeWGrD6f04MBhsm5JfZSu\r\nFEsLfVzX+SBQaWBDTmzX6PpUMnXPsPpX5xAXwWpngQa4KFx3fLeegeUcimnU\r\ngbi/xrhQmzb1vo6DrImNqQp38CZsX3K0ZeFMFazaAkwMZ86aJU0qJ18mP/uD\r\nqN1c3ikCl7Sq0xhb4vE9L3QNcCyHhD1BX68Ab8OCqLG0hU3xpXxY2TLhNLok\r\nhvGasmB4KWwR2nDgnC4JJv/a6XFVlU63WgDj8S3fIzKMgTQcIbQ6yUfRQtxj\r\ntjWYB49B7WkMHgcT6y4SF5nlATCnySjKt257zaIOMNjnvwJKnwzboEiQY9YN\r\n/zyhPezM2zDasoS92Hnh7Ey/QjO0NhLSB1gnYjuwhA5MLV327Xv+bMDvnPkx\r\nEH8rGQuhYr35R4AXSpd0JiHC55RamTxEemIptttZ7xP/pR2kc6npA3TN0bPo\r\n1srfN89cea6Gy8pjyp8u5u1eYhbhod4caYA=\r\n=fs/x\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"6099a0d7109442204c22fb6c21ce58a34107e223","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.19","@apollosproject/apollo-server-env-mock":"^2.46.19"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.19_1648672136182_0.3968624444321196","host":"s3://npm-registry-packages"}},"2.46.20":{"name":"@apollosproject/data-connector-rock","version":"2.46.20","_id":"@apollosproject/data-connector-rock@2.46.20","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"64c2d316113091de08109e3633ced4bd55e8019f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.20.tgz","fileCount":158,"integrity":"sha512-epsnLZ024zZH91jYEsEx3SbPk6Zb8HgsJlLR7qlN2kEdA2W+bAxFQ4ckP7MDpkfdJ21VpCI73jw8SxRWEMsFZw==","signatures":[{"sig":"MEQCIHeHapNKQ/QyvygrYWMjR90ndhlkCBVFcV5aFPgIdRlqAiBm5T3QG9jOUeiYXwiKvuwJC/HMdxlLcoRVXvevCELx/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1096769,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRL5ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrkjxAAmPoabEojOHWo8ZBnVYJbVVjulJoNGiLgoJCjTHSdJu5U77dK\r\naXa6sbYzdN6QW87thQQeQowcKntELr/1mDg7e+KARmWCL8cdwtI0DCTJCZ4x\r\nZYzSoPyqFTdc9ZJqPRjyEfjIqcX9z1ZUm2NXcLZtNDklyrbVMAsM2nqteRnK\r\npnPUL+gNrk9c8AFvQ8sNq80MdzGDaRVxC6mzd12sX0H06Odw/4jl5PzQ7Z5A\r\nSS5vfFowAzq2cL/5nntdIW3V3P1gzRYFM/Bkclr9FCmjPtGpuzDQruPoi7Kg\r\nkH/GE7hFqiJDfKpNcEV3Gx86z82D8/EJJZv1Tm+AQAxNB7S+qDneZVeNAMvH\r\nb9guRFhcjcLiBp7Dv+uVmU6XypHplN7qP6m1o4Fs2gEziWWU5epBSZsDpl9/\r\nKG4dP2ItDF2aTTkuXybZfQheb7eU0OTE0om6re+39ZaBDhuoGR3NFOeQAunD\r\npdyuIXSg2DKt9FElDyQYUKRPDaVoqvOC4RR4av1Ti1hCTw1GVavb9qbsFHYd\r\ndcWf+x1Za15VRlD0becub5rUJ+qkFV7rn/fu1vYd5362ltrnjA/0azFqgGGz\r\nevy/7ivxLxMaPnex+z3BKiGNPYxkmr+zWglMDbwhAv/uQUMtlEdX7GixGHC6\r\nKUHmFjqMtHPHcrJW3OcL8DlE8a+mXsIMVWg=\r\n=Vi4e\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"1b3801532001d82f81bcd9284f3bd45883a2c0ad","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.20","@apollosproject/apollo-server-env-mock":"^2.46.20"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.20_1648672345548_0.06417011614088808","host":"s3://npm-registry-packages"}},"2.46.21":{"name":"@apollosproject/data-connector-rock","version":"2.46.21","_id":"@apollosproject/data-connector-rock@2.46.21","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"42c323be10f76e289d8141c5daca91c46e6425ab","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.21.tgz","fileCount":158,"integrity":"sha512-p36ySmWKQe96xyxeNMYGpW9GvcjEnp3nSWZa30jwS9gLXYMi0deymAIDVu5/YloAHhsPuCX0WapfwZH5BjmgaA==","signatures":[{"sig":"MEQCIDTytBPFfgZTSSAJqsw3u+gROxjuH/5khOFnStmBUputAiBk730z18iv8seOWXI++2ocTkdvXqDHtS4jnHi8ZNEalg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1096954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRL9RACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDXBAAhriPwslp4m6/T2GgsCQ4EY7HXl0V8K0D5ShWc8r4TvfAZgz9\r\nhKeOp4y0HzAPzhJJ9tcP6OkcHnEpf+gYswqnr+628EcIsgxSzk6HC5IycCBZ\r\n9ECIAnDSJ1IjtVLU4GCDda9igUGN48voabN41UMuUuyIZmOVlkfHLEccMYJL\r\n3ui9j+sjFAdOq1MGPGxRRTCLNa9afne6aFQGFzEoGKKUZCR8SoT2nxthLNpG\r\nqPHY0x/b5JW64YyIvdxXzXNOlKmXIWvISzSSMUsRQQRyLi2MIMO0Eur6D6hp\r\nQVEC9hu4FiGOG9kN7KrvNo8WBcc521XqfEz1lzB2OFTf5N9H3yVSj6NWYpju\r\nFblpTeK/0HG0/lzAC2CIq7dtTix5yZDAJdaHMt7v9IO/ddu5msUZNmTLtBWd\r\ns39s6qyAlSgVaYlXkTfgmPI5mV2sRiXgOK+NE8q4o0mGFttmZru+h8KLF14Q\r\nvzk6Xcjh8O/p2OVkQ0F0dtMt4z4oIa0iDC7DweR4qzo4kODYFhDFaKTVN81K\r\nWzecKvGFHvBjrcEy3NeBW/oj1dobxs4rT5HJ42X+stdPysDnVm+FnZ1bwj5E\r\n55PBI5Kkq1R4Tbsx/7uKVsF4QpdaT/PpFYfEeFFSymR4ZZzquK33dQv/IWEM\r\nNsHbpQg6RH1S4cpqhvwxUYFG2ikINATAajY=\r\n=Xz0l\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"ef31e18fd365cd07afca135b79aa2d2d7c36910b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.21","@apollosproject/apollo-server-env-mock":"^2.46.21"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.21_1648672593502_0.22028226533984507","host":"s3://npm-registry-packages"}},"2.46.22":{"name":"@apollosproject/data-connector-rock","version":"2.46.22","_id":"@apollosproject/data-connector-rock@2.46.22","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0d8e1ed2cb67869aecfc6201e7ab24a3ebca8fbd","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.22.tgz","fileCount":158,"integrity":"sha512-JghBk6OcSa417Q3lQvsi2w1uwGIxyLyBwQ4HGKn0vcX3YKxPegt1vjO0wq0bkzU+J7q97VCMEjG5YwFec7eTiQ==","signatures":[{"sig":"MEUCIHBbO/ychzN6F/43ZrrPgmC1kWYvGnlKrWl8ue1dlyjYAiEA+vzniTTWRSinxF7aAcwbLtMkshXzrmip2Hh2iDKYtEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1097139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRL//ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3yg/+P+rlp5cJw6ELNg7lIm/mtpL60lW6RD7STnTJA7L45kPO2Bua\r\nTkSBWI9xu7AC6EykKEkNBd1xwROWkR3tNmM2xvtXE3k2kXLLAmGPjMwQY9NM\r\nxeAVm4E4Wzgb1Wxtk9vM6RSkOrST0X58NGPO9Rx+V5oubbaDxzZOlw0FIlzd\r\nHg1aDM0ZojqAVv0uXWF8rgDKrNGpnwBy6j02Z+uDNxm9pjGJJzhA4QIfDRoW\r\nrMMo7Xzpz50EF8c1gBoNDjl3HPelFfjUqt6ag7QpgBnXw9m1o2y4n+G7kT13\r\n3TCSwUTsCjkDlHVtIR2/oSsalLRsxlBFROYgqFhGggkCHZcpnFK3qVdhbtfG\r\nT5yN5PkgLOwUuUTtR8aD0OXb9R7V7ATFKHz2HIS+YbOiu6IMZIz9YmnX/OgL\r\n6I5B5XpQbSdRVkd3X8+tFD87js9/8dHnNDxv+e7hLeCH2C3opsVuWZ8ahe6f\r\nWQh8a0xGdJF2mOWU6z5L1jF+td+Q84Y+tr07I9JsVtfRTLXo02wQpwdMWG3e\r\n0ArurJmxbgrVM7FD46kb80/CDK1mo8lQ4E0pL+vVgvGM++W6W66gvOqevwR3\r\nqtvIkY+ILwNFc6HQVhjolwNO1Q9ZWCi492PFX0gd2J3MWvlJSThJw99MHKAm\r\nyW6GcJIhNXfErR3fInyDHqwtDYJ2VFP59lg=\r\n=A6HD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"28f340d4aece9e5c5d1931c477248fe9b4989c68","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.22","@apollosproject/apollo-server-env-mock":"^2.46.22"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.22_1648672767302_0.03557988578761018","host":"s3://npm-registry-packages"}},"2.46.23":{"name":"@apollosproject/data-connector-rock","version":"2.46.23","_id":"@apollosproject/data-connector-rock@2.46.23","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"94e14e01221864137fdc2d8a608762f10b036631","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.23.tgz","fileCount":158,"integrity":"sha512-JpAE3EbhY8OxaKVX5rLkUP+2NRcrPE+veUOyMiisPtBk++gft/uxZlyCoCKGCOJlJhhdEFOj/oWXNWKHrmZrCQ==","signatures":[{"sig":"MEUCICX5mUHxPZZ9LpO1w1brkwtYwDQ+ESUAAfwASiO4nXcDAiEA9neeLnAB5aRxj8txx65/MUp9sifRgKfKWAtEi0QjVFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1097324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMDXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqY3g/9HRLhwoJXrzjZgrMWZ6Sg5Vxqe0/LIeE/fRV7pvWV5qqD27XP\r\nlhPhy4GJIemuXRTd8Gnq1Fgo00bcXQBit/3VjwOPk2RkhH7zOzDjlmUYi+yv\r\nZUsyXhbyZf5O2/9Y83zIk8HoMdrTnGiz0uNQonAZHFrEYqtRJpQ5TYBeibmO\r\n2313WRHaTHqiWeyqLGD9ng0JBPxdiEEJrNxVw3+unKdf5xx9emHiD0txoBNg\r\nhHwbksP2yoJ/uaMF8MYKt6ZYpiQGFXfCv3bLpa3vJBHYJVTOI9mfAW/3VqOy\r\nxJKgQLIo8uvm+lAKx9nwmW9Od3RvydhMRxJlKu3FnGLj/pI8XDZDovGqTFj7\r\nUGHbUkVVXdWJJcCux9MB+2BIkd/GxxGQ/JovcQDeEd1J3WzMOZVyK/z6N2YR\r\nsO7bPba6xtaKbdIXMLZ/INcXDN1ckaf6tCdVaJs471HsQvb1mauOVOGLX+o1\r\nR0/WBD5FsdJ5c0jbA/aIirBElvB5wRpH86tvS5ih+WxrDJE6GpY9PWYM3MEQ\r\nXEPnCYZbJ3+8knpHO9dQsfsTcOu1B/iOF+aioa/6RMnptjhfcHrqBSGaULlJ\r\nWLraNdEULOGJ53nxF2MjXTW10OKscnTmgKwpPssNP9/gN/0NAy0v9k2+yS/P\r\n5r3eGOJ7B3+2LRx3//W1t6I7fg9kXwsVJuo=\r\n=m6SG\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"815df524cba010a1b45917d1cdf98793361267aa","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.23","@apollosproject/apollo-server-env-mock":"^2.46.23"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.23_1648672983132_0.4514190336067465","host":"s3://npm-registry-packages"}},"2.46.24":{"name":"@apollosproject/data-connector-rock","version":"2.46.24","_id":"@apollosproject/data-connector-rock@2.46.24","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7a258048f0502a4ec209328e65eade21adf9e1e2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.24.tgz","fileCount":158,"integrity":"sha512-PL7PbVxMxYBNBswkzpEwJeEqoAxYUO1xuZQ8B5MJE+mvE54/mDOQ7jPzFbVWHLYzrJIx6WcZCi+KwLVNgiGEYw==","signatures":[{"sig":"MEUCIE0s1+xvjTkDDDuHxdI7ZROL/0s8LOoJZ5oBYcQQwQfMAiEA8LT+yyPVqMhnZr5zGfoFX4pqUbPzOxDPfaPyihqiFFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1097509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMF4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNdA//T0f6f+CMGR9z1JUxUeu0BJhQ6IRk+tWeQlnkZ8PaPY+k7Eu2\r\nnCS3/MvXffN3WPBjxE80tl4i+xCuj8wxdlSQh1j5DCXVyp6h057W6IouOkA8\r\nAtk2Ie8ascsFELDJSOUSw9X8EvTitldAbBwmyI2gfesNxVE+VmhP0q83z7J0\r\nAgZk89jS33ZWrjSyESulDP9RfP8ezpzhBSiHnQrBbTTku0kaiVJrLCzVZIPE\r\nrK4o9ZJobQ4x/yytu1ETyVdkM4dPMcJQAwwmM9OpU6DPPHFRHJ/Kmkiz0ftF\r\njw4BKf5NnMS/yDgJAxCI8c8qza0T0nquZcEpU5qnEDGF08LxFZmHY7h2xQqT\r\ni7XUibBtTtsjl7KT56FlJcQNZ2CESyj647C3wrfBi6IZ3Uv1Lh5ObF/CB55x\r\nuK5YLgkJY7J9rI1XWatzywWCZNTXjF84I30EmJ+qwVknUmTTKLI4lfI6QNUg\r\n7GWutmhzjvHWfe4EPxOC7MAlGj/68O89039k4FUugt/cJuI39GBsAwdsFA81\r\ng3k01bU8R6vWQPIANw4cgbrsWL/4+sRyl5dRsSGqr03rWNopLj4GLFWuY57o\r\nzzHRZQ1iLviARhGnLCjG+4Kmp/oIov/x+8lNmB2uUgnD97kprx1YKu5dlfuE\r\nKknNHvemKzDLvgvZKshFuD2VZH7qtvYVndM=\r\n=rybB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"18407b6418215d2cd9ee12a2101a58aacdf441cb","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.24","@apollosproject/apollo-server-env-mock":"^2.46.24"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.24_1648673144453_0.569907603889207","host":"s3://npm-registry-packages"}},"2.46.25":{"name":"@apollosproject/data-connector-rock","version":"2.46.25","_id":"@apollosproject/data-connector-rock@2.46.25","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"666aea254e3157fe936385e86f62d9c13749a590","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.25.tgz","fileCount":158,"integrity":"sha512-yj0evVgooxfKk9P+SAU5qdjYXOtoho5sPZsqjNe8Vz75FfjGVGAUnSg01KBKYfJcMLcflBBRa1u1+/QpnsNoZw==","signatures":[{"sig":"MEUCIQCuBDNilAMZJQR6oSFW13vulch0skcFlnmMWGFr5KdRFgIgEKXxk8CTMJHQEBYQ2j27wyjFdujG7OkJ1UTHMCfuGiQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1097694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMIyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrcTw//UzFifGM7sckeyukK6auckV0U9WdbdhxSTYXXqC95MyWD0Nim\r\n+PSclMNRDT3Gs3VyVlfK+bax0/G6H/vMeur2Wnk3oKwzKoRjWA33fnC/eg9q\r\nqFJgzxVt7DmGqhvbqXWq4pnXTloBhcn/u0J4PQTx1PxDLmbxhZcsSx6HqHwQ\r\nYYlfsW9A8GTk39LM+wjC/qHnMO4yY3GqzPpRWyVttK8k/thw0sLe868CIdcy\r\nQPVwVwwxeczv9rgItiBs0VMQ6h8JpeqzJzx3UoSY7NdBkajIx0Q5UKYbJpnb\r\nw9WfjbM0lZ+azpDOPbbb+aPacgx2EHCRMLRnY6YnZKIDnT8m+SsUYXHAgZ11\r\n/NhkdmXNkCaJqVJaGGodhdMpU/W5Lk4nq0esy0n83wvbkty31Zqz4yqeHwmY\r\nPuqqN5EI55bTfAKScjqpulHWOMdm2j8adMsYvxfzp3p09MuWbDj2YdoWl4nJ\r\nl6hzhvhm6cR1Z7ehGx853gEErOoqUDHTd+g06tQ/PZ1CXALAKNO6/TkL/Sfw\r\neNYB8DJz3u4wT6An01yPMskxCLOlzVv+jEeQaNR56l+87sbhH80T9TElSin/\r\nPSsTvVFqQkDHzK7J+wRU8cvLNXDzh9XwgbuJPZfyjyGPlGFZFOj/leB3lUKZ\r\nMSsp4dl83GxAtoYDbUjqtbKuXNFE9iIUJq0=\r\n=kTQg\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"a89fa6e3fd3ba4a959a33f8733d9cc917654dfe5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.25","@apollosproject/apollo-server-env-mock":"^2.46.25"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.25_1648673330135_0.8087610418484315","host":"s3://npm-registry-packages"}},"2.46.26":{"name":"@apollosproject/data-connector-rock","version":"2.46.26","_id":"@apollosproject/data-connector-rock@2.46.26","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"87323117fdffd4a477a52f7a0861d88e89bfa4fa","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.26.tgz","fileCount":158,"integrity":"sha512-HLoH0VgEJCmPhv8f5VmF4e2ftR3+xuUIm/81PkoBxqDFqQoCmot8HLmficLictmBwWpmpNR2AQz/ie6dwPewzA==","signatures":[{"sig":"MEYCIQCBEPxs69JHNx/nTyj3HvIOiCaq6VaPa9MSC2bZXsrqvAIhAP0hkbB7YrdPIwY6g2NPAsl9S4gjNFusimpGw/wz/IxL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1097879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRML4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpjhw//fybokHN0QglCvUnriRx+bdmz4ez2pSj6GZvtu40ym2mhvBZZ\r\n8JyDx5C6wUzP8qILahiUxjmGpc5oHDWhmUzDM76MWW//JUzLE/fxdUDgU4Du\r\nmZFCVMQ9deH3e91dvdNUuWK1yfCCovdiWU82b9O5ZMSXWVBcWJ2GeW0I7zip\r\n4CVAkWYHBNfzKidqiDwoXNhYal3M9z+Q4ml16dzVow6c739oElxLloD8oilS\r\ntFfW1PT2oUuJYwnSGUH2r9E0/NR9M8x6fMgzehl8otpdBwGbcoyfnAIF5NAY\r\n5OfQbH5+xfrp2juIphR0aztMt9qbcReJ95jhpTQ87RDkJbUY64FEP1aP1bnh\r\nOhALPnk5lUObjZ4MNmQV9zmF0XxWFNmFlApeW3Ty8vNz529EFv9IqEp7O5iN\r\nWzMIIVmdzWPf1IMwbjMf8TCVT8Vs+G+tjKEKTiGgpE37Y0GeMrgtyTGcIoII\r\nbmurIRiK3+9w/hZNpkUhNC2eNGaVWUoGTMYPE/RGHyMY8maIL9idinA8+nzO\r\nrY0JvspNwVkHQ4wRlrxOOa/kzBtbEjlTwH+aQDhDuU1e6Qvpa0Cw6kLkq4N5\r\nEIuZK/10qzUJW37bgHg73PDy/Jhpeszz21MvAe6uBVUUQ9em53iB9/BERKsf\r\n63snebNMnADvsu0gZktAUMrjPMz9PtOh5Pg=\r\n=PREh\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"12bf685484c50d48f34459f103546693ffb0e727","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.26","@apollosproject/apollo-server-env-mock":"^2.46.26"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.26_1648673528247_0.28547287216715334","host":"s3://npm-registry-packages"}},"2.46.27":{"name":"@apollosproject/data-connector-rock","version":"2.46.27","_id":"@apollosproject/data-connector-rock@2.46.27","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"501938957167328163305a6dea3178080c484708","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.27.tgz","fileCount":158,"integrity":"sha512-9fL9XciAqp9KyxRO6GV3eeoKyItZlqjdu3DxT2lnERro0f+i9VmIsUzFAZdGZHqr4rPZ3XPqjr0d6+or4vzbig==","signatures":[{"sig":"MEUCIQDIhrEJJ3ew0uVoy5xXlEgdeQgCScdNE9YTWqYmigFvYgIgPgVJCzVTL6PkRxAqQYLPvHj+vgXCZB4y/wCrLBjjYbU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1098064,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMOhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/LQ/9ESEj0ZFP3aLkKRD1SJLu4FxyMOQml9GjjelkuXTJ7E2H7e79\r\nEVfiXwlPHccjm1U2Cu3mllH2E0RrAKR9+PyrVXOp3qfBFYlx605fy22+hUHr\r\n6ughEk/AsfrkFKCdgUsbiyffjcObEw6c3Gy0lIijwz0zZFIu6rsrRGfWofkm\r\nYJa23Wqp0FqE8eBnwhKBFasVJiiv9PmaOO8NBH+Z8HjE0YH00zewGjL851uV\r\nDl1CN36A88R/bRsZoFnU7f152vLxQe6Okb3SaoNsRex3bn3gV8+a9iMz0BJi\r\n48Kw2jyJcmOCEioxzkPgmuPZRjlqcGg2ji9GhNNK5MjCiNH6gNFIB+KwMaUQ\r\nz03tDD2amU2Ck4V9foRLabtsGixVPyPUOL6tOrLzYvXWfOlipNoOQ0MvFVNy\r\nUvaPzl9jPvUz6gtAnaSR13wfxXNRXOZ7mkPD8kUze/JldiPOcWCzY+Rfsh3J\r\n6XN/DjFqiSnDscT3U+3Y5a0zpUp9C/sEIe5gZDkAZ47inDK7j/URKwUmZTQq\r\nGxnSRKK7PlJsj6SYoGcUfV2uxWzVb8kzmesFojod94YKmYU2QLBZRz/dar4f\r\nArFIkBcW+2oE+wgwRuJybjwkASnbVbL9DwmMLOojR8BUz1Iw8hCkKSu5nFE9\r\nmHhg78xlWyOxCGCcQTMI1DojgyN05IogdvU=\r\n=wQnR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"677abc77d680411d8c485c50f0ece97d2d032d80","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.27","@apollosproject/apollo-server-env-mock":"^2.46.27"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.27_1648673697561_0.7055381696797836","host":"s3://npm-registry-packages"}},"2.46.28":{"name":"@apollosproject/data-connector-rock","version":"2.46.28","_id":"@apollosproject/data-connector-rock@2.46.28","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"4f13bc521bd75479d2bc3041314eabe064c27ffa","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.28.tgz","fileCount":158,"integrity":"sha512-45bX+1wvyNmvs4GOZSVaAsh+81Fsin0FwqQufp8Fi2TjQ7jTUEFjeURUNMxU4V+jhsd7X6gE7zf/4xsW23mr/Q==","signatures":[{"sig":"MEYCIQDZbAIn/ssn4TYznSChlkaPzbpEawBiLl5TGo2p0HGtLQIhAM6WAhan3Ryny81N4a5dQh+Uyga4ztenR7GRBUitgR9M","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1098249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMSMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0whAAhMDdJ3uZdooQwtd8m5uBfekhuLohTPywPY02mON1zFoukPI1\r\nke92ON/IiuXL3W4NAkINmtWF1ZpdFGaXm4OS4SE3eRJvuHeGxFAh6pwhmaHv\r\nV0U4HpJTclczKQO3TcYEksw8PD61xi4DXLNMSo1wk2alSK8yqU7Ylc+iCETy\r\nUGfec7brTxzOEuypKjkElKwSJk5+rsNkWjMzpgrD5E5QmGcz+Gf7OUm51qPI\r\n9uCAZpj8AeKib72vSJSWvSUUbiolHREGOeW5w3zU6b2tq5FsSd/m1c59Fidd\r\npXQ5C3iiAtPEP+lEsUYBePWxwQOguI+jubJF430tX+oFK3jaOcgmyVOE9Yiw\r\nZTbWUr2/aaCNF5GXH7e/x+zc8q68CXB0/v111hbKbCfF5nbd2PAa3FRct3Qt\r\nzoVSyrBytz7yeEN6rOsR5n9R1p1fq0C7pw1m7HYHfdNanVDoKRpckevfJsx4\r\nkmnaGsmTKinblEQril3Cz7TPic0VAFKrrhwwTY0pYExMJy6KBVEZi+t8tsOE\r\nukJM74TbAl1eGLJcFR/AD0xh0VKsjYbaOW97qL838DbHLo3dxXGQtvGVNkU6\r\nC4jg2bXArdLQjSEM1U7fkDp4UQh7aJkksyF+ixq1Rl9QCxzp5kOWSEUEKzTG\r\nrHL/9GJnIP+347Qnbq7vRRyIeJAi09/f0WY=\r\n=NdJu\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"5498b1c65bf9e78b54c04faf326fd513a0071417","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.28","@apollosproject/apollo-server-env-mock":"^2.46.28"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.28_1648673932407_0.7479347865581232","host":"s3://npm-registry-packages"}},"2.46.29":{"name":"@apollosproject/data-connector-rock","version":"2.46.29","_id":"@apollosproject/data-connector-rock@2.46.29","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b535390d63f254ff4ffd9f3fc9026d184f0b09d3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.29.tgz","fileCount":158,"integrity":"sha512-GqHwk8Repj0P53jjvZ1ciPUlRyRhtpbDyyDzouRQ3SoZl3w7pMj0AZbUzrzWgFtFNu9uDP4XjIUZVxMs3QrpiA==","signatures":[{"sig":"MEYCIQDy7YCQ2/J2hKAyzYLZwF3iAWv5WToWvQappiv//hzt3QIhAOeEdhNnB0q4eq25UdxKvXnceMXJT5tlhUgQYzEQp8iB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1098434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMUtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTXhAAhbNFNyNqXFHIzV19S4RrCd3hz8R7MfoZMeesOAyi/4k/YHKP\r\n29Ynh7ljMv0Mxrh/52iVtF1COnQcbNptTjy4AHfDSsExUnDMnkfqwxIq5PeG\r\nm47KKtYzhM0KsBt8CFrN2zxWSoWVNJpcLpvBGSA8dMBT0+HTGEe+r/76iL+z\r\nwKmI+5HJBJqDrRNE+/BtMgVmGsh1wncKkF3jSxaywO7ZS1nyszDRtw8Lel06\r\nuEyCLUA20AWb4CqlZwQS6rkJ/Kv0xay3ikZjXqYFL6YJb1Z8a2JbtBLXDR2c\r\nk/wEnPRTPh/thjhMnUGnzk20xh3RPyG7YrZyUaM+GME3GAA1x4q9mC+QOJHq\r\nlV7axr1LFAAOmDpUXpiaUocACQk+bpVUoiUvCBQJ6k62sPp9+zRcPMYftzlG\r\nSCjtF4kjFLZCRS2naiQNP9XSLHs6e15h4C0kqM7eShN7qI27rzh5s2Ud0HBP\r\nK0VmESokUVDrOdcA1Xa/BhwyRrsyKfP5zYwa9qdDb/VTQAcSoKIuOWzsmO+i\r\nq7OSL4q2QrRwJyf4mFXIns7pVUjNncNNp6ApgQuY736mSPVM52v8s4ntET27\r\ndFGDqcKYEP9by+Wpw5zFL8EjVXO+tTJXX+mKuUizgTkdw69XKliYHwc4ivzK\r\n9KJHMuu+58otdCXLcIu84it3LdxukphsNfk=\r\n=RYL0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"67f3603a7027e50135bdc89bde4336edfee7c487","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.29","@apollosproject/apollo-server-env-mock":"^2.46.29"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.29_1648674093442_0.22373135192602223","host":"s3://npm-registry-packages"}},"2.46.30":{"name":"@apollosproject/data-connector-rock","version":"2.46.30","_id":"@apollosproject/data-connector-rock@2.46.30","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f04a42862eeb963ddb2d3c89eb4602bb4ad260a3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.30.tgz","fileCount":158,"integrity":"sha512-agcI5+n19361eo4/+q4pQiTVs5FTWJWR7L1nmZmwXaDh4cKr67cjcQuNrr25hPCQERPi+jMnD4Q+LSdysmGOTw==","signatures":[{"sig":"MEYCIQCR04ag1WQSXKQI0lOwgXY+G5FOyhE2faxLaYCQlKaCeQIhAP5n2/09GiQDF+GJ0xzzHBT/eQs4B6OvVW3JDywHaEaa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1098619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMX9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpi2xAAlSzzEi4MGKwaHZNu58DLHJ3CSXea5TRIwP8L5FSrblZwbSkA\r\ntfa5wUQEEahOMOx70HQcyqAi/sS8O65u8pWRVy60uEEKdW0Gxt1r0rGc0MN2\r\nBaaD5J4r6ZxbSD9RAhHyO7+ecIwwbRQJK3JaSktCVOoxGjroPy53XgT331g3\r\nYjsjZLeWKNzSfPsIk3ttBPcKROZ80/ofpmpdNAAD0vF0bGU6/XEnXjWXXVHl\r\nUFU47+xZQWdJecDYVv8KaeUJslZ+xjP4e8/4Q8YLI+Jy1s+o5YPhu7Dtvb5Z\r\nWj30tP301faYWB3q2AmsdmbgTQF5fscFQ1JZfgoP6cO3BA1M8c3F1//I/MNY\r\nwlzwSqIdcb4ttrVCvtPtKTK2aq/86b8gJOgd8PLiywo81mrfqaV9mQKVPVzY\r\n28Y8wdh8ZpQQyw1X7FsqLLZiCFgsEP02PEe7TmdOSfgCjwpCnbe07wyEINrP\r\ndumRMigSWt4z3B6XPC5+JD82btb58cYM5M3Vf1fSq3ep5X3vbiJKvYAC1Vbl\r\n5MYstKJlWo1m/Gz5eirNhkXF3jyclMFbiE0Qnu2XHqDEkJ9c7gtVfO9cEz0j\r\nDVA9HHV7DQKZLAW44L9XmSTfcwAwwjF3QXjiCky9wdyI/HDEzOI4ywZga3Ye\r\niKiLfSRMcxTU65e05owzDCPkszjVkMi64Gg=\r\n=ZDfF\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"76a416503a2a9e4d1be745c82a2c0c93cb6331a4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.30","@apollosproject/apollo-server-env-mock":"^2.46.30"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.30_1648674301086_0.29683673586461823","host":"s3://npm-registry-packages"}},"2.46.31":{"name":"@apollosproject/data-connector-rock","version":"2.46.31","_id":"@apollosproject/data-connector-rock@2.46.31","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e2037751915bda0c49ea92fa2e5e57f8470f909f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.31.tgz","fileCount":158,"integrity":"sha512-mzNfzmlgmz7tZVDphN6St3lxVR5AmP3kOplWJykJJxNrzxJ2FcpLWkJPuj5/it0O9FMDqWTnwQizsHGTQQVKSA==","signatures":[{"sig":"MEYCIQDz2pwaPiJhMTkeoqxNeW82zDPRSgzv15D7/k/sLXVEUAIhAOILuHavQ4wjTmhizf9j4+NMrMfNYa/Ofthfsa8ngZmn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1098804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMbAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrkSQ//XSxo0R/LLy1PT+CK3eZkVIcyHNOwTVhmBnejlnTuPpZQQWGh\r\nDVNZvWfUuGAvkpQYR2HgD0vb89VLBWuYneKtmcITgE7kBW4anDaN3NTsOjK5\r\nO8knO64Yahzaq2vijAh0Ei1XFdltBKnHGtJd2gStsEM9G3z5JEiUoHKLpDhP\r\nIrGWN55w+BZ43xZz7NewNtEm7ImcrE1JTsmqdVW5Bb7KTVAo4SVcug90o791\r\nW2nAriRAsL0uoCZ2M1lrjEwCafeD7s4tedeQHGbnqzhwSaxVIOn3m7nrDKQH\r\nsL1NAcK8rBBKl3TXXAb/UYrnCiJRF6AVbFDj1u1dAlS8/OtLEskOg23160Ir\r\nTHpuK74Yr9A/WHIXwI6mCacCH5/HmUgKW4DvmyHhuQv2vHkIqc2262osaOpz\r\nntTXscJW0ufIOgECCoXK/sROZYwspV6s5Hr9eM3cn2wAuYcLd06C2mMyyt5q\r\nGhpLjMFolRrEzXtJuYK5BDiCKjNDFVBptIusx4/18+nSWrBpdc3zBq5TDHXf\r\n/HkLTxgTWkB/W58ad6+POm8mIy1z6NR5FxGcGJVF/DAWnlnlC9bSMFXnLX85\r\nbvFFycqaAMwn0doLY4/ZTiN341egZ6SuKbOCuYD7jjUYMnl/aLNmfCraVYjD\r\nLyn/rCv7FhGD3xmGC4UcJMfez2Wvbeh7duw=\r\n=glnr\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"2727038d90b0ccf5129ad2fa8d6b3cfaa57618c0","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.31","@apollosproject/apollo-server-env-mock":"^2.46.31"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.31_1648674496807_0.5902229371858296","host":"s3://npm-registry-packages"}},"2.46.32":{"name":"@apollosproject/data-connector-rock","version":"2.46.32","_id":"@apollosproject/data-connector-rock@2.46.32","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7fc79d998677c9db6f84792ebffcc51a9f471ca8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.32.tgz","fileCount":158,"integrity":"sha512-Yc7OBO4TzebyIiiskn/Xeh8ytqWmlbsOOqKDnBcUl3aN5iiPU/TtMtRRWrVgJflHNP5L0SJlk6RJpUurkpGcYw==","signatures":[{"sig":"MEUCIQCX5k0dBWee9SZnnI6HpITbw4Df182paSJ2vFu7hdGlFAIgKhHd2QCqyeWSONs0GtNOZ404KOGrSWfme+k6tCBUM+Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1098989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMdgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmocWA//WsFTrnlhSuFv6nDheG+SPl+g31kmG38u1/gktizc42s+mzUX\r\nxJA/egAHtA5Ul9gLRK5l2+zGviEK7/89AQ3Iov8UOs2Q5sV8jU5AinVMpJSr\r\na3VNCulYiemCNvCP4ftgrM1ZvIBjFrZQ8sXYNqFZ7pNGBHgnQa/jGT6QUKN8\r\nX61irbKmHwUEbMdc68oLFgjBEU47d4+fg1KyoKHnMf5VjUqu9A3xedbcjBHz\r\nzP9OM/ItH8T2lI23QW5oLT53Q8Ub4LQSDiJ2xkyfBcmHyV8bnHQZ/5USHnn7\r\nfZ5Wu2YRAqp22CaH2yMXJJ70dGDhLZg5Dy61eLRmfjBUPGKr+obvy8DeodJx\r\nhaS5OTH8MDH7bWl99QfLz77hbZGWB+tz+sVSH0GE5W8PmZQgCtqQrbFhM1Yj\r\nKaJSh9UIVvnTSWugzaFXbKviKFTbeZSMvlvcVqAaxUwtaoPYNyvhI67nypXH\r\nUzkKfiDfL12Bbz6VWpo5eSC72HLDGyur4S38vqLTnDTQ8DRV+aaGrBqtAQm0\r\nPKu/7sYv1LGG0eiRB7pAbSiQNpMvdsk556lHLTIEKvNMZnO+DhLKWF2z96hY\r\nZrMP0rKIWWTPtN2JBrgPVu+7CttnoPUNrAvojnko697/hh3vb6axEGFnqKJy\r\nYAaIlzur3nHQBfjFy8LctawEPUIgrHMvYaI=\r\n=B2+t\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"79c3310a8c864af0a4a6e6f313453cc3b46e2ad2","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.32","@apollosproject/apollo-server-env-mock":"^2.46.32"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.32_1648674656329_0.6505805543125982","host":"s3://npm-registry-packages"}},"2.46.33":{"name":"@apollosproject/data-connector-rock","version":"2.46.33","_id":"@apollosproject/data-connector-rock@2.46.33","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3e773382b9326ec88b148c1ea0ecec7ad507f871","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.33.tgz","fileCount":158,"integrity":"sha512-HqbRCrEcdO9vVMq/zVP4rWoYLItb3bGKnxg3NcBVmcFyPcJaQ1fqAYUjzd7/SNRCFZue4hHcPut8dAk+V2Dfzg==","signatures":[{"sig":"MEUCIQDdmRG7UWDutpZMBkTGSnw53Jj2oqsksi9GGg0XizKRIAIgaUOyDicmv5uk9YVTcquvM5m+/Q44YbjRpDMeIp9OrhA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1099174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMgbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQDw/+Mx8PRGJ311Hg5DN+ORdYiyg8/arU5e0eHgdTcxhxoS2UPXor\r\nXkSkxQP58jswg7uvRNYrEQ15H0YlGAMpW9xcyJ8P9PWjg4OS+WP/NPORroAg\r\n4hCYcrJVoQWZS7iS2z63fMD/rJ4fXtLcvm729z2ZddMDy4tDbffPZHJZtxN9\r\nPMdRbgbvmwDG27N6lHLPbBR0nVfzFQujJwPOkBMMAM8uvk6YnRE7RqXMRnq1\r\nt317YNg5o6tDnv+/x2y6+3RPFqNtVANrPUwcJ7yDFYu8MUtubVPFoyFmfez2\r\nFmPjxYvunhN/e6TbpdhMnujhBTUR6bBnBsBTVmejAEZ0F4DjyI+SX8PLX71s\r\nEIBfYf7LnAh4rWpQhJLJ/a/Z/z3NL7V3BDywCjO69FUQa5vd5fV2QRM3mI+k\r\nQ6XOb+nOqpEKV94xN2M7kxXCbNv9UHTneufSvKKR8O9H6txSt1DsB1UBYN+x\r\nxPTZXV1cOaGVyAQHaNuKEKvfAwjFaIkqdbqhsQRT3mPoaqjM5MkpaGolDzI6\r\ntYJd/BdDTeZV1U07/akwglP3STgqleqeIaQxbtleBsqNkYEfWJknqnS3LTRu\r\n8CzYkxZF2wsgT9cathTDni8kqENXoxIuheiWe/HAK7OvZq7t85YhNohAqdc9\r\nvS9E/DmB9OweeYr2z07LpS8+s0ToYMbcv00=\r\n=PH1h\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"08351d253896511ef1565ea112a90a58eea7b46f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.33","@apollosproject/apollo-server-env-mock":"^2.46.33"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.33_1648674843333_0.17535227244081542","host":"s3://npm-registry-packages"}},"2.46.34":{"name":"@apollosproject/data-connector-rock","version":"2.46.34","_id":"@apollosproject/data-connector-rock@2.46.34","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"885f74c02de792686efb7c470385728212da0ded","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.34.tgz","fileCount":158,"integrity":"sha512-vtTU/sE41cDX2hpBxf9DqB02kLyw+3skr5EUxSZcty/sXWYOpK2Ufpcme9nDl+fQfEvH5cXuxVfeEfCVwTYz6Q==","signatures":[{"sig":"MEYCIQCcIVp8a5jyRpUiOCrjSwdxsy0EFQosGEiYQWbbMu9ZCwIhAN24I2UsAMU/0CnlffRpwJmBCjhm29lU1mJS0JpuAK3t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1099359,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMj3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmob0Q//dwmrYlBMw0Q69swSemPoZuyBmZ9/M5svEKHtcMtWBDr9pec6\r\nOLxkW+UUKQebSHidXsFPjeZorGwQESeW/yft2yY4Yb1StKKkbySi1A7tbo61\r\ngSurrGFKVZXVC9PUFAKAiTuy0te5rdYUuIrwVIY//GQt260HpKDiysMPG1aX\r\noDDnYemchaYdf88bD1A5or52n8M7A7L0pVQLmu4sJGr+lYdXCsxm7V6U/ULJ\r\nDRAOTLm4EZ1y522gF1CtHaqC8J3MkkteaolMO/fji75KU4+RadO2tGXsD5dU\r\ngygXO5+Jduxnp7ROZ2aGnQxqeNg2jXROxPj87orMLEz1cMkV4W8iSlTIMpvU\r\nuKt8sHcc1mxjiS1YBwey5TD9ZCjTLCvK9CyghIA0dKHsCZXkSNODIUj717xk\r\nxqpROxxu2LSEc7QNBA5JpwL0Fn4V0K6saNIL/FhG8gygX0Qvy085KofLGNF5\r\nkAeqh+U2TZ2Dei5KNYrRDYUeEOlj98U7HqvBnyEVOlYJ1+nwGB5nKddtPL+o\r\nKR3bTIklGvayB28P60IMTSWoFZrs/DnhZm+JW2Vu4vU0wae3F89KFI3GOkO4\r\nXRRSDK4X1FHkipajO5pUYqJLChdh/KpoO5YzPn1YQVYKZ2K7VSesKmDYxNUQ\r\nHy6uBDQQG8x7mXuMUQl/YwZJ372dgfIznlM=\r\n=How1\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"1009eea3b7cbeb492d8f4f336e55785e0562f151","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.34","@apollosproject/apollo-server-env-mock":"^2.46.34"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.34_1648675063095_0.2898232487717609","host":"s3://npm-registry-packages"}},"2.46.35":{"name":"@apollosproject/data-connector-rock","version":"2.46.35","_id":"@apollosproject/data-connector-rock@2.46.35","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8197730a952c7a71235db30fcdd0cbe083630dda","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.35.tgz","fileCount":158,"integrity":"sha512-REATOiHEt2aWTWUemC/hGnpDzT/cw+T6OAaLyq9ZC3DSDSY2m9mAd2UvKljqD/dlJdzhT27t/Kn0J+hHTwYX5A==","signatures":[{"sig":"MEUCIBlxGWWR3WCZZhqhNNcq66rEPyyNgD/Zj574XFahq2BkAiEAkR7CrAsrCBRgsSCWV71Z51BfWunxJEDRuSd2oSpFqD4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1099544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMmxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoyzw//UrUvv97FRhEAqtvOZhQK3BnYf8rdL9h9uQYN9b3+LqkP8pqL\r\n14Fz+lp79AArIzhnZZjNcn1vGrRzSax/ef3qAnz5V0PfjIEUvEHJZ4ngBgcq\r\nGUji9SAmlq12t53gq1dm7+iF0UIOaz6jB8/fQ+6gySf7Rt4tCr8/Jkuavy0A\r\njybgH6oZy8zkBHJjfQdCYu/FcvbNiWe5LTyPXKm/XyrVbo9dsGLYt9kUSeL+\r\nDp3eW2LMnTHTQ0AFxEiPw/34ddzMW3ntn20jK5Q6ttvh6j3iDJZe9eMtlL9i\r\nNwb6hu6eJfQMUE6+IOXi5Z1pDqJ/1IlpleVqzhj8I1S1g0iasHSb8wr8r0JB\r\n6skE4Xhc+oA8Y9uAMA1PnDnmMFLfSanMSyPTb21Z/B41Al3s/382Kiahu/Pe\r\nZi556sTPJITyGud+dCxXbRvln6jJYa8SERIPpGcW0QAKiehGCeiZsB02oe/P\r\n9A1fYyayagMmsPb/Ru4Sw0TEBwNEzw34tn08k3aa3Oe/LeVUozE4CjvykUYd\r\nV4+C33tFZ+cje6n/jwE3BJAUfq0bkcyzQe6eaMipvFNbq7zHDjOql8BFErAD\r\neCR9Xpl00IccOcTXswfkCumBbjLx7CYcqfO1/aOSkrvHPUh8DGLPWOqllzIb\r\nKVKPsijMvKiLv33VrQnNZGygejE2j/a/mBQ=\r\n=Qhlr\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"63f36eb8e530bfb2090fcb2c2362c46a830f4273","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.35","@apollosproject/apollo-server-env-mock":"^2.46.35"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.35_1648675248908_0.20381897308772556","host":"s3://npm-registry-packages"}},"2.46.36":{"name":"@apollosproject/data-connector-rock","version":"2.46.36","_id":"@apollosproject/data-connector-rock@2.46.36","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a4b764d92b125b124b659a193d60d1a2642f8b25","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.36.tgz","fileCount":158,"integrity":"sha512-NM4U+qZ8IWmtW088rYvam5D/xd94z+aRuvjbi8DmM7ffLXppYntler5Ymvsf2p53KvOjfDL4tvpdjOLAO+K4/A==","signatures":[{"sig":"MEUCIAeatwYOajQUQTXE30LhuBF3GIoOFn0GHKZViZeoD0nWAiEAjgCQnr+qMmHjP70kuo66RTu3nD+Qz71N7W7SyOJJzZ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1099729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMpeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrH7w//TEpQa3auA4I1YI5FSgKrlwRqd9cHxvhX69tXhRQEBNkhtL6y\r\nT3v7CXDfZE1t1GVeA/YFVuT2J3Lfxa/CLftcuKNa5AerMcmHRUjMnU7keZGw\r\n3W4w/PUmAk16nwHlNckSb9x5rLW/sU2ad/N0o6cvs86EUj6KkSnmBs4DQnjB\r\nbkbdSVHgSMT8inPXldgTbhk05oI2Aan5X7TRtqGtzWfpm3+7nysOVX3e2Lde\r\nAuGnCo8dwDYBwyEY1kOLxeInBXS8ORZlTPeXSeVMwqTz9WuYikC0kE+OJs48\r\n+Ma2ACy244ZWmuoFdI6djQ8w9XfH8Jd3FJgu8+924g5WmnjEqeWPQfThRlZG\r\ny81KfjmRAlMNphzS29fHVyCoBTLPYT7vdgqfNQU8pG63ydNkF7p1IjKwKzKU\r\n3Wc7E3gFlb2QYykqVCh7ENhYqOmBtmcRr1XUwyvxsg0oyE5KthTvzKrakSIR\r\nfUXlzBEqsq7HW9boVxiO/Nylz+ppTGyAG3xhW7hhGhltujT8ZHT9Q0Rz8OzI\r\nN0+U1AH7jzmwGKscjZJqPF9kWbXTn11jjwHYWcJKlYodazz42xz71quQEIF+\r\nSlF8BdCx2MAwW7wZLTdKkHyDPr9qpZLfTfYsfJQk2YurOZ1vTav3S6T54kTb\r\nOQcTd5sN7fN0hjPMF29LiGj4RR6iBRIm4Lk=\r\n=GSPr\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"533dd57052edb17351d94e21d9be7b8dd3decaff","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.36","@apollosproject/apollo-server-env-mock":"^2.46.36"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.36_1648675421653_0.7012238215652322","host":"s3://npm-registry-packages"}},"2.46.37":{"name":"@apollosproject/data-connector-rock","version":"2.46.37","_id":"@apollosproject/data-connector-rock@2.46.37","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6798fb5844be91e27130ba5cd012b0e0173ca43a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.37.tgz","fileCount":158,"integrity":"sha512-Ohwy/Bs7nAfQdpWhjvh4lxgAZjj9+p9lmzOSAKMC31C56igLbd6O258BThR308Gx+HCZ/bWqomldyI+4FEinqw==","signatures":[{"sig":"MEQCIC7iqPpOLDeaeGbOZzeM+jt9dbZHz0kQlWmtkx+3km5DAiA54d6g/lb4ZWMS2eGHZaTSk3ZGwDl4QAXLPemaB27kgg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1099914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMs+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoDSA//RtGCcHhSjqVbDhSql9AlH95cGZyf1VZlDtxu6q3hdFqmj0p2\r\njF+wYxkIJqKm60YnTyzDZkE+52ng8iSdne/y5N2EJ9RckmnegMXttgu0N29L\r\nTyFQ+RetuawT9xK2MUDRtfH/Mxx8H9zAoT1soVwKoPGgYPNLIcJemC/7EfU6\r\nWK+WCIesZBfPjkHEJhyonR8fbgeukEocfNU1o/11EZ3cLJmVvCD8QyjrMZjS\r\nWE90v8Y7oCssCGLoZErdPHeujdaAEafOUFWK7mWMToOF/9IFXwmja0AySB5B\r\nfYgTBoQ3D0ymGCJ/upP1ocjYiPekkZ68gyZHi6icHNnUcg7hWvvNTyDWPoei\r\nDm8qUsafofJyZ8Gj6A1qPF8m+2yeAyd7Q3Ppx8o2B1qZtYn7w4Ec22yt4msG\r\n9f5Q8mtyA9i5Y1VjFmK1azWO16fSTyq5QXWWDiU+neAnpTMkFmfV0zndY3kR\r\nwSbEvMKO5fC9JWmBkPx9EEDXbedAVNYJARWaykoRWHXbcZdUMqp1r+hrcfF1\r\n4GBESRk7DTKJofbdjJPERWqct7Np/Dr7nLTLE2zZq1Oa/5IoH+u52N15iU+b\r\ngg1AW3+AJ01a7tshcdPMPXNn0ylpl+BQN4hNASjFRQmeJzXifhSYC452NRvS\r\nMhcQiwZjqd+QXgkfz41phwFGE1RhCFsSUBU=\r\n=ulj4\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"a95a5c7b8aba07d54c7f20238c294fa33aaa35b9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.37","@apollosproject/apollo-server-env-mock":"^2.46.37"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.37_1648675646414_0.38851417166350455","host":"s3://npm-registry-packages"}},"2.46.38":{"name":"@apollosproject/data-connector-rock","version":"2.46.38","_id":"@apollosproject/data-connector-rock@2.46.38","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c3dcee123da3d3798922335a301c3308f853126a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.38.tgz","fileCount":158,"integrity":"sha512-tV8q5XZMi/ll13UA7x6FvZnHmt6aieUXB0HcDyYfPzzhdgbORdfOStyO2FRm1ygKPas+Ro/lkyND8sdLxkPqvQ==","signatures":[{"sig":"MEUCIH8v8KtzyTCq6VeiqKDBxbdX7/zSa3N5umF36KMNBeOBAiEA+D4tM4l/jVVi6xdHPvPKf8FubwaK82vJDpu+Urb816M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1100099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMvaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHWw//TZO/XhLAAJF1J+ecyU/AndYtH60JqvLR1wmHUhXheMIqqm2t\r\n0yrwoMVRJdLpOxhLFWnQTcO7NjjAibgQLNmzJBEaK+MmLGP2uFHDPaGjUjX0\r\nUKyyvzbTvqZcGd0mpI93K8TWZxIFFnKp7v+MeJ5cEAkPw9JOMx6E2V9ZhuoG\r\nCN8kiVsf3IZUzfb+b3VXVk25aaiWbdTg+SG2FDVO/mQT5euImvUwVjr4+a+g\r\nOn1Ag+0dLsM+g58/oqpTTLfHo5DlLpL/s9LwKYBU0snIF3st3lB/AMSVx/JS\r\ngrXzV2sSPlHoKHxOIKWIjyECITMwv/ftBX01YG5jqm1VoCwPU8r0o+L0C9XO\r\nQhJ9rW7FOb1PFmre/Oiyf5ptbvGaFSfHk37fh/pd7hf7A7l88DAK8HTyVQS6\r\n1OvRUG8HIiCxknizbUJzOKtu3jB7tyjKfEEK6BN8FigcjHD3qeXQowqha9Va\r\nE0DmDjtuJXLOSitBZLw+Q7ZxbkWAT9fAw6EygX4UgGQwksXa/pNtcUiOu7Wg\r\nKz2NhR3uUndnm4H7+gOIS8M7sNnZZJokvBBpeM+BaZhwLQZCVZzaFZ4l6s+x\r\n0gLFcFYkl804I4iNTy7/+cmeFfroJU5seF9j8YjhmJVe6/ShfL0TD608a9or\r\nYteWvv6REZBpb1UkzT7F8Pu57rGpGQLn8kI=\r\n=B9uB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"2fb42a6898cba3470c2be091fc479487afa0855d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.38","@apollosproject/apollo-server-env-mock":"^2.46.38"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.38_1648675801772_0.8079716648039652","host":"s3://npm-registry-packages"}},"2.46.39":{"name":"@apollosproject/data-connector-rock","version":"2.46.39","_id":"@apollosproject/data-connector-rock@2.46.39","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8edae6b0c4eaa684df9e6f5a1e45a9314fafc2d8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.39.tgz","fileCount":158,"integrity":"sha512-0ecBDFALj7H5GscxvrhdtBAEutVphnsFg4XmZJRuS9RGIF1ZEsjkzpJpQ/cfOGMEVMuYaBFkXTbQIBgsdVWZPQ==","signatures":[{"sig":"MEUCIGL56uAvcbjNxXda+//sHVYUjw8liSMxJfH0UqW1e5ZmAiEAxZSVqPOpU05+Yu6l4O7PYAi27fU+cySAAV2EtVhyp6Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1100284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRMzLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGMBAAkMzGP74YF6chTbHGUSYAs9xPhk/ii5oMNzHYMTs/vmmsXkRy\r\ncQwEGobsZKuu/wVdNF7qPnZ3AZBbusgA+JQLapFggCe5AVkCqTrM4e9Sp4Vd\r\nDa/0xUu7f7Km6JL5CjkA23jgXVX8bAQnUgnwI3Mv3j0OPma82u5GJ4GJLpDH\r\nRkimi1fnvA/+1rRCwQaqUrrpsO1/OdwcnRRe62h2mLow1EQ71m9u4MGonjkN\r\n7Dwd4eFLZkjwXaoIdRQ75EpV8EG+Lz6fk2y8NXPqdDL1KlC/ooQyoHu3MwXE\r\nB+O9fvgkLUWq+0P6C3RO6Ky4YDDlTCVVG2/7rq9fuIvDoDU7Z343ToI9m3bI\r\n4KVmn3li+X+Mooe8pESWIDijGs3PcD5XVJxkavEUudBKtbiwKp0POd9ELnmi\r\n5DMOSa/vTidw5nuiQOzlGClwhBfF9UTEOG+zpzIa4a/nI/OPDay1wOxCs+7s\r\nlLj0Tadxiy2xuccspusgZpohAnlmujmn1bt9mvvYWiRppwcf9+t9UvNIg2fY\r\nWwlO0ybkLv7YpSz2Sd58mSGYtJ9Hfeo/P4eggTSsAnPUUBt92T/GR+GqHWMX\r\nk3JAyQW51pNcmyizStgI8nyDeDdw25IINx8jt6jZLeNgRjtPFKSiTbU2EEPV\r\neM09bXKQKNIDaIMtRFDQrEfXbTOVluO5LFs=\r\n=Kxxu\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"6980ddd4bc39474d1d6bc00173d7f8f8a496a94f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.39","@apollosproject/apollo-server-env-mock":"^2.46.39"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.39_1648676043029_0.6435115169321812","host":"s3://npm-registry-packages"}},"2.46.40":{"name":"@apollosproject/data-connector-rock","version":"2.46.40","_id":"@apollosproject/data-connector-rock@2.46.40","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1e78c19ac8d58f8444f39ab583ef1b07b915240d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.40.tgz","fileCount":158,"integrity":"sha512-G8qlypDBDvUa1fatOnvVNctlsepL9739O74l5BiH96cW1GclduU8MSSpk7MtNU0ZFjfbX6qPNHZlrMpct2sFEg==","signatures":[{"sig":"MEYCIQCpr53BSm8NhcdMGOmYx/9GkUMYkYV4PWOIJMxepCrDiAIhAMMRXpZ6MPOvO5RAO0hhAP0QY0fg0V4LkSavjVxmxeQu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1100469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRM20ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5OQ//VLoitouSCQJiM6rueCpqqNbiY39vpsT7ZPkZ+POi0gddXwAt\r\nzwnfAl8R9653fNoWi6Qlx4A9UHCK2KcRT+I4aLFR/SqGgIktg4dyfpqlmQ0j\r\nlvbMiuu9jBTKByalW4aZ4yxwHQXojEeAeepfuua2241FLgX50izc0LcmUoq3\r\nbxgJxOJB/YjQASIdQTaAjX3OzmOMkJFnso3ZLYIXj91pnCpCxXfS48YZyhdT\r\n7BpnSjWTaG4AbojKEjaYSeMuJYPERQDQKmwD2AFlHeR5fGa7ejM0iP+axNWQ\r\nembupaeaTJhaQPU4gVfNfuNEOy+FfhghJOWmkat79C30J0XhNJcqNo4p4D5p\r\nRhQ69t7/QZDTtXMZ//SmYCealpzoKqFc+pM/i++ijwlJ1ZL9Paxzs/XPbLKF\r\n6sYrNSwUgLSh9tZ8A0Y4ZjuQjFRse+2LqsakP2os9D7mATBBCiWDgs4q7dIV\r\n7l502AAmyXtxS7eViBi6HQsM7FgsZY/kP11IpvO5ybCzM2BmU+AB+1rap8N5\r\nrs2sP97tbh7j57L6OK8tnTrTOLlfLH8GANAk/EXXKl6QDVgxTiHMGxwXcvFh\r\nikPNfOmff1VUhi5e9531zWge3uWniRphMZ+EX7UQX6TuBxFa56Ou1Xyo2KL1\r\n5c9O3s4lYvPmWKf9ZlkYyiF8wcA20R/GQfc=\r\n=0qWa\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"5dbb5052bafb16451f4380c4a65fb8365c2c24f4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.40","@apollosproject/apollo-server-env-mock":"^2.46.40"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.40_1648676276395_0.8284019388418093","host":"s3://npm-registry-packages"}},"2.46.41":{"name":"@apollosproject/data-connector-rock","version":"2.46.41","_id":"@apollosproject/data-connector-rock@2.46.41","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"04454ff9c1c548a6663ebb71e76bb6e774c4b777","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.41.tgz","fileCount":158,"integrity":"sha512-YALkh8J9sHNLi3AWZSm2M8/zBdPsqa/J0aINtlAYWyxIUTsSAU+w2aklR1Y0bTKDaFYK6jvqTa77/aG2ftiTxA==","signatures":[{"sig":"MEUCIEJeXCiy+PiqDv9aC0zL1uv5lqmkPeXzm6MH4tjY1b0aAiEA/AcxMop/RqXo1oHI09X3Ye/sOTGY2tJ36rz5e/EBbDM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1100654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRM5lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpjUQ//abyxk+g0IKn2RRm7DosLngbLKvK8dQtAOAwgpcq2EOzALT/+\r\npePUPBVhpDD0+U+LxmNkmgq5K9gvdcu7wCC+VthTEkpptn60FtRZdcoRyb7d\r\nNIpkfre7Tef8CvMRgD/S58cBtTFIqeqPDffyQtUtyjhdwMRPwy/jO/c4qIGT\r\nn1Qi4YJTzukoehZTBY2fveHXiQ/4aU8FE7RoHGQAZcpMm/JOEbsVywnB30Rl\r\nVdhN2MXeM7QIvXmREPXFy4Hw89ezDMu7gVp8zTzThPisio7NyRwB+r02gPU6\r\n1Xw+Suza6s5TmcwQwmlZqHrP5FmBqfKVgwk0V13/Y2CIa+30G7Q/krhBTYwm\r\nnDS4Firqmtq2aUqK4F2xRh3J/tqkeaT3PHiWu7yZykcRCdirmS2TuPr5uxOS\r\nc690hN8DhIjKplmmuWAqWIIbxPqT1xHfi6T94Ev8eTgti1zY5Y8IVcCKV7J4\r\nE/ELUg6NG48z2DcZ5Y0PJxNHbkD+49qNRjW41n6QPkIiKDnZvApKkIrZd+5t\r\n2bGJ+6B8vcnJqaftP7J0dW/7WbSTYWnnZuol+ZBnY0K1pvKeAeOs2RemQjkb\r\nlbiOIzK4I+g6WeUn/NEkFouMYZXoKMJPyT6ygk6gXqnEEI3S/4qkqeeOKkvF\r\n8UfK93L47vmJgu6zhVfB3l+1Ik7GnVYFsRs=\r\n=V/pI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8eaeda1c25dea6cc84de3bec91891665b5f469b4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.41","@apollosproject/apollo-server-env-mock":"^2.46.41"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.41_1648676453125_0.38894767098669014","host":"s3://npm-registry-packages"}},"2.46.42":{"name":"@apollosproject/data-connector-rock","version":"2.46.42","_id":"@apollosproject/data-connector-rock@2.46.42","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"435840b1694733157a1561f58c07aafc368aa3c6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.42.tgz","fileCount":158,"integrity":"sha512-iqWxcExbuG0k/c7vTPqagg4hDM4CKG5KB++YksJsxTM6r/M+L30LOf92qYydlrQdBWfyph+tkxhj9rDk2gan2w==","signatures":[{"sig":"MEQCIEs/XiUzwdT/axZgJOqKJK2PNm/4sDR6ZX7sCdgk3PjvAiA/x5Wk+fwRdxlk6kGHvnBlXGpVXlrNwIG+GuVayIWprw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1100839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRM8gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZdA/7B0rQ4/E+cDNIi9TJhj5X8vyNIVjGSiNth/FL+XLhnGnWSixG\r\neNaBJadUXKd4FJ37j2ZX1k8POPIONwea06hoJvaEFxiaXJYGClKKrAP5UCu6\r\nGoHBEp0t6Fz6YUb1YZJDU7n/OmatJgdcfP6+n4gUoDdYikbap8e1FPKxZL3L\r\nGJfrLy7gTNgcxdZWeTnzr1hVd/R+JjDjvQT8r2J+yt80kfz9wZ8nQbLV4Ghp\r\n3t8+EY09Ayy2L7PL7Cmp89NvhKoJH627aWNTP8AI1mD9lF6aKdAuEDz2w9hO\r\nTdu0TiWSt9wZ8S4VT5LXahtgm+16PHCAxCtY3rmWiNuysLJMCqkW4nPdresX\r\nmj1KevG/RfMHDj1ypCTJS63EgSiunr0O90NyhuM5V+h6nimlOLQcqZ5J9l4g\r\n6OSDajCTULKvFpA00030DpbXHIU0tBGo5zVGBXFQDjPrDjaHE0Zyu1sXhzPx\r\n1/gs5LJXRvL6WukJFf6JjGVW69mfz09x6rG+4cVU4i+LiFKl4hehPO4d49Ni\r\nMEvScUAYiDVZqCM91RThSdFsBWMU+xCFvJ8Q9RUrMok+BIbYNyi0gd03sR6b\r\nYGHG6s5onR4l4wh3LFL/fRAa60DSuTdWJYqWg7HE5L53bUdU4qsimkE+XTa8\r\nxcwNWTw5cNEaVZAcTxFpy1Brdt1i1m2AoxU=\r\n=fTFC\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"e4011da83ee83db1f53b89d7cbe859b71b5353d6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.42","@apollosproject/apollo-server-env-mock":"^2.46.42"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.42_1648676639966_0.0360494441937389","host":"s3://npm-registry-packages"}},"2.46.43":{"name":"@apollosproject/data-connector-rock","version":"2.46.43","_id":"@apollosproject/data-connector-rock@2.46.43","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b8d84c517f0ddfb7fe63e1476a95ec04e7889fd2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.43.tgz","fileCount":158,"integrity":"sha512-HU8SFT057iSw7oNMYgQOGAki8wfMeopYDNDE7ggjw47cpkxLuGTp/QQijYQ3e3N4bFMlSmrB3qx4ZnMNO3BiLw==","signatures":[{"sig":"MEYCIQChrcEJqJ2GsqEP34UFnOEbn7TQ1PsfiEAZNv6KDeL9JwIhAPlQBrQ9VOhoEOaBIp20iE2gSTguycxHLpseXF9ni4c4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1101024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRM/fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo09xAAkINii7uZEvS3WK3u6o6BNKQ0DysYZj+NkjkG5p08X2DQs0Ri\r\n9Q438qu0ttH3aQg0ZUykQfk/lV/pC8Tk8OB2xc897hTZn/UgOP6OACBHyjPX\r\n26UgD01dhUfudjY4cob58soovqjOmpnJRFVuUE1HcDg4T+OfJqJga8SlGVpU\r\nm6R2a+tcQ2/BOCDpw+kW4F7Mc1oEJB+5TqMFQ8miljtRSAyzevbY84oylM8C\r\nU4Ph3aqP37AKa2Fe4BhwO8326ksKNLblq/qqGhEEh5EkCANdZFIBRG18PBV/\r\n/WSzVyIPlJY8fhDt6+5EgijNOrgnERjS+ZupaAkK8dIU5IcbBdReiOb73Bas\r\n5vbG610qB/rAmEuZlZsZNvmuVnZoAqkPPrKio2EwOg6MTprAwOM1+6NqzK2d\r\n9/1JOMqT60FhCejMtUZF2gAhjM5VpQFsb1iBDCv+IeNf7HSLSNigueSDj1Gc\r\nevDJyn7bWNJpSStfEz3cEi5EqS/zex4ftaL1mIp5XDTit/YpwUSn6Ov0yiNd\r\no5vmF4u1MNxLjeponxq3bw4SUf1X10lI0XGO9QNqRn7942/NRkNAkuWAUXoR\r\nd3cnwal0yUwZmZKcQMWBs50BXYw0+YJL0czMj4j71Fcu02iof6G3+fa3KCE1\r\nfg+UgWk4initqnfjqzRIOPjyyGaUE8aaU2k=\r\n=POrb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"a0878bcdb71a90212ecc9d35f9178f1e5d5371a9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.43","@apollosproject/apollo-server-env-mock":"^2.46.43"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.43_1648676830953_0.4125132162353917","host":"s3://npm-registry-packages"}},"2.46.44":{"name":"@apollosproject/data-connector-rock","version":"2.46.44","_id":"@apollosproject/data-connector-rock@2.46.44","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"892d3b10da4c0a054f6f1e0acab242628b43c8a3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.44.tgz","fileCount":158,"integrity":"sha512-H1eX3jbZ6NxVHQVcahHwqVOuxanOFrTdCv4p17tYqzCPgh04XtHrGwfQynOIMCbLmbWp4DDaDtOR0ZkRl1nLRQ==","signatures":[{"sig":"MEUCIC/Mc6Xm8Z09VdSVizFPgwv+kKvS69XIW1ILYm3FRKi5AiEAhZCKk6y/6PcomaOIyDQ7GtrxbfcDraaSRBQ/99SYBAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1101209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNDpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0sw/+KxdWdykdiYIa0l3JFkC9EjnsdmJjphNmytFcgCAFYoT+3j4u\r\nds+R0+VLGDYVMHeRadmwS6xar/hO4XYQ1MnoXQhwVNwZlQsIem+fnRDcqF1U\r\nU4Rl4OfKEisxxKT0e08Ek77wLarLhYQ2YO8VNsdRlKoekpW2KfaTIccorsuU\r\nxOY1I/6/OY9ejxegtnDGyq03+N8o2sRinfk35AdHM49vid8mDuGZ6+R6jNMU\r\nMzIY/W6SH+JxDc8GEPuZgL2HlQVo9eqtwEZp/s7LjHdAxVisOTr97b4xemqh\r\n/GM3BquP2eMCIrf4QOLzoAHONnJN1oYVcyUKWYphjG3gnq4OgGptiwemnhit\r\nUQ339LH7HNz/gQFZLU6b26v2qOc00jbCzV3il00FK5IHq5A0DKEPvcfCUNQX\r\nrgtS7DctGlRsRnX0qbJvIbdGbIS/S2q74R0tA7yYBafV9DCMOm58Z6pYzfoz\r\nZ0Vv5pB9B9dQFvvjGWb6Cny98FVQNazZx+yCpyc19I4NGyOefupM/8Eud0Wo\r\nsZwpTT+HKh0+P7MH7P6j0LYfZDLRYbdpZM8rdxlVRDRookatxltV9TXfdhVN\r\nw9+w/PP7/8gcHXYM5uZOV/U3ISM1hxxAeQal3K8jBtpHsbkrn5IsKdeXcuVf\r\nGz1SyY4R7+ljuftEpq9rqfZon4qcAc+ZlT0=\r\n=mIK3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d6d7b7b59a5aa8acaeb9bba44e6ecc24753bfb4c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.44","@apollosproject/apollo-server-env-mock":"^2.46.44"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.44_1648677097021_0.4485023127930796","host":"s3://npm-registry-packages"}},"2.46.45":{"name":"@apollosproject/data-connector-rock","version":"2.46.45","_id":"@apollosproject/data-connector-rock@2.46.45","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0ed420f1ae02b5d20aa55167860c9d8dc61182b9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.45.tgz","fileCount":158,"integrity":"sha512-r1Afmf3JvWTQnPfpPpywKX5t6bAUx2fXRubtUI+4gEHNEvkSocKfALdgnva3/GPf/5/5Mu+Xy4IDbBwsid3Ayw==","signatures":[{"sig":"MEYCIQCafmoMxDXRPwVpXn2hDGAMqOpbgkXDMKcBKiaxGGY3nwIhAOgg35kyQyAK/VIyJwrkE5F7AtD2DiMu6xfof4xggsXF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1101394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNHOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoc6hAAl2t33hahDThEF1c+JrF728grJEQxgh+BQs/d6rC8Y8AztLkO\r\nWUlvGU5gbXecfyi1uY3ZmiRpOWOJtUitxUkO/K+ulf9I8wNl2jyItgyli/Ft\r\ngoA6LiwaRgr63SEPa4v1/ra1Nc8eh2jHKIv+HwIwDjssj7XccvmWfoW+exhw\r\n8i4ghonvVTOvC9BqNFxDeK5doYOqEXT/fSA4diNx/+NUWGDye4lE/BOmFbqY\r\nAsTmtyBo7Hbfgb2SqvutWx+JTW1WYE9nGjACvASQyIX0ONR19cY04xa4NoL2\r\n6sRasy0tN8xSEb4T1JfOVfeEgIlsi75jkMfsaqwdB1fF5lffVE+kDoKIAkMj\r\nnnwyBULjwiLti0CsRrf5tCepCWLTnLApEor1VwTs7485RtujaRqoCfk3xrWG\r\nVg4a9xXGXdy4oqawx1cuiaFGCSF0IuLmNwM5icUG5iWa74bD5LlZ0WmSSCUe\r\nxLGAELW07BOUwUagnTXxJo0/q0wgjpqMfAVTBUVEdbCUre1BAxSh08CeTmSL\r\n2kptpnOLeJN2Y9lj3JrHqmmj2EIPYoMacApdnmIMXnSwnPJ7Gx1xMpzYz4F/\r\nUmxyqFnGUs/s220rrWKyUrmH3xabknGEcHfa6IK9EgNshDDouG6UrJifetJW\r\n3CqeRcae5ZcQnxwXkSb08qesMB1bi8Fdlyk=\r\n=yOJW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"972a304e7afc4c67bae790ac8052abfe24caf79d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.45","@apollosproject/apollo-server-env-mock":"^2.46.45"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.45_1648677326331_0.9305095933126393","host":"s3://npm-registry-packages"}},"2.46.46":{"name":"@apollosproject/data-connector-rock","version":"2.46.46","_id":"@apollosproject/data-connector-rock@2.46.46","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"869d4fc71ec11645718a68f1adbf0680b59fd292","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.46.tgz","fileCount":158,"integrity":"sha512-07SsZloQhrcA8qYLpG0A+2F8+RnrEev1pP6nzICJ2QJz89jTN8hC6UAcHhh5NUVoxA8iZK6RIQxKsQCAWcEzOA==","signatures":[{"sig":"MEUCIQDKTPRxIAX52acfEn2mghlkyyPFMawULT2dDJ4RAFCWjgIgFdKvyH4HtY+mNvtsnienDMmEaNUb6zfOQGjgCvgzXLE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1101579,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNJpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjGQ/7BXkLCs3AKF9I8m1+uLZJnyUks+YKX3V2tAwPfaCI3vZ3WDkr\r\nqiLQ2YUQmVFaHJKYoE7InkCFBE+VV1MiqY0LsfpLX1XJhw7rOrgzoWI0sKkT\r\nIH0VfPrx9rgMbWyV11bZp41vDcRjdZbXysUNrF31pBxej0ahj5t+NEpUC04V\r\n6X+u5dNuFxFJk4MrSXzBf8EJpDz2LI0pfszLT9Y5ha5W7/n9Bk+kU/K5x5tA\r\nb8NKttpVxzh5IPBnquZ2gspZ7uSDpXO03Yn0oQbEP9aAvzeIlY+m8ZrcEsbm\r\nnxJl+XTF/MPOcBh4WPpBeiCrOHJ0IZhxwsDDcUxWfcrmInRFfBS8R0DsHIVx\r\neWHJFYCA8bWHuzCtgwOiN+UXJFaU9DZKNRucDXIwvVaQLOl3i8xu4P1pXdj1\r\niceRxKi5BWrEC5c3T80NUZQcsrLyYf6k9TrJQp1nyJ9KhUXxfmV16jflEq2l\r\n4dxY3/VmkCZJ3kjxQ4Qug1h16MuHLMuiDaPN+Ei0pn0LuE8bgqMoUdIORCtp\r\npxmDUzOvymIYiggjaJlDwgl+3o3/GnFCgTFg1ahvynA8hB45NspXeAPNKmO6\r\nAwApEMZwJ03K8OWKXYhIbhET3RNFCj2e235Nsxq50QvFgWk24CNePV6ojzk7\r\nHnSJJayq5ACtNQ+cspzUOcdRKcYzHMneNyY=\r\n=s2w9\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"cc1afa30076883f77d159c0a884520d4fe642ecc","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.46","@apollosproject/apollo-server-env-mock":"^2.46.46"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.46_1648677480878_0.7017016275569892","host":"s3://npm-registry-packages"}},"2.46.47":{"name":"@apollosproject/data-connector-rock","version":"2.46.47","_id":"@apollosproject/data-connector-rock@2.46.47","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c2658792dbaa5180bc5f4549cae766d466986bec","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.47.tgz","fileCount":158,"integrity":"sha512-VnYRyOebqBFUZKWvJGMM52bcfZFq0edPZDSJ/mZ/NoyAK8uH1yc+KCx9V+pyhlXNZnI9Lj3h9acf83SMBhCG0g==","signatures":[{"sig":"MEUCIQCd0YK75bXpXGAaVcH2qo9C3A7Q/BluosKVlsvAS6S/GQIgYElJ8ngc+aZzg7atvAznhnhbzhWC1wRn9U0HeNH7q6c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1101764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNNOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryMw//f6sdeS9imQ4W+vIUgJ25Z0g6wEOrDH1yNNVgZzadXJ7CwHd2\r\nQlWZRQC48hDFziRLImsfUfnKhfI1ZbJ+Q71FFAF++HOy6aMykh3QHZcqTRzr\r\nGgDJh80OqpGm3b1xNtrtxJIWqoFiT8WHs2C5YBPUojxcE3cpE/dzEebwTI/G\r\n9o+sXLIjhqoLs7xceyu0V42gHDoZqLZZMHM8hi7ujBpH4p9JHk4fLoV3bHN7\r\nEOcabyvxohbbhz2g0u2bLopNZyp7zU0NSFKcB5w5Zg6Ad1HhHuINoZSe8IKb\r\n9amCRGxAFuKIKCthm1/58mezuNzhHPK4QPYB6x9aTB3z/s13zQHU/2TdJ/0N\r\nUJnLxQEqD7Mx1ncrFNYUsz00BM65zkq7uqdYQmYPPMkg2HjGQdA25F3EC+UJ\r\nVBOQ55hCJWp8TNVGVsQC73GZJB3w1ZiIkNlwv67AK/fSkB4b/V0d9TY+QzVu\r\nlWqJGhZm9p0qUHMCfrkr6EbviIpg2Rjcsy9XvTx4Kh1c3kJAjggv18riuX+P\r\nZfA2r1trv4XDOrYCH9ZM1aJqjtrVL3sAZMKfmNb4x6XRz2xY+arI0CIEJ0Z9\r\nlyXXdICHYwjZg8vxy9qMEsOz5vj/zNVijne432NNQsKiVMFnbtVQ7DI5eW4z\r\nqyXJA9OWfRsyZ+PocM88nIMRzqja4PeeLqM=\r\n=G0O4\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"715bd8456371a80add4f6654bf6350c9d19f7a5a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.47","@apollosproject/apollo-server-env-mock":"^2.46.47"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.47_1648677710560_0.9722293629959258","host":"s3://npm-registry-packages"}},"2.46.48":{"name":"@apollosproject/data-connector-rock","version":"2.46.48","_id":"@apollosproject/data-connector-rock@2.46.48","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"05911bbc1e2394ec6465500790fbf5f4ecd5e102","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.48.tgz","fileCount":158,"integrity":"sha512-99gKcfUrZc55/VuR+SIFiAgeQykwnli1mbF2Q241PTo9Mbhhqg62rWsRkNyWFRIWk3wUCRN5reMhnGYbFrZvTA==","signatures":[{"sig":"MEYCIQDUz14InOC3v1N3RTnjat5g8yESppCCcF7twiv9tjs6YAIhAPbSkIbN55PmfbJxIJAdI8fD88KoiVq71GNh3RzB0cVJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1101949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNPgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2CA//Uh8IlbcGdGqJ1nN/aU8U+QRY0sGtra8xXcekPVb3mFTkEL6X\r\nFqtEw4M7jcXHjP8I8Vb4IiBdHRwtCyxhHtbfj+N3tBReJx2QBaZyhgCC3Dfi\r\nPMFAXzUix0XDjvACbSIzlqEKB0KJYk6+tlG20ABdxgPvKymELxhBl6yNCr+6\r\nD0r374caB2RoijQScQ6tV8WAPSA4jeL3XPsTl3ADC6vpNwgBK+M13gNvsTQV\r\nq+mdAk4n8R1pt+UkOAjsoSKtZlygKTdo+ua+FjrEXSKKlRXC9LoEmPJfUvFa\r\nm5hNfUpXfmfqzzs1V68aKTQrfk1w8336cbgyRqiBYH5AyH9l1v4jOwklfwXg\r\n6IsbeOWJa57mfmz9s16tjU3V29vqAt7JJgb/yESzmTJKmK4bgFgYrkv7Bts5\r\nRma5pKHzepQmNJ7NTO7i6rFIAhAQZlf1tfnrKMFMvzo53RtXtIEbhUdBxx7/\r\nlY5nldBEejDEkKkOk13q1JjNicquve0CmkUvk3sUrdzCdZinLp6GMgUkWGTz\r\nZx2eD4Q9pevJ3+aN2KbLqP+VABaP0oQ+VKYANb0m2lQyIPyr7iKcgdnYlN9l\r\nEI7zSYm8T3ye+SDIWHdvt2+MlTdWhE2anRI0TLYgtd3l6NVWCjo8vDKDTt7q\r\nq5S3rMud7QcZfh5/Wme1fZC9D/SOJQuejYM=\r\n=BPmY\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"723a74dc1579bf5a8face23d3defca96ed3ad19b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.48","@apollosproject/apollo-server-env-mock":"^2.46.48"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.48_1648677856121_0.9610639775478376","host":"s3://npm-registry-packages"}},"2.46.49":{"name":"@apollosproject/data-connector-rock","version":"2.46.49","_id":"@apollosproject/data-connector-rock@2.46.49","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e8b0cdee03cf6eedc2040b7343ef4cfb107919d1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.49.tgz","fileCount":158,"integrity":"sha512-EqDgQoZKpCrDougZdQZfrYnoyPa2fK3Mp9ZXy/TKMfk4TAG9O01JTrbY9xxKQVoUx27RY9wkOY9e/a1ip9dMPw==","signatures":[{"sig":"MEUCIQDx93mE1udpZaNQbjVk2w7ldQbxODm9BCTaDdl1rvOZaAIgLdni/BUBZKYL6BnOMUHcenzqZNow8axApehNrWxiyoo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1102134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNS/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqo3A/9Hrgwnql5wQdwcgpxu5/LqXKWBMiuFFsB9pF7FbilaHPUbH6Y\r\n6N/GExjPngenK+E5i4yp6V1QuCpT/KccUkCNv63+2veeLwWpyI7YfkQFVMpW\r\n4l2nKCTbFAuNZ/mtJrFIts7Gn4xAxd/InuFe2a2by+MlLos8D9S76aBsBJbK\r\nXROaJzbrO73yB41WsHBE+Wh8zXgDRKPn3sS+py6qBz+zr3QRVCSP4OXd/3Us\r\nPJ4Dn9B6M51DANwGJbt2zrUoNcoWmZ06zlXn0V0Hib99igsMultn1WCJ8vy8\r\nQTcWTF/BDG0mVSmTmIlWmEaJce9okcS9iXFXSl8YtyubgnCicxukcUYYn4jW\r\nnvjbgQNSsnt2LqKukLBqG3C8TgQwPUfhvFVD/W8+8+wbLfP9dIG1J2bqwpdZ\r\nw/me52wrlq9aSN2BRSOPbv3Lu0I0cTpoUcgzPBC2j7uiVe25/1iLRj5YNyGe\r\nJ9n3JwWN8Mrdv7czEZvyQQXUjrSvsJRUeyk6TEKYuHeqMEuf1AWtYImystge\r\nEbFWANRx26GPtlmUo5bRk9WItepUE8AYKKpIQzYwn/usbOcq76BiHi8/bWYo\r\neqLqMa2nBt+0ZZDlJpH1V3DGZ+7mukYvf7X65EUvyxd7TwgFRiHpG72OEmmV\r\nfyIhOCO2R4i6LXUbbs70zpSANrKxJy8rYjs=\r\n=xHjn\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"b8d8030a2ec92228ae99b94d7421d2fd3ce995af","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.49","@apollosproject/apollo-server-env-mock":"^2.46.49"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.49_1648678079623_0.6573821222009142","host":"s3://npm-registry-packages"}},"2.46.50":{"name":"@apollosproject/data-connector-rock","version":"2.46.50","_id":"@apollosproject/data-connector-rock@2.46.50","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"fabab81f92bf69a21736a6d0ff12623a60d81305","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.50.tgz","fileCount":158,"integrity":"sha512-tdKgRTJFZaGYp5n0c6uGm0aKDQnrJgan5kd12yPlbdmYMwyJpWoCIzve7QePtyn48sDZgHXbh7y4tm1/5J6GpA==","signatures":[{"sig":"MEUCIQDApxrjZs049EQUgNkuNoW34WytGSwRcLopQyvEtUVDYgIgL1LBQaN9N/BfZ5flNkR51kiZAPdEFIBScZJacxSpjlk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1102319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNWTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTSw//XHE0HWKbVc1Cx+/XxQ/7gYU4f1258oifUAqws8L/EkhALoKp\r\nFXlpzqjfAsHtTabkm6v7rTMIlrvUzA6OGLPCk6n+iuZusOZ7utirW9VSPWm1\r\nZOKtckNM8JFigryhU9jx0Zcrm1/mHQqpqcuvOWWfsHzVHUGyJ9mGxh8twh/L\r\njDnP0SZtKpBnilT6tAneqk2JB2sCWLJ7A4U1Dc5MiufcOIQ5hqCXfEy60c9Y\r\nLyS/qIJkzfNwQramB2AggvMv5543SJb0eIxFJ58HCuGmMf9S/Ku2e8dC25bC\r\nLnkrM7wH+x5u1OH2nFOz38PMPdAj06fLtYBLXeJ3CuQgy6V4W0vORtBKjKDV\r\n14FHD/NT+W/7hRyUgDe4LwgEA+zPQHbn8UjKYIPrwt/lSpQjGz5gPyVdLd18\r\n0p1ljBgk8U7D5CGbocrSbwO2syrkRTiYCm/NdlU6Fkbp2gCLnbpwKK3ZR1VH\r\nZ6qp1ej4YKdX7BmOUe3teUFljzVKCybrgYDiR37YsgF2nyLFRYLtracZFzLr\r\nEJo0KBiwg21YHQ6P/VCKBSQ2324AvCoayK6M0S3QE5TTVwrXlaLaPr/59Aj+\r\nFKiO+0kZ4/iZc89r1fBOGI6hJLUXXulSVlJK91khnfagKqtueJjKUeH2SFar\r\nEkoESp77isBH8uYXZ55ys2S6Q8cxk4mhOZY=\r\n=Z/Fb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"027524ea827abd921e94a6115f172da35720ffe9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.50","@apollosproject/apollo-server-env-mock":"^2.46.50"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.50_1648678291779_0.13976525553784125","host":"s3://npm-registry-packages"}},"2.46.51":{"name":"@apollosproject/data-connector-rock","version":"2.46.51","_id":"@apollosproject/data-connector-rock@2.46.51","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1fea8a44c49bae022c5014ab849f17a8af8d5bf0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.51.tgz","fileCount":158,"integrity":"sha512-f0QeF15IJY7IZ7m4Fuonv5br633G7BLdB5HL9TPZn3FFgiPuBJKkwen5HXCfcblEBYCanAdlhE6XbXvBYxhdwA==","signatures":[{"sig":"MEQCIGpVrzYnTFjrCSjwbxwq2/FRgNm1EhPtMDkcc7WSTakFAiBKBPesOGD03RALoPXG5fN7FKey0LQzNlOjayRbWSuiqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1102504,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNYsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmomEBAAjMsgEoDb4P/hxrlJ+QRd7SANYavhcz0XVtkrxbwDpwN76n/J\r\npSvfhbg0RHrX9zgpnHuFC62xl9NBq+uMA7mdzcEH3vDHYsMzA85jqcFCSyCA\r\nEKDtljuWswZ+iMxQXqTToXwaP+u4wkCnvunjd4qIn5uCa3PJaR+pY0OiomIy\r\nt0t4yv1eoL0EYXcus2cWRI5otDjMb1Glkk3B5I2TUNushJrWPcoT4UigjSqz\r\nbpEj/XHrjxDnePu+5/qIKl+6N6L2XwWFi90U4stO3ykH8FlRcQjZLKrtjuwc\r\ni0KDlCvCqQVWGfUAL0mrKTsKVA+VO8E9j4OHWJaEDjenyWL0Xft7BBOG4I3w\r\nJzFDxwDHy6DLPWBrbOWhIluM+VnIVeGOjEx6SVhyeshmxeobTFjpdcxIhDDw\r\nkCnh0Qko82gXDsh8q7pGqwN59EQ6GqRicKVpXBa65HHxIouaVVwM9nNphzqs\r\n9beUkOYwxaugc36kgJRAM+PFtXHqo2+zQk9A5ogM6j4eJj+aUjX8OOoEn8iy\r\nyzgDKmxflxvugfHekq90tGQV4+XFxFmmNFDtQXC+yqRlROzGeYboxIi48Nu+\r\nUgoekJ8AI//9GCISC1GR/F97so4AUi0mlii9sfRzzpaRmtwEsD3sPU6ozRWu\r\nd6HfK3jqOTUF0ovEjxqlpNdeLyddtZEtcaQ=\r\n=zE7P\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"e547302a92af97fc8f674260340d659357b47f2b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.51","@apollosproject/apollo-server-env-mock":"^2.46.51"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.51_1648678444271_0.528572103180214","host":"s3://npm-registry-packages"}},"2.46.52":{"name":"@apollosproject/data-connector-rock","version":"2.46.52","_id":"@apollosproject/data-connector-rock@2.46.52","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ecd8bc39a1191e24d5a4ec5073c4dc312c9d95dd","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.52.tgz","fileCount":158,"integrity":"sha512-RRuN8sSL8xpbWchmEN/OoPNrPG9e+psajMU5FA3O67oT/TFVcP7Eb/xJ9fkl053V80RumtXXJB736lmXdjz2xQ==","signatures":[{"sig":"MEQCIHXsbpK9ocL1ckhwjXw/o6fJaSnk35+ht9k4FsSudLTmAiBz7oR+QOX/kdWGWLIKM99fy3sqva2P2LSGKfnGOOZCLw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1102689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNcAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJtg/9GupdipZ9RbXjS2+A4sP1pvETl7hLP6mA5+E2wD7ZO0TiCbyk\r\nMrolitrnSx0FZIKxCxhowyyLoqVELMT3CDn6s+z3zWt8EuE8qKPTXIFqv+5H\r\nt8jydwLIyh4CrAwvkzHUCwx/3WF1rkTOFMGK0MLjxq/xzzQGIVde6NPJ0fP1\r\nJ8XYtRzz4lioGr4czcLnFGMWBLxoul+MH1sQ10Ad5a66nk5mUPDxbfijumhI\r\nUEm7aLGxD5dTEH4ay+W7Y5evlD97getdmA4Lo/GSsVzUOjAB5r5uhfL0G8gw\r\nXcPV9s1Y+zpTl/WypPL5eDOGStvxvSEvtMKllJugh4G6yvvNToeJBmM0/LpC\r\nfbbr4xWoz9Yjwl9AE7yQtzcF8jq+DS0r6sLg4hGiLOQC0u75rr4I7gy55WBr\r\n2H7/3nqnETTHYX+xLi85/E8iJvkaxl6/1e39h+0CJ0n6Mac2u7Gx6AezzFKY\r\nL6J5osnc40SRb85Sl015KmK1dbZB4fI0ecTSA6pwGnnbNCeC3IEvpggQPcQO\r\nqQWF7QQlf8Ymf79WcHverAREavGcnQI1mA9hsHK61FmaTpBRP5VT7DMtUJdY\r\nNdY9dvdjfci4M992U4H5HX4fmRSK8yUPjDUGLuIfQMAA/5Gr6jGOrSbgVGzd\r\nc3r7Iw7RfIfFKf0oU7kaW8IXTRHuAHlP9Nc=\r\n=n24W\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"49a498f7b8ece38a2dd91503b362a199495273f1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.52","@apollosproject/apollo-server-env-mock":"^2.46.52"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.52_1648678656722_0.8532358341258326","host":"s3://npm-registry-packages"}},"2.46.53":{"name":"@apollosproject/data-connector-rock","version":"2.46.53","_id":"@apollosproject/data-connector-rock@2.46.53","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"48d80236e24eb0dc7b04bbc00614263185ec19e1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.53.tgz","fileCount":158,"integrity":"sha512-hGm8grbqB4zMuB0maUK52gdMoYAmSIPJaYAuBpoFwDuu9GgcVXWlHcV/xZDhUUSgqUTFBrqKQls6Rim73mu4uw==","signatures":[{"sig":"MEYCIQC2VEh6JzkQE/eAo8plduy7u9cSh3fewXQKAc6lP47S2gIhAInuFv5qy/ZMP8D4foZjWqAF/aLkUFIt4+OvZ4uLTcmb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1102874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNejACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2gw//UVCYWp2lmhD0M6vYEgm7IgzKG/Evt+rCahz5ZAKjg4Pr6pve\r\n0OjOAmxhxFot68a8FzQ1Ul88QQT8k0dq4vN2R/6QzbFYZh/VTZby6lqL8v6C\r\nmgWbmdPNMG8PmKIRJS/yVL4H8UPur9LjlcwZYb2VakKxYSM4VT0q652R4r9r\r\nMC/OVxHoEaoQPho4+RtJy+byU1Tg628XTfK9a+042sqU9+oqsxSL4J8mZPXN\r\niRWpaYdof2wOfYSdpbAZ8AOO/6owmPB4jPRgB5v9sFxJC3D6zlk67571/Qky\r\nB4+oj64WFKfYjN1tidI+ufB9DM8iaI0Vfcdm43N+hdKtcQGgLaGkLQMw+LcD\r\nqabDBu47mICfqUMS0+Hph/2EAnzhbBHjCa/8Q92hxynRH0gJ3eYVWU/Qx0Oi\r\nnKPcGnAVivszggsgcDic2CZLh3fFjHzefw3U3juYOZfvIuuPbsRSxyhAHDno\r\n3oQGDPZq/ZjeuU+jA0K9Ais3wuXSdLgIMiga8KGbinL5cNT/F7xzt8f3clwF\r\n8WlWRgIngmQ/P23wjWJhOiKS6UqiS2xPofuGKlVuBa7JWO4ID/vAIFjzitom\r\nyGiioaCsUDZkQQEtrjpcbpQ39T2HIaqLg9+IZg7L9Zr+O/OPsYqCKPb4z8p4\r\neq+tsC/xyEdwdqF6oD5MutzRd9unoPFRH+g=\r\n=falT\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"111eb7272afd17acef59ae25c1c9ee491099f57d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.53","@apollosproject/apollo-server-env-mock":"^2.46.53"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.53_1648678819111_0.08332720108857905","host":"s3://npm-registry-packages"}},"2.46.54":{"name":"@apollosproject/data-connector-rock","version":"2.46.54","_id":"@apollosproject/data-connector-rock@2.46.54","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"884067a4c3def7e20e32da0ef1c4111ec5f850e8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.54.tgz","fileCount":158,"integrity":"sha512-2aM+QsIS3czl8XDz3rtzFTq/US22MR4BhW5GLtEWpEg1gw1z63IgZctH0jAghMToiwhLumTbNOXP6qYmZm2pFQ==","signatures":[{"sig":"MEUCIQCw4q13+LbLj5vxgfUPvrKHJjUR519zdmv4wFlGdyIUkgIgHBi1tHE4a85ZO4iGetuVEolhsZFlDUm5QJLN7eJGMF4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1103059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNh+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrP6Q//RRA4gwF4lxV7S79X+Yw0Pb+P7jtyQ3Py9q0cVf+2NRNZqpMb\r\nfRBYVBpIRDC0c5D4Wd9XMiukVA7MZMjlfZ3617V4CxUDC899rC6KrhD1u2IW\r\nVbzSZLWpej7bvLkrelPxF8PyXCSFzUsd3Nn20EY1uxDxqFavK+ITsZTkQa5V\r\nQJiZ5Xc7141lM1iiQyg5NvL7D3Tvb7LtajhvcPX9VNF1xC+97uJfjTZeK8ul\r\nTE7pmkkBXy82a90zIu+i2J7wodun1i6iY24ZXFYplgjJ1TIK7lachvDa/sio\r\nQI6zjF0TYJIE2ZchZXm6p/yQ137Gd9fTSFE5tC7ZcZg88cOTqDHfr2CH2MKM\r\nkqbrHsANVHMblb87j61g+i7qyMfLShxs+El+MnCXLDQLBnSy2h2EVSNdKbAQ\r\nksxXNM3P9etXG1YIAPlruKXmj2U+l+tezgFF0YdhVH3kqTTKV2EIoC4xvneu\r\ndyxNI+uRECkBh79RwBNbzkDZuajElGrvPDICvDOh3aluMbnFc5ZSvDLmEb9H\r\ntRKzn+0dv9I7KCaL1uxmyP5WoZOrU9gX+egpncHDD+desiGmNklzKC/CLXRX\r\nUn3aLOE/Y6uvGnYVBdClIxozGIVx+DOHUvn/ffBnd92dYZrN95sgy8Q1W3fF\r\nQ0KLKqbkaQY7nMHoRihxPAOcwWMhBEGgsFo=\r\n=U67T\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"82fb8e8f0799966593882a6b9265404cb426b39c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.54","@apollosproject/apollo-server-env-mock":"^2.46.54"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.54_1648679038235_0.9024015179771787","host":"s3://npm-registry-packages"}},"2.46.55":{"name":"@apollosproject/data-connector-rock","version":"2.46.55","_id":"@apollosproject/data-connector-rock@2.46.55","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"22e9e3acc0355ec074f152efca1c1ac3732bab21","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.55.tgz","fileCount":158,"integrity":"sha512-kRunLxhfbHV3u7tEiw0xUzrq/J5+oQCrrXow5W3yVOCP3+8KPn8RJuB1kMYIhGL9ExSUBVDnd/LnI/JcMGcmnA==","signatures":[{"sig":"MEUCIQCyt1gnyPqCs8LCeTPD4RBdfk24b5SmoFW8oarm/RsVkQIgNrXqHRgGsPsPq2Np1k+GZXeJnax9qGgNuvO0xhWsGjM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1103244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNlMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQmBAAiDE/RGUM3IkqtXag2e/vl61dkfzw/FL7J+BC5f4AoALSjzPY\r\nX3C4R+v0l9jVjl04dxQCWwbjuBsydECeaPTFZgPxXS3O1COnjtl5xRg4LoBr\r\n/Ny/IKCxCUwXPa2aomvY72y7VWNlA/+UEaxgTY1XCaE0mr1IvBo9QRUYvZr4\r\ngedeYKNZAZT72PLQ5fayQFQ0+EqOdDHyfWQIYBTv3pHrMB5PSrvqRdesZdkL\r\nKxB8NHH40+ej0erDsydno3NiRzyUSdqO3G7iE3tokLYtbYnd4wApJZDdAGQj\r\ngYpJ7p6fFguvX5oBQq10v9NJSOLfxKlnUr1OLmSCYXLtXnAQnSDHWAFG84pz\r\nVUEVNElww7TDNw7iF7e8lFdPS7Zmj9d3MkixNNYOZzON9WV2DAXzECqq3rek\r\nhBpIKK4g4Abslh5En3zofyp2a4I6Ya3St08ScqKbLDqWthPL9D8rVxtX3NBd\r\nmm5LrrHAcjaIRsVKW+tDnEV2EeZDev9GOH1K9LNMgZCxJpkBQi5brTwpNtmS\r\n5yLfhF2BwEWeZHYwM3L0QSdkJQOWCuZ50EvyU/dU8xRJ58KsEQ7Xy0V6gAhX\r\nJBfCqt/3SINmdp1KVzrDIjFLQY39P9Tx/BeKvPSn6uijRNdjWlizHxCLj/kS\r\nFN1cd+f9nY68w4e6OeAYiFSzVt4OSwcsvSM=\r\n=QaXL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"19ba89015b71a9ca8b2e3dc5b92e205f5b7c732b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.55","@apollosproject/apollo-server-env-mock":"^2.46.55"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.55_1648679244583_0.3676424707734387","host":"s3://npm-registry-packages"}},"2.46.56":{"name":"@apollosproject/data-connector-rock","version":"2.46.56","_id":"@apollosproject/data-connector-rock@2.46.56","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"867f036494d285c8929eb2a26ef405c83c488073","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.56.tgz","fileCount":158,"integrity":"sha512-cEimka8f3D3Jci3GhhV0NYji6oGeMbxamkQ15np999CBcuYmXmtt4kXbOzLDoThLSj7owR5f+AnHmCV+mMeWwA==","signatures":[{"sig":"MEUCIQDTMLkKmINYZ6hfZSEjS0k4ivm6IMVfQ4CZ/VkDUG/T9QIgLCyN7DM2ZAqXYTQwCZaPb5h/hr/VgHb4zlWc2vRZep8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1103429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNoKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoeLg//XDJuXJkRLy9B2GRcBMBo8EXnxIPN9Z0zpfeCZj84WkTh9Jnk\r\npdVWEgc/ZPC0IWy6DhibZ/pS3+ppcLG7RBlsqYXENiAzo1RMFPE9X197GS1z\r\nj8eOQ75nWyMZts5Ck/oVpdJSv2tZjG8j0qWDlznbS6JPmUqYN3LrC+2i5qag\r\nv8MzHgvjpnJTZrRwGWImLTMSjlURMQebtZYJwp1C2MJdnQozPKZ7X5paiTmQ\r\n+POEIzd39bOHz1rtLplPChefzZi8s4XFc3ocLcQJtLeyiLiP2LZmUbqhQsZU\r\njubjKpiMbXqjvqbdDnK1BrXbOyM1AXeoCtS0v+ttwmWqRhABvRlgRP1fmyk2\r\nQRWYf9qbBeBWQE30bB/1w3pqeDj+QOiASnJtKSMy63AJKYU4zL+DxYKtuHmH\r\n6GtmaTkxMOfhtzig5O8kWX9vjk6JN2fy23DeWgGKpdCe/HKxdMii7EAIjFiM\r\nazs0VdnFHuSImAeM86stOGFV1SfPizGQVq43dKR/8ROexXsDPZld1bGTNLHY\r\nQ0qcKOfRsrv/bH7sIGX4A5JRaOcp6YNrzqN+CREvdhWOaAXpHx9QUsrmkobm\r\n7gRt8lmZPdCBju6GHH4/EkjgF3pFV4Ltb6+S5C3AyIoDmCEQKCt/MVRK2StR\r\nN0eNeA90LPGCXElsHv7v8egwl7uhq38bQCg=\r\n=grxF\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"cc962daac0337cb566ce8384c436feef3a017d61","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.56","@apollosproject/apollo-server-env-mock":"^2.46.56"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.56_1648679434505_0.2604700783516538","host":"s3://npm-registry-packages"}},"2.46.57":{"name":"@apollosproject/data-connector-rock","version":"2.46.57","_id":"@apollosproject/data-connector-rock@2.46.57","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5efe4f44586f0ba3c2cd8f318a4c1eb9bc0b75ab","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.57.tgz","fileCount":158,"integrity":"sha512-eTezqYWw5UACmjlxZdpvGyX/G2JID5zlvoCJjmlLMffv8dntnsBkfvSesqavcZrK1a5TKGV3tY18jO8tgmID6g==","signatures":[{"sig":"MEUCIQD6VobQ7PhmOm1pJgqKbAxE/YUeykeg025bo+oR35kktAIgC/OOxY1bZRVwlukCgN2cISpmrLDN8xC8KKnFpjfTI3M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1103614,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNrXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEJA//Q4tQEeIwkGy5UCqDyhGMXBOd7cwjcghY7cXNUWPleRpfoUL7\r\nXt9DUvoefSp7Sk71Z4qxSUxUah6uXGQY9ergudbBetsp1c49aoQCX2+Y74Mf\r\npsvH6CDFONWw6XozgroCDsPiaNnsh40MpsBqX7k6LSqETLe3ogw97jEG3gfm\r\nH3DQVmqx2MO33CaFIykTiEO9Cm8h/yNqFJRCDje7Corpd8ENKDFKezSw+Ap6\r\nOzoTIv00GZpXE6Sbc9ifM291ftVsbFsmKFQ6yz6c6CmJPGuPFBp5GKJ2ekN9\r\nIrGDTjvNIPnQXm6qGnZm5/I/VPmqXtZLUJn5Nlk6sUM6ESp4dmbxVRwGSS0n\r\nuyflNWnVAx9+6yBpfUlsagbCNMMQSi7N50iyeCVZoi7Q8R4bIcz/b5BQQZNZ\r\nfbRAcsze4rgxOUPd0ixxrNoqaTHJ30dIKq7zFFMTh8lu2bsaCA1kXoydZ05L\r\nMtDxHtSzh3G1jwuZwyahXn4BHaTeBGzalzMx+U7iNFN3C8TJAJK5XYjxa1jX\r\nqJmDqQZKNED3ckobOPixp65zXU+A7tglNGriw12Zgzulalqfk+qDMT2S1rb1\r\na1ItVv0z1J17oOHWJF+PstQwjKNdBoaVQcBclgo/C9XV/qIVCDgHU0RGbJQR\r\nd6jWdnkq9A73+GFnO3sfJIpVtLMsImCKjpk=\r\n=OvAq\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"739d92eed45a2f3d60f6a5614741969a306c11b4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.57","@apollosproject/apollo-server-env-mock":"^2.46.57"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.57_1648679639735_0.06883218089575283","host":"s3://npm-registry-packages"}},"2.46.58":{"name":"@apollosproject/data-connector-rock","version":"2.46.58","_id":"@apollosproject/data-connector-rock@2.46.58","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8504e7b49bbe00399ec2f00e0171ecc91f0f6cac","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.58.tgz","fileCount":158,"integrity":"sha512-+qltg/zkvvPCy9S6exSXzVf/RNzlQMxEMJ1XtoiVoaYcmRP3HgkwT1JZaIcuoOP5hxJmGBMvDPIqFC+UxEf5Hw==","signatures":[{"sig":"MEQCIFRugz1kfzabERO0XTyblnLKn+xyURdUNpd+JJN8vgLCAiBhurMO3c1UKT0uxZ4aBSLDkPE1ki3LMKPN/tceQgQndg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1103799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNtwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoefBAAm/vneW1/7LfWCTFTX9W99oKMMqREfHH58Xeql10gjOjtrHgB\r\nURAoXJYn/Zu/pePFpdFIIAVW//20GG9fhlIfERVHToGVX3wumXQZ3RH/IMEz\r\ncWsPX2mpR+VSxWof/ovdifmLQ6UeM3m4bS4GVUqThvDAF4xWKOuK147onC98\r\nyAS0wb6FEbGNL7GsFgRwwNF5lUVRXMcMfVpQFpiDMsghI6fxQsBHBTUAMVJX\r\ni3CcpnzxlWlxXT3KQaUG9yNfmy7wN8b3chpnFcXSV2iIHPWrR60/ffKIaKvY\r\nxZg+EcDi7D7qIgz0/0v6hyS+E0h4HQeB9SlDc52oalBCxsh2j3mm0hfP1ovs\r\nA+g4aS2hZn75+Vnbfxev3lRsb1dF38ntMXC4Qrwv4EsnutxT3r/81/5+Tixz\r\n/HDZmbX+CgWwMP/QvoB/equWG6t+tGceJ5SjX8YiX7JBNrwUlhj7bXIk1kJu\r\ntiwvZj7UziJVwqPrtM19NVIubyHj9W7RkAerNZuxfjRUnyuvUDnwU2nzsQGR\r\n06q55kmw9U0c4+NvvzRlFLitfsRzzNsfimW3L8GOBTXlLTKx06uZToh5kgAH\r\nrjF4JfKn6oLWk7ewdslw/RmImRIM0PopE/IHE+KurJ1lyqEihSGDU3bMdnCe\r\nA/6sV/UR2CM8NgNzDLwkM2jvM2deZElde6A=\r\n=V99p\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"06b89ed1100b587ffed022637f1695dcfb7b538b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.58","@apollosproject/apollo-server-env-mock":"^2.46.58"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.58_1648679792481_0.9397755229470599","host":"s3://npm-registry-packages"}},"2.46.59":{"name":"@apollosproject/data-connector-rock","version":"2.46.59","_id":"@apollosproject/data-connector-rock@2.46.59","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"4725428959aab2e088f6e5adf288cdea95d2ddf0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.59.tgz","fileCount":158,"integrity":"sha512-2vKuEndtMDwbi0PqzGD8fD5mTRtTiCoEFm/WDvRj5UuenRwT86XYtVLUpKteqGKK+YDfFyibE7xIXBKmfHT3YQ==","signatures":[{"sig":"MEUCIQDWTL8qiiWFLflxh3JEehaZiYwj0cLnyLWlrX84FtfJ8wIgJsT3JBArQaOI0G66+Juh8CCLIJ17q8WEU/PF6ZHs2hQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1103984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRNxYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrl/RAAiO5qpTbrOjAkaE5yCi5FgmZ+7FJ0Yx6EU+Jb+s0XBcO0dEHE\r\naNp8uIroa74+wJVy5NiRxQ5UEouc86R8OT9PA+4cUdI9wN0hbKl5hHSmDQyf\r\n9bB9AsISJXGa0pCK8CKOGDG+WoxxJ/C9JO5+zbbVYDTBqLkjYDhN84i56bzf\r\n5T4rKwZo+DBN5Ww3CYRItxtLwc6mgQ/qzBAIsw4ml9e9Pu9YGtn7ptUlYd7N\r\njSsB48RYRYngr1eA2u+h9na/UDIL6tQyhHB4tvt33dvEaJAYD7BN0Nu7Z7JE\r\nmWF6AjAPH5fVDzpoJLz8D6OnQezo/iF6vAPQ2eyRwMcjirFSiDxJqnDFNO0d\r\nyt7AdCddWF4P00HlWpCjj4C+17NoLGNMfXSmAgpF7ao4Gmy+eb+W1GQL1vrr\r\nBGemXpOwQOLHLoNaaMor0LzlP4W2S83bd59T6KYkKkt4q+OMnvkovzbtkDYA\r\nPMh3riURTHfDjGDfV+ZshePI0j6OKejjctFycAYX6iSmyKzWFhy3WjKo1laS\r\npLGZAfXXVyKwoJqJeUERcjs9fRK1ZzxfgELlpB0Nj1FfiLTso7KN2Fnaonwx\r\nKqDmG0IQ4WcQ2O6ihxy56IMOcyyju65wQU5QLT5FUPWScKd6DJGaDQOTyy3F\r\nmyTDf9gmpRnoJQmi4gL0/gWsyHruHGrzUmI=\r\n=8YBV\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"59847b348bab05c7916ae803e783e8259fa876ad","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.59","@apollosproject/apollo-server-env-mock":"^2.46.59"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.59_1648680023906_0.8277296538321457","host":"s3://npm-registry-packages"}},"2.46.60":{"name":"@apollosproject/data-connector-rock","version":"2.46.60","_id":"@apollosproject/data-connector-rock@2.46.60","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3efbda4d40480ad5b9985428af0309f350a0b495","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.60.tgz","fileCount":158,"integrity":"sha512-kUm4Niw7Vd5EwrpiBo45mcSCx71JHTx2dbTTduPJ+7A9VHDe2FZGm/p3NNIQf80zR2MikK5mAhgIzJ3dIuxvOQ==","signatures":[{"sig":"MEYCIQCkD4N6EZVeRclQT9KvWeHRbOlbnC3o1Cr0Z/vX4caKjwIhAL9PnSvyxfgPcxQem23vxv+y63OXumhuqD70RpHUcZvR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1104169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRN0NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmruEQ//am3kn8IEcXB5p/MU4UHjvqUpCh6vH4K848nDjXgBuX3jUOsD\r\n6onO2lT0aTWNv/7dRXPk7uI6Cvtfd2OuM0L7brRJSaTfwp3Jt4qC0tQT2eQH\r\nU5+bj5Heihxhgf06JN5MU7gY0KHP06mRSvPvaHxThrvPlzRvx3m0BN5z30a3\r\nlBIG9TXvD0Ex9ncU/z1rakHDQnXZZKh9YCwKceM1H1w0lhKl/Y270yjtW+15\r\n5mPls5BULEgm9icrnt/cMgfdUZp1eDNKSd8Az0FYEychy6m/7RGBnOX34meP\r\nvZgkH/MYb3GkFXdVhBp3OmomoU0259rTmFg25hvrKxZcL6zyaIjuAo5VO0WP\r\nb9C3DvLiXrmhwjAbPThNE4bwdbjSJx05/xM7/n9t5fVdXOAPBOra4HgD0hve\r\n188A3hiueIqC9CozcyhRPZH1VF+X4wqF3wJh50VDR2iLz1QHHTp7mhjts7kK\r\nrTvkK7KiOOw5koTKGHUKX3fKohHKocPc2amNPRzmwiTNtMas9ikWlNdhQhFB\r\n/eF7OAYnqE3tDS2YPRXh3XEAaluT+wPDOHTpLxqzL9pTOndN7C5WNcikbxer\r\nm6nnfOU06PoaSMlju27m04qG7IlkZ+9HMtoQ5diHtHkOBx4kKuiX9pVh0lAq\r\nH0HLMIJM2ZmMxN6GIwFPWnAtJdAANgqYYMY=\r\n=kcew\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"050a3f57fef19a48044a62d0803d1b0c7b4f1ce9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.60","@apollosproject/apollo-server-env-mock":"^2.46.60"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.60_1648680205237_0.8310392658721351","host":"s3://npm-registry-packages"}},"2.46.61":{"name":"@apollosproject/data-connector-rock","version":"2.46.61","_id":"@apollosproject/data-connector-rock@2.46.61","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c5f5b4b5a9d4206b92e987651c8c810e6664c485","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.61.tgz","fileCount":158,"integrity":"sha512-0VMDqLaTZJnzvDIK4W3pCwCRhCAjlLRCWPR4A0X5+HrQ/STbS4pnQ2R6059IgtTC7z1Ws+xEDM6FS8JzkoM4ug==","signatures":[{"sig":"MEQCICAy10EbyFCj26gE2IU6k79xrwLrekjC8p8SHXfBVYY3AiAfsPQoRRR375L14rK2BDw+AITE4KJtZOmrCSVSnhgXWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1104354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRN28ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBXg/+IcH0IqHFx537iR88JwOKNaFoVtf2BRfkhi6zV6yEy6f8BEhS\r\nhT44WUVPZUF+CdSQmI0UE9RzmWrdVkiLBQ1Rg4SsPF0CUtLGkVjtE3kUDVoE\r\nFInkFk/wVuHPMjqI+XKB4HPSXxKTupjIVQ1IK///51Txrm6LeEm/rXWDuiWr\r\nV4MVuhiVW6SBQo7sO/b85g4EVanvQBOVqi9g0K2lQsVK6/Ni/JaMYl0FSOqA\r\nCJytczPo04pWqw+usQFkhVzEsvCOSxU548PrUWqi8Y7R3lXYJ4gsYYgjzYNx\r\npu0F5QfRoaWpaQrMPIEu4EyyNcR1HINb4NunzDDw4l9vwgUObegI0NvCArh2\r\n1ZzFWq/OrP5gHSkxomxRemDbGNDiVXjA70Tmlncs8yX/SF0a/3C4rF8Bs6qY\r\nKTX3Ke5lvA4B5ad36cZJ/hHklWSxC1ClCr0YGPbLqRZny4p5ZOB+f392olRH\r\nlbVKFXUXCa32ql/WWc8YjkXh6Ls40q0E9ps2INtDncVgSV5hKgrE8NvduHgo\r\n8h4AyqXcK1XfSbIJchGNqyA3JnFXgUSr5lOx7ioGXi7v04ge8WQ+FXP7dGaQ\r\n7SOiSe/OJWnah5praOOVNc/3ZMXQxhuljMOFTII+g4p4rK2ecOtu2MEWcuf8\r\n8FcNZUFpP0B8fXrrIamlN06aRXT8I+IHIdc=\r\n=ofi0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"6c4ef822ea09370fdaf19b90ded0fd4b359eed78","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.61","@apollosproject/apollo-server-env-mock":"^2.46.61"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.61_1648680380098_0.7691512118059838","host":"s3://npm-registry-packages"}},"2.46.62":{"name":"@apollosproject/data-connector-rock","version":"2.46.62","_id":"@apollosproject/data-connector-rock@2.46.62","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"92ddc3867db2b029aa110d44733e34fe60036dc9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.62.tgz","fileCount":158,"integrity":"sha512-y5RmLhfrfquFc5j0ae5FEL5v05JW082MAjkhX07RmBFtZzgZm6B2sa3DT5wNTMm45TXEXMxuFVc8ItWeUBg2yg==","signatures":[{"sig":"MEUCIQC6FU3gvfbDL8aj28gOcdqmPg8FifqOEgihH7Y8mDCD+QIgQtFoIgNQiUoihTrSil24i5RO9PeZzE6qQQ7FiFoUJ0Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1104539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRN5XACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJCQ/+NKgTiSEkr+lQGbfl0ep93iQ/Hp8ixIL7yWnHwSEvFazD7gQw\r\nMBE2H5ze9qMdAfeH33RtEdSwAXrHICQU+u4YOxHiuy4jcXCDmpFTm0czFOUC\r\nE6vx5+5TUPThfEh/WTiPJcF0LO1f8rHffKchUCzGRUiZEMYLL+yUYAjRUKQD\r\nAZEGMgv4c6CABFsGtkAWz59Z5a72Q5p0EI0mgw8PKU1mkj6xh8TMTQ9541PA\r\nXtxrqQEP1m4kMoyPnsiNufwxeR6Co9xv8gQimKUJZF6yjJv7JUmWIQuyZ8EA\r\nfLJQ6HwqmS+zbqKM/WpjjBsahPbyZUaZkm6uCy4CHiuiMHwHBOmj8MifZ1/n\r\n47E/y6PS3oaadRAH/0suO00QwM7XSVENQf7XxgMvekB28cC9u+jG4L3+yvoP\r\nlwXFVf+ECYRv1bTTnsVjY6lnQ8VHBI+ia09JEIR/lMrOZDmAPl1eHxkaRllb\r\nLJ6Uy10S7lmp6nmMV8U+vRYcM3UI+uErg4lJJZXPcRP0msXD9kpPU7U2BTsd\r\nIfoGF57prD9D9M7ptVtV5mQtc+eMhdb7iWbe9pCWg3G09Q35e8ysfFGEMRsq\r\nPdQ7lBclxBDAjqBvu8rbwImZWmGjo+B8ATj8nEC26bFDjO2bezkKM/GmdxHh\r\nFDEfrHCFx+4gi4V6NphONKfrI0yMedQQOMs=\r\n=/OKt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"12886bc38d722934aa5739f2090e7ff9bf936ed7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.62","@apollosproject/apollo-server-env-mock":"^2.46.62"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.62_1648680535420_0.34507434438872786","host":"s3://npm-registry-packages"}},"2.46.63":{"name":"@apollosproject/data-connector-rock","version":"2.46.63","_id":"@apollosproject/data-connector-rock@2.46.63","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9488dcdcbccff2a425d80bcadaaeb1203712cd14","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.63.tgz","fileCount":158,"integrity":"sha512-Ty4CsMCgNJhtpzpfUwKo9GwAX3DEwXhD1uM3MH/AweUKnypmtY4ExPMncT9vRT6cX7RpOFK2uZqcb26Ifu6VEg==","signatures":[{"sig":"MEQCICL++gNedXeStru/dV2378tdoUfhgtgl3mI1SsYy0FCFAiBh/JtjwJb5Xh2CVpb/kWc3V5ckOltRcm0HN9IyQM2H4Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1104724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRN74ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmokEg/+Irlknd+QUqg4bzbOevDGPBe7uDOyfFxCm7GAlbHYltJ48IWv\r\nKfCnHb2b3dYB6MPNW+QDhfO11+B0Vu3Fb4SJKhD94LEx9J+xHu9tVXziGoS9\r\nP/3gQ2QEJXm97vryIodOah0wKq3iRb0ROuMysy49MLGWJzGDu4/a+8ZcQV6B\r\njkvUlvMND61ImTlRNNc09zLXsAC5oTJfiojMfZbMWo2ugPhH6QIx8qH/JTxB\r\nXve6dGwyo2udHrN3hLcSlMt5wRlPg3thTA+iqscRqD/DXooRPgTrUIVTQQld\r\nkUnbBblaahcJwO0T6J3ta77LDRKArGbb1soyM9uWO23R7YnzHCjUMGPNSAfu\r\nMBW+BCfph7zllRbFFK1VM/1o1U3DEx89YmsiCiR8uTvqn/JVwH149XMmBSaI\r\nqG92yKeh+M64F+kQh8tqArEyrc+MUqkK4i+zZJ2FinQ3qmNEW7t7Uk04mb5F\r\noLICy/qx0d/hhjqhI4fOnPyg/LjEUJTPvlf8xUWZ3/A92otRXIJI3ji6qEkv\r\nXf3ejg3G7ho9E4OnybOb4h59whOyzFdGmP00KYoJm+u8RE/FrdIcoHXhCxlI\r\nByltUgP62eZntPnDM7aeUEaSnmyoSPOt20B1kUiKYHXlxyfoQ25ZEZSvPydd\r\nNZgrPqCuigvL78/gQ0rKBzgVIOlDgC5X9OU=\r\n=IPI0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"9eeccf69d2b34823f6e946ccf9e75dd472192d63","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.63","@apollosproject/apollo-server-env-mock":"^2.46.63"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.63_1648680696479_0.36733119719661356","host":"s3://npm-registry-packages"}},"2.46.64":{"name":"@apollosproject/data-connector-rock","version":"2.46.64","_id":"@apollosproject/data-connector-rock@2.46.64","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"fc77e11ff3e867ededdac167df74833ff0dd1cb5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.64.tgz","fileCount":158,"integrity":"sha512-lCYv+39nJyxfjewLyzRTcpBgLoIybKgysHmJ+vuIC1iifqw/l50C5kPiCMimKeo8o+qtcIz3mHKgIM6+otmo8A==","signatures":[{"sig":"MEUCIQCIainZYT3Djmt9tkTjD45iE1fCLIEd4P4FAwdpUHM0sgIgDQ2RGTJGdPcpUohd8GbOrJwGfgvOTEX5ee95ZE27Fak=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1104909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRN+lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLPA//clsCQGufI4di2bv7VV/jZdX8F43zlvnB8KXQFDFHVVkgQPH2\r\nvEYpqq0Gr9abRzLqylMDRJ+JjxI0T6UrHuLjU7laAc6nZXgLxmJpMuoXSiFV\r\nF+WxwyqRy2O879Y+M7I6C7S3tEI9NxcIOVDgSa1eYS3XAYFItN7GLI3n3QK5\r\nlL06orcbJundUvADCR8F8ScJF65c3ENChs/DIpvsjpFTYPK3AqWX7z/lor7u\r\n1f2KrpVW0hwWXUqpiSIlj/s86hgYVJQn4DOomJ7VekHme9aPhiW5CLXo4Zr0\r\nWHF+frE+H1Y8HgXyNB9in0rLtNM0UKEWxBnUKJpJybseapbCJWOOlP0FSauF\r\nsRDs5G3F80mdhwQf2YuaX6kAbulV1jV+GnLz519IxF0zkkHp9FBJqcIs2UCZ\r\nVPX3Vf4s7hAICaqyU4JdgzAjlOqoE3plJd5lz2fUtkTpRe7SIiRzHIonQspt\r\nuEgr9sas9GvRpsn0izELTYC+fpm0+SvFJivwmcKUdT39Le0kmmcPAYSVK5eH\r\nfc7b52cousEYHiS4rVdfNqgBAvkukEYfTOa9Xmh9GhTxLf69pPx7KklIQfEx\r\nwCY4C6FI8hCUy03gCd17VfOvB+ijDCr31wk/YMONmTNw/V9bwxoOyMb2bR/f\r\nuIB23sBt2JofB7hqN7D9QapGlIAfSeApOxY=\r\n=LKsS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"55669d22400dc362a438e03c2ce35d76d0d2e883","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.64","@apollosproject/apollo-server-env-mock":"^2.46.64"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.64_1648680869370_0.10444591190189101","host":"s3://npm-registry-packages"}},"2.46.65":{"name":"@apollosproject/data-connector-rock","version":"2.46.65","_id":"@apollosproject/data-connector-rock@2.46.65","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"bb1b6a8728386d516ead6df0cdd5aabfed8b6344","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.65.tgz","fileCount":158,"integrity":"sha512-BNo7ixTCraSu9sv8p+iwbZ0NgUGTx/qkJdT3fgE7DdcsstkWfPBD0IYUAIEhQAexWHA9V5lGpKogEXqW6Koong==","signatures":[{"sig":"MEYCIQDT0qVUvGmbYdelBb7cAxJtaH40OE3+obtVDDsyNKpAgAIhAMKBMbrKtlVKW+R/SvGyiOzHMT0xOD8A+IkpZYF9FnJN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1105094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROA/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQeBAAjGFfZq3Tgpw1PXgYJFMeAWTWv+gHfyit75M6kI1Nrra+k9/E\r\nw7Osk8gfEUV9n7iD/65TAiXc/fDRVyGDJl6Pw4I+X2UqJkYw36+v4eW7vgXK\r\nWlDVDcPoHZWbr1SwPynjaIit3wzqugQdkETvMvJx0pIXvrYMGOHGoIBuMkmC\r\nDyFFoICd8mLtfskuk47K5mb8viJuvc5SkqJhpM3frN2ap3DO/Z935Xe4zYnY\r\nXhBTIlUwihe9r7+SbbbL9iqms6yX5BzPd3FxvA97RefO5joeAm+JlraLEiv1\r\nfVvONG1YKS/wSsDO+KEPS/flUXwDD+OczHVEG98GEalRoJvjhwxxGl+V0cC+\r\nzNILK+HF3v0VRQPaOvYYB7visbKBQXCsQRyYJYAj9MstmdHhw+m+0wuY/eK/\r\n7qZAMlQPKgBr++y9R014jbQhf9edQLuLNsirjdNb3+p7HQZgo5ImHr+chqW/\r\n+2M/II5LxyCEqCV5+uKlpDGO4UyBNJY8nOk/fC9sXdprH9/7JGOLtwJKPXbl\r\nFm6lNGQJ/8UHm/gWaDc+FmF2oaWZqqEF79NAWwQdoYjePc6+omjFn3oU8UW0\r\n2B0371pBsaPULu38lZJpwl0NT5Lf1AHlTTG3Ibql4mq3eZMPyrRqgxe8fdmM\r\nmzrp/u82Nf/21srTNOBKv/Kc7HK87+k1WT4=\r\n=z0dM\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"028b76b4d66a7ec1d21fbccb07e7f56949194939","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.65","@apollosproject/apollo-server-env-mock":"^2.46.65"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.65_1648681023670_0.9493419782084855","host":"s3://npm-registry-packages"}},"2.46.66":{"name":"@apollosproject/data-connector-rock","version":"2.46.66","_id":"@apollosproject/data-connector-rock@2.46.66","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"623226b5989d936ebeebb3785eb71001d79b73b1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.66.tgz","fileCount":158,"integrity":"sha512-5TLKnKw+tcqTTZdXe3Pzxqrm8+SfOlXEUGow1Un7wBeKMqw0rV+3G+hHACBs5WiZ0RV7v2bwjbnpcOty0cGlAA==","signatures":[{"sig":"MEUCIQDkRiAECcdFc2Xr44mKNQwbd3G4wZ9Rm24+PQLQYF197wIgU+DU4M8P2Mk1H6ic+B1aIjkjg3RD/elObo5Gpb8uk9o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1105279,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRODeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpiag/9H1qciUpGt7IeXL55dlT0xPXsw7plKyfPSc6jLS0ZX8uiOuxR\r\npigE3wmYrvCqXqP1I2cUtO+Ne8kriO3kZieUj87JV05FaspEiDVxNcz4/n5D\r\nQgUsexUhX4Fs2lz+dqCHs0Ojs4cyx81i/b8y6R9ZcCB1N+F1+9A/cxmHLJ8E\r\nGqlhfhzaaxnzlFc1lGq1qSe3D2qCtkeTAuS4FljR3Fa7ScU+VqmrIcECeVJh\r\nKTG3ti4mSGwr54swoxLIM/raXEx5rnLDgyIFZ1BfkWkefzgZqKPx23BKP2rh\r\nyB60lItlypYQdEMZ/eGioGBXcrRYes73CUb2gD4CTYcUw/x931rl9cYqmK1j\r\nbNRSWIsx5LnLanQb4sa6KjaflJbyX1Ol6isJrnMEztkwqet0tMT6K/IqlUas\r\nN/sjRgRyFAreRB7v8mxHDcM6Vj3c/xmlfhf8pzouNphxzgsY69pdaMMAcEzz\r\ne86I/Yr+8/ky+7D81B28uS2c3n4suLgiq9STClejeu22NUFeMtc/QOUUNcfn\r\njosAid2IqjafLe2zkFVfA40ZrlJuHggSnHmHJgq4ZnvwcQFxs43np2cB8NpR\r\nwg/Pu5o5/7VCXf7i7tyAUHV2SDl1csyvduxN7Zl9tW3Lt1o65hKNXUQXNfm+\r\npf6w5jMVYN/B+8wv5XgeDfQ4RM+cOwpTgPk=\r\n=VTZO\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"bda733e498aac0dde8a210dc065f0941b75aa2f9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.66","@apollosproject/apollo-server-env-mock":"^2.46.66"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.66_1648681182808_0.6848363358726797","host":"s3://npm-registry-packages"}},"2.46.67":{"name":"@apollosproject/data-connector-rock","version":"2.46.67","_id":"@apollosproject/data-connector-rock@2.46.67","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"def32f4fefb010bd4a871cc0fe34225a382bfca1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.67.tgz","fileCount":158,"integrity":"sha512-f+vqwJ8rugCyPS9k9ddUHPtJxr7cbC+p3Gm4p+JWW/tj85WW64qqDJFtVjymi25rYSkntlTMBapRA+rc7UXWCQ==","signatures":[{"sig":"MEYCIQDTN64WTc3ZZM7BtcIzKiVCHvbgTD0NrL0nx5Y1Kjo2ZAIhAKE6F4J1Bt+vWesjfkHyEkU52bdTgGZquF+Ut6Ca1/et","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1105464,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROGjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoihBAAixLzyttodiMIpvE2k3tIE3yTIEHlhLZxREmnEXQipzhPLDwn\r\nwFV6K9GSOOG0cEItgoui+qVy1CVoYSti3ljHg3TBQAl2it7KmbXLiFGFb3ak\r\nVTh4cW/d6+Cc26ifY4XchykgkmeKx1KNT5K6Zs6zQt86N/wpqQC79t5UA0l6\r\npek6ofMs9LjLhXIfnoYoj2w6TL+Q8Ka8ozWpYK57XXRMwDcTe6B1AgnLFHi2\r\ngKCWEhDpNTT5ADwymsEQ4+l43hwTFyPJAx+h7wv5taf1pOYTmjr4IGLf6DYx\r\naNXLTla2VOlCAyIEFiyqbHPZ5MVrdELU4bl1UR2juYqR2xI9hVFPEOF835Do\r\nfi4M4/HBxLuyzI1C3JeOtlwi7H9gEGX1ctUIQqjzOLfpJkhoSbi745OE+2TB\r\nDwnaBplkLravMa0fKTEDuf51o5z78/UhMPrJNfNva7V3YnEbv+dCoRfnQyv/\r\nzxW8OoG1DwrrxIyzMGNoeOZYQAX+5E0DBio/vZZceGE/PcTt4ityVxHk9o3i\r\nhnMFgq7GmNA7xGxTd/yZxs5MrSfbrkR59VTwTdWQK9AEYracm7xdd/SOu8ty\r\nhImNSKonJopOZEDSEa4GLB0tW6HK1yG39ovmhfrrygI1Pj+GGcuYf3KbXh+w\r\nU8aMy0eaWHdlklkwcHEec+//HCZJjb+FuV0=\r\n=S7Ho\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"fc2f7b4875b1dad439d96ff316b95bb6df934719","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.67","@apollosproject/apollo-server-env-mock":"^2.46.67"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.67_1648681378947_0.9988755316298021","host":"s3://npm-registry-packages"}},"2.46.68":{"name":"@apollosproject/data-connector-rock","version":"2.46.68","_id":"@apollosproject/data-connector-rock@2.46.68","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1e5f12f8efe366f91a504cc2a98629ec62a8444f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.68.tgz","fileCount":158,"integrity":"sha512-hzGukSaLLmtNRqpqO+ow862ITG0GiGPjZJyznOzVwsaykrqVS3I3O/Wo0DdULFORxTRjOAQ5nygNaip54qklag==","signatures":[{"sig":"MEUCIBQcJuVLx/6iOJXv3NgBH8hdc/Jn7aXEJhS2TcSN+ZtzAiEAgFehTLnkOqnTnRUlc3izbyXQjjZpK43H2vmzxeEOhzM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1105649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROJsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZPg//Vl4I5loCf7cZswSpQIHqIZQTkjNmQBEB1UM/JLQUgHIQ1qul\r\nc1gDVxi697Pi3mOLTrrDVj1+9uj32/X4nLPx2aSz8IE+L47R3f//e0uhqe28\r\nw82gipDPAk2il+D3/wC5yujvxoh15+F1oZZL0Dwlta2ybCQtbVE7rgS4d8mE\r\nsFw5pBBaW1H9z/k6LimlW/wMiAIHsWHeuhN6++Zbrg2Am2tw8JjP/+pEwj/g\r\nyH8cYr+UrzaOI7x0ix35pmIfyXDmmLQg2jpO0Cea7Wi9mv1jgrl0nVuu1akT\r\nPAxbNjsL0jhk6l9/FUBVFDxmIa0WiKJfw6+bwE8oauo5rF0m3hy1sfjH0aY/\r\nndeX4vPtRDISS7Y76laNF+2fkb2Qh/ubHpH7AkItfr+dWmA2IP7pPI+f8QNO\r\nAqDNV67UXFI8bbTJ9grACe7zNypCPNz9GjTXmNAojliCkp30luefae1fVmfN\r\n3N+hrW+JxPHr/hT4lNqsBErjCjSGSzPp1uJh923Ox2n2ux+amfp93p+lziiD\r\n26LAluDiq6jRVunu1acsUTL2hjiwfoutMw50EpW3MDHV0vsIl/fVvwuSxddv\r\ni0ibG+uM5rn71iD/pA0mqcOEDMmdlrUFFbZy8htNGjDwH0OwfekEBkc0c/Iy\r\nJlq8fgrOdgNHmlIwUii8sJ8WEo9dPd0aQ6I=\r\n=/Hoa\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"de18872fa2058cb48dacd4b036eb361ea4ec201c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.68","@apollosproject/apollo-server-env-mock":"^2.46.68"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.68_1648681580597_0.39629266642795535","host":"s3://npm-registry-packages"}},"2.46.69":{"name":"@apollosproject/data-connector-rock","version":"2.46.69","_id":"@apollosproject/data-connector-rock@2.46.69","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"56b5675e42d1c45f72bee351bcc0a3c452de7772","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.69.tgz","fileCount":158,"integrity":"sha512-YJRbv1JEJ/npZSHlBjeuIt6ap1hheZRN4Zo8IoSQHkRaX3snoV+gNqvk1sPp+gMEPNDid5vg0jLSj/0AjstsEg==","signatures":[{"sig":"MEQCIB0CIpElzRx4QmICr43DOCR/GKD0F1AKuOgdHvZtDZ3CAiAwyQTHoDqT2+PpoM6yZtvGb8T9fg1e3Erx5sROOuvFgQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1105834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRONnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVQg/9HCKznjFKreMIYQY3ZLEJ0hdo2R9R8B8B37Yzr0/mkIvdcbVb\r\n86FFwZcrUydBCPK6Y0vXxHtwX7I6J1ywj3RF7R9ZgjisLKFmhEwGGJWN9HDX\r\nbdPZDqQQS2qgWTKdgIzW0Rq0LBWndzSfb8ZvVJrT7imOGytJ83m8JcUkhlm1\r\nIjZWpvQXWLsfRGYtBN4xYkuDm2FMXjVjXWrbRy+DYgp0K32r6o/ugit2UdRO\r\nproCS9lHJi2twVeMlLuVyhUfLsLQKtzs60EF6e4BndWLzOu33eTKYy2UNJCr\r\nZ0AU3NxGOxnLpW1qFhWFirDIG8bO3dU9YQ/dEhj9jv8JQXjhdYZXKZp2DdHm\r\ngkGkUpbn2EnU4dgGjCPVqtflmLan/jz5DIrKPWn1IYTm5bEUfwNt1PVRG8le\r\n+I9Hmx1VSWi2SfHYdDdMI7th3ch7NR04NzwCLXcfDsj22jWiIdK2k9ohW3Ig\r\nJ9Nkn5B3QsE9NRdMip33ybrmVtzx9ZyqGBp9YVWoBktRuMn4C47epce0KyeX\r\nudEWiN9JZ32CkKj52doGj/sdgSr65/8Y/Iw3ftYa2PVx/Vq9A7VZrOPgTaM6\r\nVaVW9w2edsm5gMbBx2gxtjFfuu166bLxdHjgXdaAnvi0ysKyHnR6R0nvUGiv\r\nFpr7izOdWmGApBVZI21VirWlSoHXEJuCuQ8=\r\n=pMfT\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"56dfc4ea9245a5a7f62b17186356159ceaef9274","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.69","@apollosproject/apollo-server-env-mock":"^2.46.69"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.69_1648681831189_0.8583121804297242","host":"s3://npm-registry-packages"}},"2.46.70":{"name":"@apollosproject/data-connector-rock","version":"2.46.70","_id":"@apollosproject/data-connector-rock@2.46.70","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d7a7ed6ea094d568a1f156ccfadf2d4ef6b01142","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.70.tgz","fileCount":158,"integrity":"sha512-Zic2khJ3tJyD/08TyjJA0utb45f1uSY5miKIIO5qdUaOYfbBcDV665mHZDknJZAUtfNZ4JIG55+9LR9Z3qYNFA==","signatures":[{"sig":"MEUCIEA8cvAqLGc0igIapUHLLYsufKiqCVDlkY8DW1OynLQkAiEAwC172YmSiRWJYT7M2CkTnLVr3ggNEpN2yED6yxuLh04=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1106019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROQ6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrU8w//WFcjcRcqV2bwkahS6B9bYgJ165tuumLN8LJjRwL9fzgWjda1\r\nmKedkaEcw41aeoVYk/YQjCwy26B+oJZ9UB7zA2lMpBGIwDzNu2kmgr+XsbYj\r\nDFHtVAGGyoJzo6/fN6FuM3CAnGeJSSyUUWs2ovenCRoFHW5RxL2E7srfMpCK\r\nClE06/9obb7ZlZ9TI1I+AltWs36brFP1kbplddRsqbrFS5N7Ds4zkO1SGiO+\r\n4rtzod96OFcHy6+ZK3tKX5KAVEO3Fxk2ACZ0lBGENb4JSoFiI45xwv4dbXH7\r\n+5ZUshDGHwnlbXo/9v9+CMqvDpcWei5Kvk9u3O0kI6+q486IeTv3QPsuWO6W\r\nwfs1mqJoD4tEV1BWl5AcLOnAuWlE1eEy55dfvHXKgh0c7ykV5gU9JgLbf3f3\r\nBRN6+d8IAC1R1l8qzd0tZhj3lZ1s9Uci9BldHmO04SRyf2Tp9qWvhgqZnA0A\r\ndEuHUe8StOo6UVNxuzVGpWDqSiAwORWDvE+kYV3mISSoZWveye7948ngeKE6\r\nzaKF4mxn1SxMO1afD8MiNwTbdHRVJb1Hs6TCFIdScEZccMlKOLciYr24fDrR\r\nPPFa1UZB0C2Cj4jkDXC3MlmtlXPCSqu55ud10oGS1ttZQ1fFOr71z4pgKm29\r\n5e/pyLQsLyE5H5eqgFyiRewn8pd7FuuDa0w=\r\n=ptqB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f09b3afe5fb345950cc9820563011fbdaae4008a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.70","@apollosproject/apollo-server-env-mock":"^2.46.70"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.70_1648682042634_0.6624890749904659","host":"s3://npm-registry-packages"}},"2.46.71":{"name":"@apollosproject/data-connector-rock","version":"2.46.71","_id":"@apollosproject/data-connector-rock@2.46.71","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"fa0ceae78336dc385a4f2594a6b3ec88bc9efa17","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.71.tgz","fileCount":158,"integrity":"sha512-HxSO0MkNDziFPdCI00bjpQQJ7JIiVkph9Avnq5ocA583vnCEZI8f9LWxAQwlMSFYhLVRZnu+wBMF3fyb63z9xA==","signatures":[{"sig":"MEQCIGCAtaGxYfAyCnmS9eQLf3Ym/7LW5Ma7G8lncUyAnTl0AiBlhpKPNhpG0JzfEXABvDS2xsf0BwBZvSwBt+VJhWeEWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1106204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROThACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmph6Q//bgpybO3TJ/dsw63Wpkz6j08bl6yH63PGPukKs5Gmdpk9qZjo\r\nMA0lqDNGuso6CPvWQghq106kpBFHBMQN0AS+RK18tvjsrc7e8XH/HIvDL0U6\r\nKdT8RvxB5WxoKfNDuCKjgM2BfvdPs+iiTpbV5BZSdQELdVjhqTZpASVXwJue\r\njyFDlV5zIImuRvCJU2q/NHNnV8TXvUtfVLq1rtNw94Upwk4KTW8wHkhVF4jG\r\nclQ8TvIhdOLVH3jAn8rwNLz8VwVwYuU+whM1ta5RW4UxQN8/lvKG6Ux0AZgc\r\nthaW7brb/6mNjuNKcxr7BpSNo9uBXEw9Mju+2RNRrXIUBbA8QCJkIjM6VtMm\r\nBEq9KaYkBArjRNWsVWJ1CoPJNerNg44ZCxbaBkb1p2YShvSnpeOrf1CcKAzb\r\nmGvmteaVdl+oYqFtYeHc2WpmzCrI9umTPC2F6EVk97hNaM4mvuYz1CVazyvC\r\n+2e9gok+GmQ1M8gkou8ZhfHPdJfN2/kVtPk79w5JK6jiBtKjQXAwVQWV08e2\r\nT2L6F3/eJ61H2vTJB64PaxR/e06aqEYny1LW7dog6bKVsYeI7zuPdIqxMh+W\r\nqmqozm3uJtOxUSi9EmLYEx2GZbdGjI39XTXzugFU6nfyFr8NtI1zY3L7rtcv\r\nGqRot3MbrR1rV4Dg7rHuMgfyVMixvE/8+Ro=\r\n=OUU0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"bdd217f24e842848fb8c712e4bdbc6030d846b1b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.71","@apollosproject/apollo-server-env-mock":"^2.46.71"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.71_1648682209309_0.13354643010205214","host":"s3://npm-registry-packages"}},"2.46.72":{"name":"@apollosproject/data-connector-rock","version":"2.46.72","_id":"@apollosproject/data-connector-rock@2.46.72","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"07608e24f0f40513b3a2e2aa88f550247ea132fd","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.72.tgz","fileCount":158,"integrity":"sha512-mZJEWlbwngF+wvJtOpNQ+zdH2V0XwvS16Id4EAhpJAJOBQ08Xq4xMdtLdgqcc2XNso9EE4Jl04DJh5YI+cqkgw==","signatures":[{"sig":"MEUCIAscpiPRLVyXOtboJ/KRd/uQbrpJ8FlrzpyXA3UOzHyJAiEAt1XL9fi9WItIZfUxzHaruTOrTBhVevYQp7eXdilWuHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1106389,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROWhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqiOA/9FrdrMC4cO4PDjmpUwEkw+pf6pivTYynAVOh5bSqz4ri0dMH0\r\nUs0K51ZUf8ElaqBxKBUfBCaQduoKbzyguUy3tlafZ7kfz1nCTUC1QyMWFaSF\r\ndVnqmH4AXqbrVa1ZvcZ7xlU/h+TVVnuPfOc/9/u60CgWQ/2trnRezb9X4i6r\r\naKx3pIQ6I+uf3n1ZCARkxDmakiDPfyEpI3fG04s9bTkVOya1UqURPWjjg4UM\r\nLA3RgIp/ePoNIy9ydOBOtsEsx1gHYXZSz8Ixi9kpXriQrSrK0DKeiF+N+8Li\r\nDpgO3uRQd153xsaPxdOiQPTBAzmbBV39CksWdjC+TIWo110By6Bqvl80SaOf\r\nx/TPqMBWuH7oyfmChCNLfBNGRBDWOCz4XuTRw6sSBnREdRDmhH3y/s4HhQQg\r\n3IeP97HO3YXRmjIjmzTkNA2VoeCX2wy3qhUB95oB2Q3OGkTtKHO8IE/6arrY\r\n4h8w759lkpBth2zUuIzVvHmuOST2kyK1t9X9SlO747iedANzjJosT8ME4nWP\r\nUdidHURaTp/Yz/OLRqAcfG/Rq2BBzYoLHp8SW1ttVnvCcr/vQ8ZwN7BG3vJS\r\nkqH89WQk2tzqW+n3Zj2DafTYjSsLCQZUUxtgmIQMjRHSpxnfLyZ8m0EWC6zc\r\n/3iO5GPsjO24UCj6fKi4C5xXP0tHEX7oxmY=\r\n=X9lI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"402fa1a293ee8169f7f9b158f75c8d669d8c6fbf","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.72","@apollosproject/apollo-server-env-mock":"^2.46.72"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.72_1648682401102_0.04478987971349868","host":"s3://npm-registry-packages"}},"2.46.73":{"name":"@apollosproject/data-connector-rock","version":"2.46.73","_id":"@apollosproject/data-connector-rock@2.46.73","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1ea20e30e45bb00fd10a6a646c8ac2c0b71b5042","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.73.tgz","fileCount":158,"integrity":"sha512-jLoH8vwegBm3dVoCfiVfFC0ffSx6uXhbhA6ecdC0EOG9NaKKnuCMVxH5Pr5CiiXhUxQgUHvwMSZYbzWaARQI5Q==","signatures":[{"sig":"MEUCIQDPGe3NDFbHjpcZjezbXTXTpG6/O9qqDpLVVaD9nnyV5gIgIg56DS6kVaXYX8cWgB18jmYn4NBLmOmTsbXOOWip0jI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1106574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROaDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrmWQ//W+KigrdmSK7CiJuEJTi0Dj12wZkG1AbHMWK/4B/OMkfKIOcn\r\nsp6gsOf59xGty8ML3/2GzjXBR1bVCwXWEyRtYdNtiC7ozb00ZOCZG850f87V\r\nm/moe5bpj+xt47efjD8BaDFoFE83c84dPXd19ZgAVljv0alINVb22lrf++ws\r\nbfDnsl/cSkpN0XX5PyvXXRd2D9UM4SLhNe+MOEBIhDCy4eJ+MpZ4eoYXP0Q9\r\n8REXIOBk+kSEdm0gFRHW9t2EtIzPMlNsoam4OWsMjTkG69JcM1dhv1NTJZy5\r\nhPKGcRf2N6taZGUMZ0tE9ioZiEU+IU9Lo6H6N+tdgLaPhzSFgjXtXNNUkuXD\r\nvZAy0rNB+lMOxYoFHI5114OHUZPQ7vOha+EoOqvG343a/WxqRx+qfqEwlvgU\r\nj/1wfw/q0AuRx3Z70Ni/XA3YFshEIXindjTt3caE45r6fCYm9WihZ3/CVJp8\r\nrEm1VpL426JSBl+5UPwlt/P+TXHcGtcGQMLk9BdlCvF2J9X7QAubHAENbGOZ\r\nQRDQ4H2/Y6trQ55ItFtaFhVhXYo/i3uhSZbn5/u2+HiUsEzYDRhj1XLbVWWm\r\njSj+k13eCj5P3CvYsSYo8vzP1LgCaDFvBhR3cB0T65jJGEkf3vxJdLSvVo2t\r\nHFyjr0VelM3iVA0bjEpsdVh5BLj3HrhtWUs=\r\n=J73e\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"63a0cd22d3615cc83fda57521f6bb735ea2cb1c1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.73","@apollosproject/apollo-server-env-mock":"^2.46.73"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.73_1648682626777_0.03638478584851268","host":"s3://npm-registry-packages"}},"2.46.74":{"name":"@apollosproject/data-connector-rock","version":"2.46.74","_id":"@apollosproject/data-connector-rock@2.46.74","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c023a9fb13f59950f2f63cce9ede0f6bedbeb024","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.74.tgz","fileCount":158,"integrity":"sha512-bTP4wkb3u9Kg8Ank4Vz6bfJQmJw9APvux9/ZH0BRBWZOzoAx7Mk5rTj5jowrRTAqpTa3zVNWxVE8JrGAxOu8ug==","signatures":[{"sig":"MEUCIEhfy4++cktxoeVCJDvz5Y96yJ0+nVaHNJJiwqsOtx/iAiEA6OzIwIGSXzoL/dK+7V4TsJIADL3AXX6s+oopu2n78Kw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1106759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROdRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEwg/5AHE18nhK08S8laQOSHyXbhmeomKMdn3eIEA4qfcRbJ+xkXA0\r\nlMuMGcd/YWGUdHW6cwIxg0I/uM8AmdK/HWrluDkOKqjWT9dDMhJyKjDYZPSu\r\nP1Ucr2Tb2wAo3FWUJbfQQCUOUgOf45flhyEnyw8Z42EeMDTRW8rksGU+MOSw\r\nIfxe4kHX4j2vRnJFzRehLWD5pGRcwdt2O6MPBm6CewUgTcvp2qSjZxtfqHUx\r\nsj0ktE3UHtZjG8zsyRA0PmlGCsDcRs8k+PRTfGM5yGdaMW8DjAdtcSAVLBog\r\nz2od7WbkPPH0qqB9A051wqjgNUXop9DyFMaY4rz66zTmYNhRh56wQziFMCcj\r\nQe8niHGpwlvTA67lkbngZV0L5vV+nUnvHvRkWRxBhFvxf9nYLbPyqLrW8vwk\r\nz1gOczpOeRoQXj90lH5/hHutr4OzoFP55vPCPQfLI7cMh6KCCKp5uM4Wi/5n\r\n9YOp5/Vtzh2VLEHMl8iOKv4qaEkdSLXhsL/KaxDt0onLMVKElvqDfriKV1pN\r\nmUqbZLZjCDdwWHWbL/rTe7oywfCRU+gUs9avzEKlsCBrsI65jJpNZnGTXv1w\r\nYyBGY/m+cTB3Wnbx5OxgD99YRQe0x4JJzsHQgpTbJa9jkTN5xUDnKEpG4XOl\r\nZnqAvJBCADP6tzDf2H56ZE+NyxtUhYLOY+s=\r\n=d2BD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"0cdb1a8a5642eab53593b984a21237ee4dbbda04","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.74","@apollosproject/apollo-server-env-mock":"^2.46.74"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.74_1648682833361_0.29511059579586574","host":"s3://npm-registry-packages"}},"2.46.75":{"name":"@apollosproject/data-connector-rock","version":"2.46.75","_id":"@apollosproject/data-connector-rock@2.46.75","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d1bd2e66df57a0a1b87e4d55a16a7437cac745b4","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.75.tgz","fileCount":158,"integrity":"sha512-waJo61v7WXE64GTWc7FB6zdM1ASzQL7HThK9pOOwsbtCleXxFoaYFjhKGF/2vFx/F83Mkxpzqyw5YS/P4zAUsg==","signatures":[{"sig":"MEUCIQCQ4N/fK1zhd8z603SDXy+eHYVIWIYXmdQ6697eOoVyJwIgKejTr6AXjbEVhOev+gLWMnyiCZETOe3rEwjGSB6X+B8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1106944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROf5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq9EA/6A265pfUkN6KFakCTLnCCAIQbJqHI9ansizG7z+bqbNP1oU/G\r\njLG8Fnpr5XUOv/jUiC+6oQCYSLU2keXo1Iz+WpFk3AVWXlSyw0nBcEk7spMH\r\nV9G73Y87KIZPdWu98NBOEcwCp5DwM5JWWktUeo1oSdWATJGgh1dDBKq28TFC\r\n/QXkIsizRIsJFdnpFlBnJvZAVs4qdt/BUHKJ6Euw7D3WpCWqdFIWNl/YzpYB\r\n7wUGftBcEvqDJTpOBG1xBIbpGmPINciI3Nsuua+skwP6TvAmNmy38WydkIDw\r\nyiBFPw0/bz+cGQyA9jzrjn8IiVHuveszHT5c0kSrLWK483KbAI+JH69b+Nxt\r\ntFsL9Ez80ucgaG4eXlM5qtm9b3kR8CgtNT3VSUE3KlxKUX/SWfYrmfKgl4TA\r\nXZdmwSlliFJM1/pSvd6DCDlqbqdL7n/hNIMibclO5hjqNTImeTCRMFG08Ya8\r\nAgrb38JW3+TuDoeDIc+Qdox2pZQe53c2GYMIhQ2JvhtIyvBPRIRF34c9E/B7\r\ni9IB7SQ3qSAciXFbOMjeqjGvDGH8PO5X+efQh2XUsmvaBpVzQ67MF21XGN0O\r\ny4Fq0UlAJe6X9gRHPI7+bapKuc3P99SmiORsO0JQlep+crdaoLDSjNhFUMWY\r\n6vHZ+J+hAhN1mznysVn51z5SBRnRnekx5E8=\r\n=DlFH\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c8d734662c96a919650f03988db510b36b0825b6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.75","@apollosproject/apollo-server-env-mock":"^2.46.75"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.75_1648683001029_0.29048673389641544","host":"s3://npm-registry-packages"}},"2.46.76":{"name":"@apollosproject/data-connector-rock","version":"2.46.76","_id":"@apollosproject/data-connector-rock@2.46.76","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"79886bf6f38861308b68f633b1ad92efd3bec444","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.76.tgz","fileCount":158,"integrity":"sha512-eC8SvIGgDvowU6cJzsN+AIFAqJjJ32kmbxUS4uN9rB9BzI7qVfml7TiTHIroc+21yhA/giC/1eA72cVjg5pvuA==","signatures":[{"sig":"MEUCICXXVeZxACHqlsiscw9XfP/Mh3h5jmYTT5bqIUBE0XgrAiEAskj/1HeDeaLDOpeAyEWml2g4EgEVe/UszoPJm265yc8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1107129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROjkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpjdA//WG7BdaK/tO8LBQVW626YD0gVJpOHdGWHJGcwFJ6VzpD6Zq/U\r\n3CvQdx+ZiMKuEp+6tOwBruwNMV0oJtV8yxfufbORH6FB5zetg7YesgzosgPH\r\nzjIwUbExHtnvS6WrpoBCz74AFDj8LS6OH+0eFl8RdzRhneeLxygHg7Yg+q1b\r\ng8kyl32PqFvT5M4qlancKMLf/clGMjWT4bIhA6BXD+B8n6TwvWGFCIbMk+gk\r\n1LuE0/PhMy+jmqCQ6fQc5bDhVujdVziJLMFgfq0oV0MCRR+PVr90zIhmV+1G\r\naadJMyVlFftlOOqjvwMBiRWctWXw/9z1KvqWEHS0wt71B31dXB738m/zBkdo\r\nRLKKEwbunbQB1NodFdGfIDYRlXNHCe7Un69WYihB2jNRyEZEBgL1UDjlP9+o\r\n2zCjmcMVZx+IMa1miZ/QwUb/WlMl42htCXp3eWEUziMsmhDk6E5Ay4IOsf0W\r\nLgCa7nZoCWiKhcgl/lkYYEHxOPIfQ82srVPhvpduNo1O/S2GHipRmq4pSwcL\r\nX7UYDk4HRZrGd/QposOzI/jNMmYi98Obrq3LAzLfOkjH5PWsatx6NwxP0Yv7\r\nj8JtdbJJP10Qg2UBze6vVuXBiDVTLYyzXfvjbG9mZER5hEbg7Qc+ME7MRmo8\r\njQiCAAdmCkdvl8JaslLfQqsxqiwdx+STbqY=\r\n=hjKQ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"79f110ca99501290ce30bd97018d77ddff6c23c5","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.76","@apollosproject/apollo-server-env-mock":"^2.46.76"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.76_1648683236280_0.5088019893564555","host":"s3://npm-registry-packages"}},"2.46.77":{"name":"@apollosproject/data-connector-rock","version":"2.46.77","_id":"@apollosproject/data-connector-rock@2.46.77","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"00e5bbfe7e70d795a58d9c4a93661135a01bfb01","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.77.tgz","fileCount":158,"integrity":"sha512-zl/H9BUiawCUk+5yH8OQd7pMn+c5drKJz/LlGxLX3cSKq2hvstEa8NbEBDTYx2qK8UoKPto1+KQaF5qjmU6hMQ==","signatures":[{"sig":"MEUCIBlah25b/Y30VS4r8K3FMzgiPB+JRjDbyyKplktd5/qTAiEAtYJqgqF/DSd4jQ6KbLiNTY2kxyuLSQ3szcJ19YpfdyU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1107314,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROmhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKTxAAkBlyCurbL8wniGE5QBJl7fX2Gg8J1uN154sxW3IHj/gD2jmw\r\nS6j2BRt72JMJJocxU6RMy90ebgUtzAStdfTHzrwZPDl8AJ/VjH7aVaZVPRJv\r\n+6P13nRz38kty073VxL3YXZsZlfvt0tYfg8DZfgqRbcvNcRMiG4pyWKyeg0l\r\ndSZtdykUs32dIVXYTtkIoMkEVEG84mNE70JR/2Ke36v3ZtZdmSyeuAInm4Ni\r\nAd+oK7laSezxas4ozFoMeCWw5VkV52Tyi+otsgk1NeM/RPjsxBYQLW2v3K4c\r\n3z3yDCfKfRaqCb3Zg2pSOa8RnxY/I1UH3f7yJcFfGVxspFuM+kKY4z0DV18E\r\nVeAUpTSu2OobtBbhdihZSt7zYI0oKdbQgoqZpls9hmolT/Oa4bFKQ7ZJnUA1\r\nfyy9XlR06Bli3y8nQtS1+x2GS1iDT4bV5NfevvgWB3ig/RxYx/RX2qsOQ0Z4\r\ndhlmAuW+i7ui6fCt8BJzY4Dgy7cnVrWstHEyWCEiKtOR634NzApRieEEnc9E\r\nXDha6+bsMGKWa1FUxJfRDBlOv4bp8t0QQxf7IvSE7TpNXtpDSwde6XTVbIpX\r\nbJZ/ebIb2eO9WwnUWN2PoDsIN+HgsRxIPhn4KOZi1Gq25Rs8BEr+LLBjEYbh\r\nb8pe+WH1yv5Nl9hXeWkHj9CqSHSys8cgwDE=\r\n=nxqx\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"274814d9cbc01fd32daae9ccbdd2cc3484a35f49","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.77","@apollosproject/apollo-server-env-mock":"^2.46.77"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.77_1648683425437_0.7316346643911342","host":"s3://npm-registry-packages"}},"2.46.78":{"name":"@apollosproject/data-connector-rock","version":"2.46.78","_id":"@apollosproject/data-connector-rock@2.46.78","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"aa3381b5d0c26308b3d7b11bf0bbbe098cf68280","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.78.tgz","fileCount":158,"integrity":"sha512-9niBxXQRXICZEeiRyS9WPhmF07c4L++3e3GdMXDnvVEyNRWZ9bHICzLZ1TXCPiqLr6BW/a8NdJ8FVAMqbFXsBg==","signatures":[{"sig":"MEQCIHTNjVBmAOG5NhanS/LS3QNex7XazoFBRv8IYA5VzkACAiBiPMr2vwi4fK4cZsphX9vlRgafK3wEv06QT3FhSnZXuw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1107499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROo+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdahAAl4SvCEvuOC75EYbkJklTeUCu03JbyYnykKZOPNRDkcAQt5NQ\r\nA6Bb5TF2lW0t07FtHW9qpA6h5mdwZX8TOtBfVOp7rNae+Pbqx3Dp8iV4Q9zP\r\nFEpzSTSrWyWMrJGq8uWH8bW1Ame3RANvVD5FnauSmRWStLw6uyKlVq0bgyCY\r\n6N84tSFQON3pthjUsL/hwzrVTfy5NuwBJNQZlr89FRU/hrwHAX9qFrqXt63o\r\n2nCE5HkmJp5kaeURztq254hG9f6SoYPVEvt7wSTBYXY31AEH74DQ/cbwbfc3\r\nQKF45t5qwvRRJ2N+KoZzXHU5jfU6g/getSzPph8m2j9IQzbFjVm7i/ofBzFC\r\nfUmMTVuwE1/Yvjz2S7pLEulJA7GP3iLq2oJStSgJXKYASMt7Kbcdk0jookJt\r\nAz+Y575v87rdsqVn4Rvcy3ElMXP/Zp92pDUaIzm4V60HgAwMADdFW18mc8CZ\r\nM4pttbe64ukiqb1pOdTe/PCeYWwKW8sedp/fPDapbpXmlQt7ihnOUoG9TRNk\r\nvj1QvjBHA5MlTGxSWawQG8qeq1unv0OcepDBm0oCipepuHCicBDNwO7w/kBs\r\n6ncuw3gsgyl5DMC0BvrkX70xuAtzQrsA03ixLTsiMyakeB0oHh7RkBj57sKT\r\n1ig8Uzo6Cl2TcMECGxN2XR5Ov18uo51wrak=\r\n=1Jpb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"58727343df5034232bc9d11ba4877e472e2c8608","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.78","@apollosproject/apollo-server-env-mock":"^2.46.78"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.78_1648683582561_0.13687164370436333","host":"s3://npm-registry-packages"}},"2.46.79":{"name":"@apollosproject/data-connector-rock","version":"2.46.79","_id":"@apollosproject/data-connector-rock@2.46.79","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3df5ec3f34e459c11b13cb6652e65fe7a14b7af7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.79.tgz","fileCount":158,"integrity":"sha512-YctagdkSPbOQFUl8DRl+TO44wvm8XhKIsoUO6+8NEp3mWO5BRVr+LYGgnd4Ucf3eMacZdKl12UEdU38m7FJoDw==","signatures":[{"sig":"MEQCIE6N5XJ2miIG8rDKQw4F/o1UUPhC3+aM/YZ3FEvbM9V/AiAGnZyEqEnGk6/f8lMjLRjmT4CK84hhIH1QUh28fAumOg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1107684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROrzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmnBAAkvG1Kk+hof1OHCYo2JReSWFOmCGvhXsbLgx19sTij1MjU8Om\r\n3MxWbCwsCDqoR8ciPJzND9xuFA2pI2MDL9+YlLoV97GxPEXr5BwAkM6Jvybv\r\nOUqxTQURJL89muf7OU4Graot/7uDBOGCN4KzZobQeTaLWTtY6OMWufsynBG8\r\nAAFrS7u8/gLq/j4luTZ+btu6rUf5IQTFQvC1S6S56YXUUIqwuAi1cuFOroQU\r\nMWFcf+vV71GLo4OES78pYDGful4ZjebHoXuplArJtbRurYUlgpqDBA0gsDW9\r\npi0tcC4pnIUMTWCW604FTR4o9Bmt6hbkxcrzL1QeDmyNvbDknupfNGn0+JKC\r\nHhwuryPSxGQbqVDRh68U8+fPGwJZMtVopAUX6e9IN1aMNoraFSSqsHYyumXH\r\nTOpXa5JnFscaLEW5kQFNOpktWoMsQYelsdt2+SZXzVd1OR1ruEFFhwY0Q2uD\r\n0lMcznLVoFry6WlsIiodwD8PoZ0rpFgmaZC2s3MaV3IhVoDgbaT0zvSx8YBL\r\nnKphymnOTsTlkZ2Plah3mSKVEMfT9JKmyN2EoBMlMCFQ/VJrCCKtpPqY7teR\r\nxuu+YCgycQsx9VZyYqPbZ9jseeUUAqZU9sQ0QftK8ALRQtwUtR38AaCzCliL\r\nI3YXKed0kJGZfvt+l9A+IKa0tox7fAuNs/o=\r\n=icxU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d82ec90f6f2ead46895676508a0cfaaee7843147","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.79","@apollosproject/apollo-server-env-mock":"^2.46.79"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.79_1648683763411_0.008788146345872772","host":"s3://npm-registry-packages"}},"2.46.80":{"name":"@apollosproject/data-connector-rock","version":"2.46.80","_id":"@apollosproject/data-connector-rock@2.46.80","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"87b8b5f395fb0ece8fb2a36b4a47e45b228d52fd","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.80.tgz","fileCount":158,"integrity":"sha512-buqwpngTUOGqcYk40x0/Y/AbMO0PSlxahNiYIJdL1nYeeI41fttbf2jLf8indXIVJJBcRnuX6C+wb0XlHF6aOw==","signatures":[{"sig":"MEYCIQDuCXLsIollzEc7cmWb74UQgxDHnVm3wdQ6lQZsvE0htwIhAKIuA9inNQ+09wWLdU5WKIZ/W8dc8lLZkd5UUqZercHU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1107869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROvgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpuxA//SBOYUJYQWzI02ZmkfS7wKE8Ok5IWmfH4CeT874sQp7KcpSqX\r\n5L+9+6ZrMF+DYacqurdrnI8voCd4VOXp1R4aSQyMdOcO6QKdecYvGIITbfxK\r\nux7E/VqZt12TXElJ2+/cE6qOY64Be9WUODk6wgd7YB3lsxCsaWNmr3A/r66o\r\nwY5F5z+QsUItrgOBnnUDmGe3xSRs3a/9bl18A7uD00bljO9z6s7rcyqfgQBC\r\nk1Cp+BQb0pWQIwkB9Eh/JG2WXiLSJq+H7vY8t1GWbzVE92cNizvoV8t8uJL5\r\nVeUa4zfqQKdvYHdO3nuOr2oLKIJNgiZ+/MJ5J3Y4tSfe9wDUskMfZqb0H3PB\r\ns57ZeWBtvBzPcH3gMFwEOwz0qm0CDHN/ROXPku4DhZ4QYtMnWJ4q4iQDyHSi\r\nvvowMngGH1HFYKmWZ5tHt1ap2t8e/yd7k9XmclXDqRfrDNVOiS49K2dzQHp4\r\ntchMl2V/Hsx88Num8MISo+NMhpW0AoaQdKfnNtKRgJ+3KAEb8xaxD9ipThXb\r\nMHxZoSKCjh0Lbz87547Fss0D3/PQjjndPhLbDkmjqONkTnQ6a383vq88ZnGb\r\n4XVMII/avWzevEB39+lP9zJJxZ6ftKkprPMSihuejJRn5j7nhlFNULPTnYz7\r\nwt4jzCBiFy+CuelAN0Sl6L2ClUGqKeezKTg=\r\n=iRwq\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"80c23f6f44bf0120b5c526627fbd51626c7148e0","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.80","@apollosproject/apollo-server-env-mock":"^2.46.80"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.80_1648684000193_0.8965833680488617","host":"s3://npm-registry-packages"}},"2.46.81":{"name":"@apollosproject/data-connector-rock","version":"2.46.81","_id":"@apollosproject/data-connector-rock@2.46.81","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3a94225b18613101c93fcb9bdccbb60c6381a7a2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.81.tgz","fileCount":158,"integrity":"sha512-nlXS5gOJWwggB+JL7HQq6pGFftpZeYr29JEysCjivwyIAa4QgVUf1pInRoFhl6op21n89P+B8yE2cJK4Jcv8Zg==","signatures":[{"sig":"MEUCIQDY6fdHOsGLyOlOYr6cznAC4JI92RfYaMTe7Uh3bAoSjgIgCeyHKo5MiMnDSIN/O36wn3ky7I2OcuEiWMuE0NHBw4s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1108054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiROzCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoqew//fbglc6RLWkzTLO8OhtaqP/dddjWLdR/4nupbykuqoBHizRQz\r\no+wdkIgc0QUuvSghJJrkztkmD5qRD3gldlYAbl94W+D/e8Kcofg3lypW7VPg\r\nNgAKrYnZ+cJUlr6RrvyWhrdGqi0sscpVf0K6GN7LIavfvaZXDPVsmSR/vf+k\r\nev7VBnZTvhddeXnHh/VHQ75CD7+LFrs6cXumRcgxgWVq988Ht8xGZEiLzwF5\r\ngeNtmv0lPtZO9erW+yPzARlALo0bSNAGUV1wCvNZqP6TgHy75eAsi05xEPec\r\nCom+YITG0kGF8/520U3lGW2JAhRIDJFDueMpy5HNss2eMk+X+o0jqkZCemZd\r\n8p77KFm5oqhOngts1EbZw2aGQ6QJGzgEh149c9da1N4C4C/4bgBXPSnmzY+w\r\nPhYb5easxI0JCs/3OXuTjB2iYhoXYbYx66QZ7PLOkVHqunKzSERBN4/X9sGT\r\nIJSd7QE+j54E9cs9sC+sgyq7imjesXvnZjWx34e5GgaGypemaWYP39XJ1XIJ\r\n5RPVJKCP7lvvosh/J/TiD2cHbxkv96OMqrfj5bhsK5lPWGTIiwO9ktbBp17M\r\ncv83V3BmNuLrQdbP8k7cfb/OIC9QxOylwhoifWqO7+flPuIHj7B4oieN6dZU\r\n9qtVTPs3vIRTjChYNt21qYiqC7L7SOe+CjU=\r\n=Q2Sl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c6b3ed4f0c6f42f509f4995fa1515c232671c2e9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.81","@apollosproject/apollo-server-env-mock":"^2.46.81"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.81_1648684226013_0.15310353976978663","host":"s3://npm-registry-packages"}},"2.46.82":{"name":"@apollosproject/data-connector-rock","version":"2.46.82","_id":"@apollosproject/data-connector-rock@2.46.82","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b5395e8096687a37ddd14e091721a2c7fe36e63a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.82.tgz","fileCount":158,"integrity":"sha512-tKhnjXRuJlmRtU98GEpbE1grqHhWurmSaC3Sq01cpe1I13+qdw05TZHQ7rhFD6yrhbysAjmp2hDGPythYr1RhA==","signatures":[{"sig":"MEYCIQDUe89XtrIf2SERJom8w/uX7vC3It8nKhJvMmn1WLWC4AIhAIbZqB8+cREdnPnJ+ipc+kpiOntkTeySv0EX1LvbUw4F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1108239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRO2ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmopWA//Rwe/VX4o2ok4Zm/kqxT6WyjH7rWSBgrXmoyzdS/iBUxRybCP\r\nDEvZFhOW91EErFrDRbZDHvNJqWP3Cfnv+cwCy0sAqXV+eiyD3BF6tW0mtNuW\r\nG5cbQquDKOP+M6mTppv2qOk0yodZJKNwNnGmnAM5l1akO57PoeALODaq6GI3\r\nXbqAikFmY0BR+eNhvZvyUl9ahq08c4Y9Y5KZqK7YeQj7/QztBVHqC2A5hmRw\r\n3nNmmMq0hHIUKP5WlOBqIfMFwOyiJ87RXZYIgCa+o+iKf8v9mQksmllj/BK6\r\ni+tt/VHCHt+aaGLLAHwIj4WtDxqp0N0U+OabxQN98GVpbHWeXmMOWbJ3HqmD\r\na00Di7v/ajqe+WsFnSwpNyx+PHyaQoB7zlhBS/21xYmrT9iDyIF0Mbaz219v\r\nGosO4d2gFFsK3BzGzuhZT17s7LC+D+q6MITonEA3CHUGOFXj+DyJUlKpOrfE\r\ngBXVPTcjz7KZ2nIWH7W1Nqr6lMsxDmi+brp/khEFBP/UXB2XWpk/F7IZddSS\r\n299qAFi41oT/BDb0Fnuls11+ecMq6EwpEMDXpxLoO6JdnQ93j3qd1BftlBPN\r\n6mX8Rcvjy9gMUhD5c5hfUs5NyjCKiMFjq5oginTsstGiiD4Pz3o+dLaxoyQW\r\nbPm2pLTrG2EjnWZuzWop33/DmOpxp5HqaHU=\r\n=LYMv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d832670e217cebe0f5a881976cd729ca06ee76ef","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.82","@apollosproject/apollo-server-env-mock":"^2.46.82"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.82_1648684440784_0.22864925479198872","host":"s3://npm-registry-packages"}},"2.46.83":{"name":"@apollosproject/data-connector-rock","version":"2.46.83","_id":"@apollosproject/data-connector-rock@2.46.83","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7512343143577cd6b141bc7cbabfef4e598491f3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.83.tgz","fileCount":158,"integrity":"sha512-eceASyPNRWXCOAayviQKVm0ZA4C+ildMs0QiUvZZZ2VGSz68ugUWrfgEQtAbSxdlj1l4BHgqxMJ0EFUdI/NI+g==","signatures":[{"sig":"MEQCIGw4LNGtAYO/bgyR5oNJnZP0qOIaQSuPl+8UkkWGzCNhAiA7eatorrbjGZ41JLhq7RORFi9HRaMd/9scwWxXOWrgTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1108424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRO5XACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZ1Q//Vbv90Rl6a3P8RkwAy+OkQs/nAPfDQIXslJEAlRJS8RHQDLnX\r\n9fnPIwtGOsD6aZEU0CoF/NYUwKXARtkNo80DMpf7XoMVvvLE9QmcZWdovdGs\r\n97LKF4PsT+QJXvxXvEYVPP/5iQpLsczyod3n2xtNTtXEnn3L4aGPfD0If3O9\r\nqFskIUFc35ZUv0Mf6J44xwioDfVHOh1YzjZ2HV5WiQt0uU1D7QafZq7Wwveg\r\n8UJU4j0MB0IDyxeiUSKXGUIvimvKf0dD0JEtAMFo4IXDsKRe9xO6J3CKE/BB\r\npIaTagSTiBlT2IRVZMXMH1QvvbVyntHu/ZJWhjtMNEDjpXt3OHdDP4fg3Lz5\r\nHivkGB7Dg7C5h+WNrOS7zJvojbrR24Mbu1zvR2FpoYyU+MvG2Fqqb+hJs7Q6\r\nApDvrLbzl4GROMTUjnPB3nYDqgf8FXf5uL2rFyZHUprzZ69grroiLkwyFTpU\r\nUmt3Cfy3sfZAKQMu8T9unv4vXq0v/pvVyYvjJrK0NU5FTX/Z5qhDRy5XdWyN\r\nhxvf1425OgeDcX10yWZulEJXAm4Xe8DKRo6HPn8AmExPMOrBWmO7W83/uk6B\r\nKEF9SZGIOlHNl7u/wdRcGmeLxuP0hgHKotPLe5+t6GAkuctUuXTr4cGVUts8\r\n9ihrjG/UCj4+DuNJ44F1R/gaPACk6ROemyA=\r\n=vxBQ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f8762d4682079974d170b34902068f5c0ca3e574","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.83","@apollosproject/apollo-server-env-mock":"^2.46.83"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.83_1648684631750_0.5234243264239709","host":"s3://npm-registry-packages"}},"2.46.84":{"name":"@apollosproject/data-connector-rock","version":"2.46.84","_id":"@apollosproject/data-connector-rock@2.46.84","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1ca6cad6cb2c09574d091821adc99a62c9ebc649","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.84.tgz","fileCount":158,"integrity":"sha512-v2YuNpUyLO3DW0qpa9HV6sZ+b/zhX+Y4CfyZSzKoD2bHzmQPA2ERSzfToRMEHvVDyKFEoRaWYphjlrQlslp41Q==","signatures":[{"sig":"MEQCIEqkr+ZuuYhdfMebPB+chZjhmAkExLitlW/MYgcepexaAiBP8PG52Ngurv3aDhDPAFZsly+/H8BvXbPGzAR04fTGvg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1108609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRO7wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpC/A//c6eRp08juCQPYGvLyZLmDq5lWprrqxauK/nQ/Bdg4cXy0/M2\r\n5Y3D6iW9Y+BW8EZaMU+5Zd5zI65EEFbqWqrSaEFs8AGcKKpVhtpHxRBGt3JS\r\ndaghLxvTes6b62kMiudgpHuWGH4YKdPkBTIdrfduNn70HtGYdmcATtl5L7dd\r\nt9vgdqo1js5EKGUdcSsE2nJLNs16zVjyEHH55UxAACEpkiIord/9e45tMJeX\r\nIRVztF0QmaOq20Cg25+FKSi5FHTA6gLkLfO/ATvEnhAeeswYzNlzA2UMlL+c\r\nH1Kpye4KVq9ZMKuEzwBFDdRPiZ3pBcgsK0Dhd+RiGnkwY/KLBBhluUfbcVdM\r\nu9SS2q9VeAPodsFEUSuR92tf9Yg52OhZQ1mA/6Q4aHLeSB5h5xbPfN9H0v0n\r\nuhMKSurVfVk1/icPoyYnXXe9AC/NUvKWl8x2AEW7iKkJUHLUQ/aBmnLvnr91\r\nwhS1n5TQFQIgn4gOzFDDN6yk4SEzYsd9P1DM3WSFAqlT1WEDdN3A2fQzEMlF\r\n0r+nMoWdE1WFRGlyoGmQNjQEKFiUqJdH12WqLUVEQYvFb69Ub6EvlOM0z/s2\r\nriYWOquxuXua7I/0A1VVAbRYN7bMYXZAMf8ASG/xkS4APxd0Pt52t3qwK1kv\r\n79FPBmdaWMvqx5GGUiOsqZQBztscrg3YHVo=\r\n=gCSd\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"6fdeb4cf4cfb09bc57a26f370e27ba1b07053ae3","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.84","@apollosproject/apollo-server-env-mock":"^2.46.84"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.84_1648684784601_0.8234923305812647","host":"s3://npm-registry-packages"}},"2.46.85":{"name":"@apollosproject/data-connector-rock","version":"2.46.85","_id":"@apollosproject/data-connector-rock@2.46.85","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"39619bdbbdb8d79219f6420afb59b3b34e7bfa09","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.85.tgz","fileCount":158,"integrity":"sha512-Y1Ovwr35F2+rzxLfbh+GjE78UAC1YYPgeYpf3AWg2WE/u1oKDb3jQdmS3yjp1ZGUmi4Mj+C2kPC35KUKIEcSjA==","signatures":[{"sig":"MEQCIGDzzGlo+1fyxu1TfXi/iac6/RijHi5WLzJQ3bsYMZerAiAnP2DGl7eLNKy5AFChsaVpMEbraU5TNXE92qrvvs1KDA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1108794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRO/UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4mBAAnUWBwmNYo9MWXXqZmh7pKq2mBIuftdD8AGsffgisvALo8/8y\r\n65l9Nv/8VKHOcH4DQL7kwvqqUskvvjOiFSaO6dgzxzEwkZmYz+NAejtIW9hM\r\n8C3ZVLTOXSx/doRZKGTJXOe0yG83uz6u1PrKQVuo1qxToeLRZlarc7N1h7sC\r\n0J9XilU5JZTuYFAP9uk/jT83ZXdZ/u16pe/I0oLJacVFfUE1D1d/CcyZFoxv\r\nP1CycIz1NCH6MDEl6X4l6iiJuGeypBgRo7qYUu7GrpUAF57T7sPhSQF8McCX\r\nPjHBAvE9vXY9EBR9UeJX5urzmBZ+Mf9J0UROtMMZtdKkDujqDtQBaiVxv1rO\r\nG0YVKkJs7Qs4m0r1XoP9D6yTOzWetnOS/piVOrU9xd9tRKQjrkk2TMgzd0qH\r\no4sgtwsXf+Yvcg+hniqICo86bvG76H+co9CZm7/elv3Ivkk69DtoEjykhmgm\r\niJDZuLoM7ys5DGlEJNqh+45aunVDDmqczu/rgwnMrN9vDk5SE04MJZlblJky\r\nLMe+69LaW6AJ7N7yAA3+44ygV15DUalABxk37qYaDWCDwy2QAp3DKtXHR2ul\r\nkTECyc/I92uaK9eV7p6c3tI0b0YL32SYw8pgMzHGMznB51W4tPDuIzlO0Yeq\r\noRZAsVBxonQyr0tpuPgN32CBk+U57+jmLvU=\r\n=ZDTA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c1e07b33645d88f776eb3b6d9e272a4e952a487b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.85","@apollosproject/apollo-server-env-mock":"^2.46.85"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.85_1648685011908_0.3120908259964885","host":"s3://npm-registry-packages"}},"2.46.86":{"name":"@apollosproject/data-connector-rock","version":"2.46.86","_id":"@apollosproject/data-connector-rock@2.46.86","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9c6a3e01a2635727632cc01638fba9207de48600","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.86.tgz","fileCount":158,"integrity":"sha512-hcP85oJfuqpUT+CHjGwultXr+fqmZ7jZF4c9pWX/GXRoL0s0VVrIotQGTHgrJpPcaimoJZ8cacvVNnCx8Z/aUw==","signatures":[{"sig":"MEQCIAsNQplqbxuFIyO67+boMvQ2TnM21JewmzpHg/Nv+sM9AiAfya8UnlMwAr2o09F76t6Jek+vT0BnYSh7fQUchx6Qfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1108979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPBuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolPRAAiQjeehXdrBSkLIfIhAwmCOa1hvDNDvroZwQH/OEvSIoJBm6i\r\nJPdzjP5YNFkHhboeqKxAz5YUlUaftcx4u8ag58t8cuKc1mpMYoPWEwjx66G3\r\ncJQlZFLFqFByUvLxjWdfdd4E1ks3vJEzyGcdQyowTrgi4HaIl/LDf7q9dzHx\r\ncuK1QZnc2TGILjuRaF16sD9Z5kgaAfwvejxpbfxuhMRmJa9QluXe/GgUtXqi\r\nYT1nDGpsskOp/G0zkb3dR8XpT/YioYU9LH1vy3I1KIfOJ4NdbTvSvep3ObxZ\r\nF3i9Zt26QwwT3bbh63PGHuR50cMaAmuimIGV1d+vRSPzSq1ksV3DQh7hGqfl\r\nq6ODz0kACZToLpj5mgCePA6nRwjQDXEbCHYDxd3RnzsSKjCE47uUp8Q6lH/h\r\nUVh4aQ75oWpGMFh3pV3KwCrKNJT6NPYQSNg4/UHyWyf9ys8UAm/3aTA+7j14\r\nyH34r3/twVwtXmHofQYCasGImrctve6Qf7Q2m+aXJkQcV/36moQdVqN84/Cj\r\nvHPvIN4EEIP019wpLEE5hIE8KykXvwtUOQdfP7BUwQl2MnPBlEiRF44lhJDr\r\n3a1UHwCpgavQvWc9kUivB+4PUPJJd+rxeD3OIcH22Pq1QD2nuXczZ6dj4LjO\r\nVx3Czsb1qUzt32Da3xcMWUDo9ODpti+LTLs=\r\n=mdts\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c9ef94015b9e3b77cb139f33638dc97c7a25cf74","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.86","@apollosproject/apollo-server-env-mock":"^2.46.86"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.86_1648685165840_0.7242591112419308","host":"s3://npm-registry-packages"}},"2.46.87":{"name":"@apollosproject/data-connector-rock","version":"2.46.87","_id":"@apollosproject/data-connector-rock@2.46.87","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"53a811cd313c2fde7dc479ce28c39b536cd9194a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.87.tgz","fileCount":158,"integrity":"sha512-DZW7usrA+9YtT2X4SwgZVBz4vk8k3qNtjQ9wJb/zWt7p/2TgJMpkjask8dLcDTY7XImSDIRDTNXejlbm3YYJ8A==","signatures":[{"sig":"MEUCIQCWo2jqWVwlyS5sklSKwfsNdHl/GnRJ8CAK5X2tHRWMPQIgB7vWgAAjSv8bgK5zypPpdt5UMaeboJehhrkvhhYsWJ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1109164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPFuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpsIA/+KdoKNljs+vjp19hTRPJ83zOtRG4Q/ek8Gna3HhiQbBXMOaJx\r\nF9gEEaZ8u3SVXGLPTeNFWtiWNrvN0FH6MPCArOpAc2WBX96xwUeAIQlcYwxF\r\n3j8RNRRaHeY7PbGmkIz5dXxJeswqJovJ8VamMgjXJ3v+tjta88cyOq1arPDr\r\n+Bgkj/evWFg5nZ7r8UR5U/b9FOM2jay3beySFrGz1KbcdbCtJpPxgfh+upaU\r\nZYp26IU5WLTF2RiXF4o3L78X4x1XTtZTkABbfmeN3Wqfx9d2ZMdyh5H1t7el\r\nGgFmPHy85Yk3yt4191HGeJ7g6Ebi++yYfAukz9D7koVuZrx6s/DqeSL8P+Xh\r\nRcu/SPa9tUY3i6TQi1x1trvEqs0cxq2tyDBhBwJ0cSXgCL+rKl2KM+WABENE\r\nKDM2EXAABFAO4mlj8CrSA8xdMIJfhDeJakfYX5rlBeIsS3aQrPofttVR5XMi\r\nVbiJs+NxdssZt2kRRIrAl9Ij02Y2OuE+YN7l75e6DcpQTNQt+mGmqnZammqD\r\nvxX7HyeHvKN3ZzlWqT+iRN7H9Nno42t/6vnI35efvURxhsQ2gqP7MHfjdJtr\r\nxJ6PE5XebMjebsf8NeLac+2vRQsIHzQb28sGheaPu7XXMsTIkfU1ulO2sAaA\r\n57hE2owx9gIokJzFezL6fwTFGELjyiVj9iQ=\r\n=lRia\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"ec45f8559f1e4b86c45b15955d031baf64e92a7c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.87","@apollosproject/apollo-server-env-mock":"^2.46.87"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.87_1648685422361_0.5160889726873872","host":"s3://npm-registry-packages"}},"2.46.88":{"name":"@apollosproject/data-connector-rock","version":"2.46.88","_id":"@apollosproject/data-connector-rock@2.46.88","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8267e3b7ab7da9cc034db973cd9f8e339ecdb10e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.88.tgz","fileCount":158,"integrity":"sha512-PJOQ7Wu23rgqrXNFw1ph2QqLFEwc79kLVAkjNleyELkVt+qHflQq3+yEPR1dA4KuG3AzrsD0JsgcrAbnZRhmzQ==","signatures":[{"sig":"MEUCIQDDGmA4pFEi0QHky9M+n2bbtw2fVI4MGaEQbZBU8mHQdwIgTa9iYZPLzZFNdae9luCv2QBbrIK1D+JWr3Jr9ZyjFEU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1109349,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPJLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAZA//QA/p3wMmb5ifuABSPikKdryUWvXxFlROMwTvHhlhFirt5KwI\r\ntkzBBy56ljnf51yTe3ZWVQDMiiqZxQo1Vkh+njamxXESAabGtohLL9CaPfiM\r\naTdBl/cWAGbMAIBbWgK/5DPyp6SAjxzAqAUirTuUtychB/CiOTNGMBR3xdLg\r\nzTVPAcMfSW6YbY/32/IaokJEX3ZNsyBQ7Vdh6efJPZBogqtVgo1GXgtPrVfQ\r\nG0wVsJzdrHfuwUnq4KBD1ybE81hhs80Tal8XftpwnmgPNuXKKYJiCzeuoPGr\r\ngWTm5V5erlq4CWUJBcmSt0A2Dk2hKEIAdaiPGwEACY+MXQEdSMb9Xt35JnON\r\nuhBar9RJfBY0DQJGR3u1aZv09m7+3GyH3pEX3LovnEoJh0i69HJFUUU3n9gD\r\nqHX/kJa3Y0U9XLiFU8W3GqWEcWJ3UIfOvoDO3xzmdoPw/LAe4Z/k47U1kWqr\r\nkEwbCeqbVoVMJgJL8Bs34WOFRQUMt736NaODrGIbkwylsiZeyII1Tvu2obXG\r\nWDUFtlN+DPunC0tu6PH8WpMn8bdVKECEtSIl3SlOGfmGX+k9OqSKFhCbi3/k\r\ngXucon+CHbk4ZBtGk17CLzfBrLbSnUdLjDP/GIMbxR2M99qBDVnUda5CvqV2\r\np7biHKeipxxu2DLTxaLiSkHyS+nE2Lo7mew=\r\n=1wHS\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"0f18ead3d3541c288630e10deece6d6b5827c8b1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.88","@apollosproject/apollo-server-env-mock":"^2.46.88"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.88_1648685642910_0.778638213767515","host":"s3://npm-registry-packages"}},"2.46.89":{"name":"@apollosproject/data-connector-rock","version":"2.46.89","_id":"@apollosproject/data-connector-rock@2.46.89","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2548b80ccf670c5191906e8e7ce24c6ddef191f7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.89.tgz","fileCount":158,"integrity":"sha512-I3++A2nAfCZ5vJT4JQL6pMfhAiPcQIGj21OxB7o7QGiijOsp7CzYSdTx8UnXUlWoqoGeEurMOR2dVLFIIoYyEg==","signatures":[{"sig":"MEQCIHzWJrjthlbq3xfehLKz7qnnlKoSzGfFzK3BHy9xDyWFAiBAdnanE2l0XDhQACDOtmJrdO91H9SlZfruTp8k1ukJIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1109534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPMcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpeSA/+JkTajNxi/dASgHf27A1HRMDHZ5CNkjIn089VT52nB18u9YGs\r\nfQUylX3YjZWtMdUeWfsnx0WJb8myFkkqwkVzHFKE27NAyTvhECig4M2rXNJJ\r\naQ6gqlu0oXN/Eb5CT6zK14tywHAUof4S++AEIPVg0ialAZQFUbm+UXSFmCpm\r\n2EXfK8EmUwXGVZYxV8VtReKBEAvprvK7hz47andQvxdC3bSAqKri8aLulscA\r\nXypCdwKlh0gyJKJiY8k7N8f3VbRnlSO3VxaxXKIRWf9DtO3VFkEIciLYg6gy\r\ntORZthmLXObp+bCCULzlYOaQh85MQ4hQkM6IK/iYc6ReyztcPTVpRvl9h+Vx\r\nsnU0ZdscNo0BnOcg6ScsOngIlEEV2vThyS3/FYuNV74V95srmvLqW1nP1Dps\r\nBbWY9ZFBBxTiJjJNKZxezck5vhOVgwG3I/WAfbavJmGAct3Rrp0by9lS4pLP\r\n0Tj9JLuLg4/RmiSYLyeAmfuQw4logmdmaRFestutSL8wZi2iPH5kiLC5c2p+\r\nK1KA6JNHzUxM7U54QwL1lt2UPlHFEqEABJxXqj7NbiLNQ/OHuyrd2ScMLhoA\r\naO4lz40D+DP6R7xuyPBrtV7uPh12aAV8Yp46v5/VOGOTwDAjS3vskC5lDePm\r\nJQe3pWKWSEcjQH46In3IyEKlRLmJfPahMbc=\r\n=A6Rx\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8b56fc0d8ef506867467465a69eb959a5ce7462b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.89","@apollosproject/apollo-server-env-mock":"^2.46.89"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.89_1648685852542_0.9906406966627768","host":"s3://npm-registry-packages"}},"2.46.90":{"name":"@apollosproject/data-connector-rock","version":"2.46.90","_id":"@apollosproject/data-connector-rock@2.46.90","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c6540cb3822c986ab4f7fef6c05b095bd0a69a63","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.90.tgz","fileCount":158,"integrity":"sha512-tctI41JIdbiJZFjF/A0/Su22tzFogyRVIsW3Z0ScECVStQkfYyBC+B6mzMp5/G3IxaquogvAzsDgN5JDhcI+gw==","signatures":[{"sig":"MEUCIQDoXwqjyZnDEkA/HUFKuykgA/0/MJ9Jy8h+l85yuDbnjgIgY4ZJLlKOzr5AsEamXoLRUS8+hmFeYMQlb7FUL1t9hQE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1109719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPQSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr92hAAj9pZappP+FEzocZmkDBfCJxkddDyofJoJRt9jD4dM20G+5ka\r\n2H8kNQbmMQpQFWwr13F2Kwy6TxdaLhm2ZGuHskcMcsqYvO6wiH36crK+4kM7\r\n+JNPpueJpaj860r1V1e5Qw5bNdGj2F8xh/SZaI6ux7Aw8o+Pf1L5rzlcXAp+\r\nTmpsRweBy0wcefMxY83kdQcEL0Alxh2RYp2g3i8NvKDgJlrc5M93aIssGh45\r\nk1Z1kZhK4W9G6AXbYlp7+beWAt6fx6hW7UgPowYSYfpJCR5wi1Kzj7hE9EYc\r\nRPXeYZYmqHr54oV+1l3sUHWs+S7GDP4OEt/HilMsLWKhiw3G/pzHJWEapiWq\r\nGBQqnBh8kiiz7j5jrMd2XfiAyBNACrDUicsUZ9VVgqsbSbKgXXa+Ayg99Qi5\r\nndom4qVJVTP+EQYDSr9a5sb/3Dms7ozCoFMqPOWzZ9B35vrlOLSXy8lzwt+L\r\nBWY0ec0MJi2+jyxrnBgUtPMGKsNp37Yfu2mhZBdSLjyvdMYwQPStV9+Kwu0B\r\nylBCIs+qAYL9Z7E+DWz3vhpxReUiuyxiIdViabjZSdctN0lHSAP5xTaBwZTJ\r\n4K8lbgaUokNgOUxTnd3KXlQfr6Mc2LgE9ubthwGSfYGTTsNW+U2waq+Co7nu\r\nJnsJ2Lf8m/O0eTJhqz/RXWAxEEqCiY6z2Is=\r\n=Dybh\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"07a077fe623c177c8d35acc24d474e8a93151511","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.90","@apollosproject/apollo-server-env-mock":"^2.46.90"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.90_1648686098507_0.9477884538847714","host":"s3://npm-registry-packages"}},"2.46.91":{"name":"@apollosproject/data-connector-rock","version":"2.46.91","_id":"@apollosproject/data-connector-rock@2.46.91","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"72f6faa74eb004fd0190ea64d536271661769940","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.91.tgz","fileCount":158,"integrity":"sha512-/OSdCZAer35XOhCrRoTc7gO1MujPNaTzYc87MD30pDPwRuf2/ulbmZTUvBMkzeHRnzkSxDs8JDcfz4nh2k1iPg==","signatures":[{"sig":"MEYCIQD54oCFDpsWrrDPQgeaB2FF62Ff8vJALt9W4ZsuLLXE8gIhAJY2b3Uerz73g+ZHoKBdipg5pIIDJe8r+H5i0vNI3LV2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1109904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPT6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3whAAjaFzXJol0HPXFTWhGtnE5sYu/uHYLMynIML47iOdUAegx8IB\r\nwsPUWZTnjeNZWRQi+QlwWAQgN+pqYG2m2PsbY3rF0pQLumHGx8xJ6FOAYYGx\r\nV1zBLzt2mjE1xMiKSGUZO679twQT4QUUhIVOyJFhD+HfU0nPqbNTMKG3mtD9\r\nkHbd81Yf64yjGuMNU+RtVZtZfyPumkNGcxrAPuTS8ZAgUlSbjAImH5QnVjAE\r\nPAUK+buuLExC7ysrONqoccwTN+s20kq9QvgPsdm8gC/IdOz3pH9NKXbklUrL\r\n3dDJ25rVmSwKl4CdCtJYcUfGtZHlj31u3m/YURVZq6IgbFN4T/7BGnBl/LP4\r\nDi+LrVxBT5tKIZwX8vU4+giJ0mqhZMTR0oFQM5DrOiWKGdIZs3yWVVEMw+p1\r\nlA2+Li6c5EgOaHLw1nmRkGNY/s3cwIQ0dl5USzKnq9ckggVIrbMTJBtYsQe8\r\nS5O/AFuQJwN4GRAOD1udt5sybiIJn2PzR65wy0wWc4NbU/DFSpAxvJXn/YDA\r\n+oDNYQrbiNdG6hlLcQVfPWpkDlyI+Zwuv67iPEyIY/YnfBcKlrN8EJeiq1H/\r\n9+Q5Gu3jI6aSmjEMJhXxHM7P1mwdHxAttoqI83vUZ1cB6ePaTFRat135cGdl\r\nCYAH7QVRISLZMbYhidiXP/NX04zB2XQ+kWw=\r\n=hg5z\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"0928ce5b1ac8465bf7cc1f71bebc014d19d3c254","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.91","@apollosproject/apollo-server-env-mock":"^2.46.91"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.91_1648686330397_0.8797037745401719","host":"s3://npm-registry-packages"}},"2.46.92":{"name":"@apollosproject/data-connector-rock","version":"2.46.92","_id":"@apollosproject/data-connector-rock@2.46.92","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"978613605ee04cebb41b0596acd22f58458f5292","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.92.tgz","fileCount":158,"integrity":"sha512-XXz7YG/9pJ/WNNuZtkpq14JIGjMHc8t4gydLI++z+TMlUNuuxwttAzB/7bMpCl9PmyB/yGfOxEm0vdaVYPJ7wA==","signatures":[{"sig":"MEUCIQDCKUBZwmY1TJJPbXNUkVIclpJ8bQoF2Bt/y65BuAh/1wIgGfrB8zVqYR18Xp/lpYWr/rUJPnA98tC+sVoRf8zfs/s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1110089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPXdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJ9Q//UN1g4Y3HxQceCGhM5r+xzqakiJsaKV+34s4EKr5TiPxcI0Vy\r\neBVZd/UzB2rxQEBZuS3ppk6dFpgPbjWJTAQaMoW2NN9TDt3PqNvMxZnJ1tBg\r\naU3VC2y3Tb1TwMQIuhFf9fWnx0zLVac7VtzOT+QdNv/WpwBCmkUKl9s84alj\r\nvEDuF/gW40rRq1D9HJgnv81buhhS8CHz6eMwaYbaBeNPsMEr8+G69gE3dKtL\r\nGQHBtSdiUcMOjZbagBR8R+b43i73tvo3MAKf+9SlV90Zydcg/HDtQ1gmSt8p\r\nNqBl0ljAZfmxnK0u6lxwx4+cibT+fp3twcURg9r1SgwUjhbOhet9/1msg+t4\r\nWK7AgNXT4CrrVpfBsZtHoxd2JHGjtaweUNvhwF8ybMLhergjnggqgp+K59/l\r\nt04z1BeB4zyFpzt9VOE/TVPSn93qxyB4f6NaUEXE1TqGpTljkZVpW+lyZp4y\r\nmu3vXe1kMwMowGsssaSoFIfN4jX84LHarIwF/q8SQ2EbAtgRsZhtB3ILSACm\r\n0NNg6ovxQaHDaRUPPZjdoY3To3jQD/4cFbmwFsdlXVuOLuv4KgwIdweVV6fn\r\nh9vIOghlIlYxUkjXoJ/n25+rHLxBsBnl05kmYd2h1kAxl/7uu//GpDfB6cU5\r\n7kupIytSGF6kFxtL4EV/vY1b6IzrrV11ies=\r\n=P7qt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"fb3a956fce5dd8758e92604c6624dcf4ee479a17","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.92","@apollosproject/apollo-server-env-mock":"^2.46.92"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.92_1648686557173_0.08671443033273407","host":"s3://npm-registry-packages"}},"2.46.93":{"name":"@apollosproject/data-connector-rock","version":"2.46.93","_id":"@apollosproject/data-connector-rock@2.46.93","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9a1c81e2fdaf28daf5220e11f2814e589b12ada2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.93.tgz","fileCount":158,"integrity":"sha512-wHWt4qVfzs7/FgdVspoUDK0noPFv66dk4vNAkmkSRrB+7JUqpqiPX67D1p/Eadv/kexY0uhPLKvfabwoMn0QjQ==","signatures":[{"sig":"MEUCIBn8pUz9L0EFdLNXgpgl3GrmDQ+S3nMhof8krWALMj8XAiEAmzfGuIxQWwPkyJOZYuOrH75j/gQHx4Vui9X61JHwKCA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1110274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPaLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqb1Q/7B6jGuK2d9BervZXgEd7M2DwUmh4HAciL8UITvYhPsLM6VegS\r\ni7P08EBsTG1T/ufpDxqUXwo4tG+p98jbhp1kinURJsxIODX71h1rSKSwUyv7\r\nr5iPiBD652SU078WFaAQOtcJP2DKY6Pg1nULm39Xo5S702/BcxZEYNtIMBZH\r\nWqn3vGy+/LouYmnVqbVwIPRdvsaGizNbvouIIHbLn/Mv4OpZstIJQFpe2WWq\r\nkDMD8u5hdp759R+s6dXPq35iENqkC3kTmV1lh4/BQ7DHD1mDDQYfbMZ/4mrk\r\nrYKqsKPZd9J4m3WrjC52/lJjcw50tX0o3XbETKsjDEOM8Z4/uqb+HXYhCJ1N\r\n+qgxCmFzt+GjWb1XvexskuRWl70pTNkN2EMaGbIKNOzKWrnsAEInO/3usgCf\r\n/sYN78PQhWE9WYtUdxb0saxs3i930qVtvnC7/1SoxgXBVWlLtTW+LZvrLu/w\r\nvABKQOBSWLKN/rJUbWaqMpAMYf9LYbuPa5/RBOSXy8V9BihNdjWjaXSwLgHY\r\nAj0hKf0he5fo9FdaeCaSu29QEOgRhFxcMv5uNMwwg6Ldox0AXL3TiBO/i9NQ\r\nwbArCBBhFE61XJcMMPdYFfQGhWUgVtbZSjBC2aGiOHmEd45aDU/RXelVkB+l\r\npHAzhbmr0rx4THKGhE5hD1QUPB4Ahb1fcSc=\r\n=dhxW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c48ee270638718bde3879a17e12423290b57c051","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.93","@apollosproject/apollo-server-env-mock":"^2.46.93"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.93_1648686731710_0.6642454938218427","host":"s3://npm-registry-packages"}},"2.46.94":{"name":"@apollosproject/data-connector-rock","version":"2.46.94","_id":"@apollosproject/data-connector-rock@2.46.94","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"cadf0b2b8b8fab9396a7ddae442088e487cb8125","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.94.tgz","fileCount":158,"integrity":"sha512-YeyrGpZEdjiAKCmuNkLJ4Tlb99P/BzOQrRjJLgoI41uq3tt1njR4I7+fc0JSs6ovH35SJwiHGnG4UVWgEhFieA==","signatures":[{"sig":"MEUCIQDfrXKcux91Zy6cAkKHzqOG5BsN1a2W6i0hqIpCgRz5dgIgAgCs6Ewx6j2EEPPmoVjaKsUtgnVwFo61TPpF3sudB0s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1110459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPdsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWTA//YR31eGthkAWCxQvjC7qxw0TykjmVV7kcY552tcGtcSJw2/gi\r\nbqxfWfgZ5gvvYgkAT+7eoNCLKfAjBeSjbPYQNJInT6+Ln/UOWTeGwgTxdyav\r\n4CapUI8ciW7rPnyCrkxpXdQQnABjI+22WiEXWEAUHQ/5BzbOzICHYP+biteB\r\nW0jb3t4l39HxW0V3bnDKIdcSuZPUuLky5g0DyMgriYl1XgeyYAJ98LklBFCT\r\nt7KsY5aNRhmfqaw5jZCo+6d0lOtdWUGgJdhB2DuFk2j/Pq19igWhULvZRzwy\r\nNLgHz4iYPdiK6YzQp/lKF6LcZE8ouWquvOHLVRDvc62N+qq3djvQhz94kUDV\r\nDyuPaxXDtOWXNSiXI95mCfYLwwQNdkSVHO3aaZEa/I/7k/aV6zWJfqj6CAZG\r\naUWCOJ+HB2zCp3PxKXrJt7LmH5PXF1UwITqJfAB5172aTNnZvkDalQMWqQWi\r\n+I9J8+p92jOZ0/MUkaFYBPGxtgp9DwOvnoGdU9sM9t0en5WJbm2QrnGOrrnT\r\nHvn0yNA4CgF6izEuX2VaKgjY95yxT733deV31wMu6tDBsrE/xEdEwKPjnemS\r\nasEYFWATPW3VDLpRLOkaPv7XQpoae1Dcp2AK2G+MDSkvD1W0+coeEcZG+Kub\r\ntOGuk6fP81So7d2PakWdNNSAGiTGsLM9ksA=\r\n=vxdR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c13aa8f2ef1f353bf7c1e9a2606078ff04b029af","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.94","@apollosproject/apollo-server-env-mock":"^2.46.94"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.94_1648686955834_0.49635044543158924","host":"s3://npm-registry-packages"}},"2.46.95":{"name":"@apollosproject/data-connector-rock","version":"2.46.95","_id":"@apollosproject/data-connector-rock@2.46.95","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0a62cfe648e11a80929519ba90f71555681e1ba6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.95.tgz","fileCount":158,"integrity":"sha512-fZrfPU1tfMw61+4JzSNLKinJKtUkqDppREHueRBv7d6XvRbGEzxnz/VEDi9nw8ap6gwmxNTdvfUYacN/bYaTUA==","signatures":[{"sig":"MEYCIQDPboeVb2hpVaJPcjNe7VLQyLvktHxRM2gOjTW6Nsl7MQIhAJYZXpPuwosDpFk8FzdMIKw4xt225QMOuA8IvjRWZIZ7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1110644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPhOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAqA/6A6DFzwJzAfjkMYArsqoWSWC6ayPD8V5INY2AHcItGykV1n/8\r\nIntiCqUKH46e56Uy+U2vchWhSF+iB9afoxQfJpB+9mWwZF1/7BGTNR4zU6kZ\r\ndtslfDTm9kxPihsDfVeTrvADJX6mcJfafb1ilfPI2DnWqJu+zvgCDIKIFvWE\r\nLqNQ55RXF7I4lnjFr8x1yirocQi7dWaJTFqesRYYOoC6nyMDZAiBIz6jroDi\r\neD4LdeZ6qFNY63hYEc+xqUIwwc5aHHmNpepAh1wE9ag+xNvw3Xc4jWmjhQ4o\r\n9fQs8AAmk2kkUDYjzL/tanaMkoiLUvIcdUv/2MBN+8FPdPB97vYd1C2ywt7J\r\n35wruMpQ52/yYC1HNhM4al7sMRJQtUqh8mvmG2Y1sTPeMoEVgeQLUqar10KW\r\nRTsqJxb+xG4wfzwerFY0pm5h1jxzicp1DHCIJMnzHO9Wd8zHD77pNvarjrSe\r\ndwsOezpeQE7Q9FiR6XQpVmqi1t1e2mbTnpfDtD7Il8SH+kvY2PSFdXoNH3S6\r\ni+rEwhwsg9LgOoM5a8jgnIwP0U222Bez7KogmhGKUWcLIQWCYYk7uqyksNTl\r\ndrfhUfTpGjNnMKEqGe7vw3fhXtOc8UxveApjFcQSsJrfMUSuNycYc+ooj1SZ\r\n+x+Ew7Dc9I+HKH752/1gNeoAt493VDvWrmw=\r\n=3cum\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"a1bc4acc210ea73f166fde940402ee4ec8d2c024","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.95","@apollosproject/apollo-server-env-mock":"^2.46.95"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.95_1648687182536_0.8737968103497336","host":"s3://npm-registry-packages"}},"2.46.96":{"name":"@apollosproject/data-connector-rock","version":"2.46.96","_id":"@apollosproject/data-connector-rock@2.46.96","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c67447d8817c9b9098d4652795af47cbd21c519c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.96.tgz","fileCount":158,"integrity":"sha512-hKDpuMHr3r0FeyS2w+xe5nUYpxzQWI+9yJ1Ye1gEQQ3+LR+lTLXnSWSPqYChsGlCGuQxc2hBi1RI4dCLZuFjDQ==","signatures":[{"sig":"MEUCIFjcmNf1W1HAYyUR7S+pQmhlHEw6GLY1v22C7/qjgH3IAiEAzvmfbzi6Y+tOJXoqIQg4cVuKoAqfAWunbsTqzGb0NCI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1110829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPkAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBkg//fWmY7lSJsJwbNiaK9K24HxJ1hQ1F7QMDoS0J6dgiZjIOdisc\r\n4bTm2dENWH9PMzrgVVmw3WMm7Pr/W9Aw1rq0r9jk2b0ar5T0CmVwtBgvgKdp\r\ntbkabe6pIRdemDjntFnTfmoI5nsRe+Bhm7CV+ZTMVI2Y3IGfbbMu98f0DfD4\r\nO7Qr2mqnnFoJsd7TUwhLfi+u5q8CdpgWamT/BcWKmnthlUQWjAgS7brPA/Uv\r\nW536WkiaO+R7l+DyuHEexUCekj6Pjf3EcUxpzqlxQbKlqdxySA7Dy9fiaf55\r\ne3vz/hAKzxoCTenWXFw6hCX5hEyQeg6CCXI+dhts6uo4W+mcjdoQcZbNxnSn\r\nr5gw/L3r5P4r1DoKVTa+iZuKwmDqC32S7EOPKpA1afkegG19qJ6Ho7JA3ZHv\r\n0mf2AUTa8JBgLG9gL+qE4sA+nO1WpNmHOELpdTx6tLa8we48p08a7L8LvjWB\r\nKzpCt7HzL4PMBbSIeKbZcZQF4K9oM1luTR5J3/C6wYJeh40U7QY82wXdoOte\r\nD+QG7a4SS64upN3aCh5oMzUZwsUERJdhCf2j/qKBLmfK27/qkC70iAVXXOP1\r\nMaRv0HgwA29QB8jvn3F2JQuS4408jNutLWKXNrbBIcNsy2+TFRaluYfY0fUo\r\n70eKAeCTKUy3yZpkN+WsxvRQc6H4h6x0deU=\r\n=TXan\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"151d38327fb3f8722fddbb5721cf138bed92c371","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.96","@apollosproject/apollo-server-env-mock":"^2.46.96"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.96_1648687360192_0.5962304087483346","host":"s3://npm-registry-packages"}},"2.46.97":{"name":"@apollosproject/data-connector-rock","version":"2.46.97","_id":"@apollosproject/data-connector-rock@2.46.97","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2f3a7e6aa106ea78cbdd1c18925293cd4fb92b09","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.97.tgz","fileCount":158,"integrity":"sha512-pMcya49hfa2/e5s9Pzi9A2EfJthMXGaDsofLzdSFSwmLupjX44hxXpNVYndx16Rr9XeDOFp3K9g/fb82ZIJgAA==","signatures":[{"sig":"MEQCICh8P7rhDRs4QoHjsWQMPlZmN9s8wQ5yoe76FI+7saiBAiAFzUtd5Enjc+dVvsTa+2uwseFKTUM+sT016H637yb8IQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1111014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPnwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpdGw/+KBi4ON8XHUbiE8eZBumkHwM8UJ+wydczmMr/s2OtBCmf+C+D\r\nkGFXwqUdW+Zlgws4q44zXxUJnPrY/JHC+fsTqhRSNkIoT7zLceIHHafWDuPE\r\n+jXCdMq+WnztNexVmiKqDpY9uVx1WXJ0S/4rGOrppd96vHsF2QEHsIT6HYGi\r\n2QLJbBhFIx7YCDQS3M+uQHaHmINRJlztfq0JR4eT664UsAbGnmud3NeY+a00\r\ntT0HQbzcI1JsIXUAuZ7SACiciNarFlgsozI/DQkMciIAFjBFRRnVaURs74aO\r\nzY2uFyRaNYwNiKQrs/8v/iJ6a/HnuaOBGlzH9xXaMS6GFRR4DUwDi9gqjVo2\r\n7j6hA39SmGojqQzMY7NnsfUb2FNOKhfkkU1vn79cTbhWUTj1cAiD8RiuvJ18\r\nsyLEuk5U4hfyCwXZCpdjjz7uOr8DfZRUhwmEMeM0iCE4xFjz8CD6WbkjJGth\r\n0cPoho5HS18+7k9t/ms4W+rEO/ClObZBsBTQtGj3O0fLEv912vOg3SVOuPn8\r\nWLAssDfBpfc44dnzLF65yE10Vgt1Y8eRIsoy6Vo5Mg+WDzVIaL5OYmSVl8rl\r\n8HSMdCd5ks1mJFFJ2XGhi5nafBK1H4Yj6opWr/tAV8AzQWVrhXVBd2kbcd5m\r\n/jLZ3j8C3oG0KvP79Mjbe3i4turWZqPH3aM=\r\n=I1nR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"7c5a4e80eade4699de2b8ff825a036b6ca623d15","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.97","@apollosproject/apollo-server-env-mock":"^2.46.97"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.97_1648687600672_0.9072319106981459","host":"s3://npm-registry-packages"}},"2.46.98":{"name":"@apollosproject/data-connector-rock","version":"2.46.98","_id":"@apollosproject/data-connector-rock@2.46.98","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9534127b010b6d37579501f4a6f98a655d2b9f22","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.98.tgz","fileCount":158,"integrity":"sha512-AZg+d3tEud8ykRQErE5oEo1YBCR7KRBh7P+Hur6fHFuZF2MQAW2QQZgknXITj5/R7OIEH+TChn2CXdV+RB4CpQ==","signatures":[{"sig":"MEUCIQCoSj/z77bYRP3VyPJzA5G+LpbDw0maEX+23Bv3KkPeYgIgfqeA9322m+17MwkPjrjMxgrj8osc2k2pwH8mJLNIpC4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1111199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPquACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBug//cYhmiUfISL5gV5FRSTyQOoW9M6WCVfxgsS5MNfdBEYeRcR+E\r\n3QLjMMzCx9aUKEkiWHW6EjBOn39sh75LumIxQFl5sSFideTH3lRVWEw2GgbP\r\ndwakVTFMuOY1IKBX08IxWukr6gKkjDZO4TSmVfRd5fyhXIvGkYL7+YCHN7Kc\r\nQ8UGHOh7Yf2/nok0qyWhXJ7V/hKGuA+hCz1m42zHOmmaOZx4iCzPA4NkI1Ct\r\nSv+rsV88Kcxwpo5Ub2JlXPE1UdOpyBwk+yuyeKX/SfvtJKzBQEk94Cvip4ez\r\nu/Rt93NfmpPc2pwmeLY0UeZ2EK1U+EvECds5BPgOcpqGfKEbBMAVKn7iH/oH\r\nJkWtcLTaY50iFv9ljXXDM+Q43SJOZexbylcpsfgWCmoRgwLVzMwVWLEk/XEY\r\nbmqkzx+CtDx5TunDG+DaLN+i9LNRuDZCAbZCMu9G7DkVc+AVkpxxK98CThL+\r\nR3PnXAP1k26zjLnW6j6DJ+mygdiMfP+Ya828A6Dip24iGWr6Gj23njmTriOS\r\nIxJjnxHvWKX//M6WjkDQDsedxkqcOzn10H2Hciz05U/ZzbMfKE1JAWjuPl+M\r\n6frqfUemojcog6vue8Yc4sOMIMY4zWB+2Tz0hcDcL291cDwq/SRmouH0fbuL\r\nbI1BgGtk+/kNio72toL47Lnzin55CqBlSqI=\r\n=hUs7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"783a8f71598196f826cf37891256c514923eb998","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.98","@apollosproject/apollo-server-env-mock":"^2.46.98"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.98_1648687789925_0.05546951117954291","host":"s3://npm-registry-packages"}},"2.46.99":{"name":"@apollosproject/data-connector-rock","version":"2.46.99","_id":"@apollosproject/data-connector-rock@2.46.99","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"6bf4a66aaeb1186f5226ef6f156d646c0db24528","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.99.tgz","fileCount":158,"integrity":"sha512-kvVfdwaxgoEgxZPEkfLNwwqOYOJ28Pjbt/S1TXijZE1+XVH5pC2sUA/cYS45u+SpK8d48jt44ypbVnhgsaDuZQ==","signatures":[{"sig":"MEQCID/9sQfZUB0b5sIFJ6fzL9SxS9/1gj3GPMe6Bz29Mb+ZAiATEhMogkBhK4jDWF3GgnvfP3Uz/wH31KmdbQvoFRSCtg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1111384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPtsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDeA//W8zRc3Xl+EC+Z1H5e27UAFDPrq30QoBMIYNVwldCwgk/MuoH\r\nwjrsV3deBxNdsAnftF7SyyJQsntQI5sjEFH0ylYHq7uiRO5aSOStwEPA2ILC\r\nMNuQdgJeRaJ1ooWZrXIa7OfCeBDGGZe8XrCzmF3xMmchsGlqe25dBEnjmAZN\r\nBasGa7BD8p6RbWgyiRrIyZ6LCXZdRbxa4XK3GrxGHEDTookdOWdecZJ/1LOe\r\nhY6J9lvNqu9i5HVoPQLOPjIOk0809detBACEb5e5fV2lDq/alEgZLTCjiv/A\r\nRbKm1M/lYUE7o3O+Yjm8MzsLxXUzn/7iAxN1t7ZyBfvFAp0arp4B9DBs6rUw\r\n7dp7iYI9Np2Mbl8W7/1tNX0jgULkPIxOV3pjxIcTTMxBES3nTvXK7I0+M1FI\r\npsM9DuB4gxgrSh1hxsB/jemrC2Db0Oe6DwAgAf44I59ELkx3L2UW8OfnWlLb\r\nr77oTVG8Y5P99Per9+xp7/IoFgyLmlVS2QUpFgdn8MmX+3lqiKuscPIjpUio\r\nh5De4tIqlw/BdylWCFBbbxwGJ1UBuMPQr3G7wP4521fFkzpR/rq4DhYwpJAN\r\n/mBAW0I/w1PwFtvgU4GvmEwouhBFxZ+n2mxD4MhXzkzNDu/H3sF432pwPMvS\r\nLskN/rtU2csfEp52Aat8OYD7ELQScPxUhhU=\r\n=mQtw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c1abf33052521aef21299884edb2051be9f1bb90","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.99","@apollosproject/apollo-server-env-mock":"^2.46.99"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.99_1648687980410_0.5287604956252379","host":"s3://npm-registry-packages"}},"2.46.100":{"name":"@apollosproject/data-connector-rock","version":"2.46.100","_id":"@apollosproject/data-connector-rock@2.46.100","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"8b9b9fefc3fc2ff6460366c49c87f9b0f0ad2c0d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.100.tgz","fileCount":158,"integrity":"sha512-YCmgmNtrnorRqsbfavhepjY9ME5J/PyzEvicv5/Z1oh7LDmf8yZEWR8gzcQ5kJioWh+QZqurUinI7tO8af+scw==","signatures":[{"sig":"MEQCIClZKdhszJNwRP+qmWaWwg1pH5kVThKNxAUQl4qfIOp3AiAz7/Y2faGTa3gIr9oZU0z2FeX4GzC4shJHcWOcCRiUqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1111574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPwUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8gg//bix1JfQhokWZMQX/1+t4Mb4sxCQLaQfC8CitD+owCZ/tZOMw\r\nlOYCOr6f3TeFYHAlHfo46eIaK0M7/9oOd7Bmz1W38wc/QDTHFKWTJ/sU412I\r\n2EOtOF7BxeB5xTYmV5iO/yItJvQ6DRf070ytCF9JDkQcHs95gK0Poq4iCxz1\r\nTY1P0Hg8vDZE/nShVYz3+VXWz9hvw2M55m0/CovJjzLa7E3g6OkSFWeNTb6e\r\nVRx1zA0Na/W7TEXBp6TdjqS3iEmeAhvE1sUCktU34d7HeMjoXx8AO9uoBZiN\r\nRdBAZ/n863fuAlp+NLULbBbKL1pd1tVIr6ymxOmv4sFJt3XkI/P+s+yURZUa\r\n/6umpAr3bMRNKWtacH0F7+I1H5p6b0ff1wiCj0SGeN5L1BZ3PxscBXxheNwb\r\n5ogK5EvnDcYpO6gVQX3lXWt2zElcNEroAiskvaZH28NDcz/vBnFi5Cf8hNEm\r\nKlaxSuFLPZmxmUq9ag4SsXZ+WFEswyUKEiG5VWfQoucvN5ckZHVIfI6BWACD\r\nlNIP2Nt5qHEHZtc+GPbwstLdYoql+mOaVNVtvQyw6glTcY4qOed+3PQGAeqv\r\nKbSizXl3eKqBTG6SQYUoylvrg/GkXg68UUpZSKu62j1lymuim4L6sjtBjb+6\r\n99vt0gSdlIGXrozR4WkSTgvYqVZkH/QTNdg=\r\n=EtQv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c2e500b4f70d564425077febef10754e3b1d92e6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.100","@apollosproject/apollo-server-env-mock":"^2.46.100"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.100_1648688148262_0.49866260471755464","host":"s3://npm-registry-packages"}},"2.46.101":{"name":"@apollosproject/data-connector-rock","version":"2.46.101","_id":"@apollosproject/data-connector-rock@2.46.101","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e68f5b729ba1dc71dc5416252a5a75a9fb3a739e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.101.tgz","fileCount":158,"integrity":"sha512-s96iRAG6BqUC2hKJfKamcujZrh0r6ud0+B5TNDFwxoDav71wsHrOPRA5K/Bdh9C2R7odWWjFE11xjZDqAfV/Rg==","signatures":[{"sig":"MEUCIQCaOD131756H1AN5cGe6+n4b5aOTztr6Xd9dKXFA7AAmgIgSSRE87X8+lq0xTQOJYJI1yB7MJbJLo4gix/ZPT9rAFM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1111762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPzkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKpQ//Xm+Vc+mZSC493dRrtcim7Mbmryu99uSoHfM6DdCUFB0CqFf/\r\ngpC6J6JaNmAxczbtU7+cRLQW15okY9eV7cqMrY6LxSmpICB35E16l3HRGhNX\r\nQgtYUBguNmYWxcQlVU7BkiD+5Y/llUkSpo+QEWb+umNiRkms85gRQmNyVMsP\r\nJ0fWx4Yzy41pHWlFPwJsSV6VHvdSn7i7qjjDjEGQFtT5BVXK848t8xyGjs2k\r\nIFX7kCmY4KnzykR8EmHCqM0zE6TK4RQEtkR2Vblv+dS1i3lqjnjzyzoShU9j\r\nLMnJi6F4ab5+44zUUToQjCfmrTXxz6TWew0VqxZ5hQhl099ScoXML+y2938I\r\nUTg8XB190brBtI9KNrveqFaQe0mE68UMejcSUhCUqbUpc5Cfy3mbEHAlVjjh\r\nrCNfO0QBsz5jMLpTB8U+RTtrsby58dl1Vw1LDx7TI27aQpLlr9xfU56/W/Lo\r\nd8Khs9ziaWw/16XZ7RGZAp8Gqyvk/GAYFdW4gUQNgr9mnrwjPes+ARI+khEk\r\nglU9EguLT/2/JcysJYH4HFDKPcvl6VQSWVsUYmXTkLWtmY8aUA8QLgZtx7m5\r\nTdzdMyFLB3/V4EQdwlLJuKKugkzl/bTIPpcgrI8IGnl1oYGR8T+yvO1W+rnx\r\nuEbOsBgpcdkeBGvwMoB7SYnaIn7sYRh/hX0=\r\n=7VdF\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"a5c3fe53e3ec061bd8d812c51d3ac831a6dc89f2","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.101","@apollosproject/apollo-server-env-mock":"^2.46.101"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.101_1648688356213_0.21346130445379163","host":"s3://npm-registry-packages"}},"2.46.102":{"name":"@apollosproject/data-connector-rock","version":"2.46.102","_id":"@apollosproject/data-connector-rock@2.46.102","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"17f2b7e5cd61141c2af7af5062eb95c92a026168","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.102.tgz","fileCount":158,"integrity":"sha512-yTnxcEVaf/4kTzN5FknBXpRCA7v0G/MfOVm9BbmqsPmSXzZKF1X+UEwYK/CFC87yenLm7CkFjEsa7iHGDLgrHA==","signatures":[{"sig":"MEQCIDsh33YnLCSncjc+Fa+LxCEdSqzYf2EIjqIqWbdaQN39AiAOoSCdJh99tk/EvTk4xFTUEbizQ5WhR1+cbiCZ7rv6DQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1111950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRP3BACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7lg//eFYAka2wm/gs29HtiHVB1ETb5UOUiJAHQ8ucCh5NDd87/yn9\r\no7I32836nnkVPL3cQwaGItNYakeCP/Y6DH4dSbjXrFPwqpnMp1SJ0mPBI4+G\r\npbA8DwprEWqXBUQB4w5IFQzgvPeareDDBW+i89GJDA6NkAYuebIH6xBIPwUd\r\n38Ylq5lV/uFnsYpWygcw44SjyfkCp49P6l3EgydP94FuWi7obvqxWKikNg8S\r\nEn0JWkOGUpav3g/AcnBC4T2d/ailiMQgBQHxoriOy3MzuuUK+YXkj4Qp4yQo\r\nxP2xw6cIl2RIzx0IRjSsh2OUaBZ4d28+7qZwYnW3QoL1F6IySbRVPz9hhqBn\r\n6ydus4zm61MBHOXUNzUFC2gU4Lwp8ZiVWESfbjP/f/fQhYU+zq9MVtje9q+t\r\nGy//u1RbS34CKvsI7erUOXIRQ38fUP4rF7N4JqiENCzd4yP+QgqN2dKuwv27\r\nIRGikZK3m/5+jGRrjJitd00kiXRXgav2Ez7wEQMI5Gd5XuZC0+KS9ZhZYlWs\r\nT6tEJu3p5zkoJEziFtbyr3KYkEBgoG87z0RGGv9JCJu39YwjsxWpI6yD+pf5\r\n1+5XmgWbl6nQsBuulPUiU8w1tUBlq5qWYTwb2Py06+bkx1ReT5dGSKm9P676\r\nvu37ZEuDLKlQNDEKszTJj/t0PrL4/igQVgs=\r\n=rATg\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c617d908069d063ba38367e10688a9a4923c5d12","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.102","@apollosproject/apollo-server-env-mock":"^2.46.102"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.102_1648688576972_0.6356300764419922","host":"s3://npm-registry-packages"}},"2.46.103":{"name":"@apollosproject/data-connector-rock","version":"2.46.103","_id":"@apollosproject/data-connector-rock@2.46.103","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"02c981abd72beba5ac2038bcccd55af40be812fb","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.103.tgz","fileCount":158,"integrity":"sha512-7FiS1V4SwzjA8qPa6l3TrZuS31iqAQlQYX2VQaAaNlGw5I7PHKfF7R6JuJSWKtpwB62GMx+CWCTRG+ML/aTmkQ==","signatures":[{"sig":"MEUCIQCPyBPIsBeVQR3YQr2U1twtvRUXrEDYTcq6ehXTJTi95gIgeb8SlJRB40mOUERfRpgIZpx/+uV32uhJadpoaFUGnfQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1112138,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRP50ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqK0Q//Xs7coEBrm2ypxv80ABkzHehj1ADDIqTKUCeEf2oCbJeq7L5W\r\n161312XJ6RPnTZHeVih9sevs51Y6tFHywhBBUiCVBW/6AOg7aiS4tyfcxKJK\r\ndt7M8mhW0digWCUwEI2aOrP1tYDtmqs/RmdhLAxxcoXATUpWUPrjgN9RSgd+\r\nqqjJJd/pLON0jJDK+VFNREh6JY5R1rhR1AaJxvI5XCGPBE5dDFfUO6FnSWs+\r\n/e0ZSwooxcGS57LWHlWqUSS3FB4vmBGOz/3buLyG0cT/yBFLZPVpkMrn8/YG\r\nBWkk3AuwlsAu42M45AB0gPU2qrzbHwW5ZpGahUiR5cMlab4VLQLE6D1Hi2vx\r\niUddLcQxiADAjZ44PEAm+eFLibA/GUbSHdXH04lMADVqYUekl5XWKPSGoAzh\r\nObEqjqSEljwnBvPhnBKThmdPNCSfv+EIY5lf5Gb5wJPMWDKfsTYjNkIM8iCl\r\nef3BD0pkSZzzSsyGoqAtFhdDz6DmhgFr6C/9ccXVLH13KpTUCP9+hjH4STDf\r\n0VdP6nXQSVzYAUp1iMT296EsNcynaNpMl5MmDHgkoZsqWDdu9veUzX1rQDfZ\r\nNtwS31+EROXK5aXL8TsM/wgN48M9pxUx8gVfgjRUPyj6IewNSQnJHA6uK/Mo\r\n9V9Ly7ScSaLrMlQi9Oqbh0F3zXuQXEy3Rt4=\r\n=Gqbb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"56d0e57e574d027a8446b1e783db535338121197","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.103","@apollosproject/apollo-server-env-mock":"^2.46.103"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.103_1648688755905_0.7582234141631143","host":"s3://npm-registry-packages"}},"2.46.104":{"name":"@apollosproject/data-connector-rock","version":"2.46.104","_id":"@apollosproject/data-connector-rock@2.46.104","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5442264ad87cf66d52e7ac3175e24eb30a8dd36c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.104.tgz","fileCount":158,"integrity":"sha512-jlU6KY/KTYOuQamGpemrtz9WbfqdhGQMFJv92oiv69IF/BH2i5RHnHGBpNWrvS1s/Plwd265xO3LuDrhgsZYHw==","signatures":[{"sig":"MEUCIQCgzVzxJqa+Vk0PNWnmTEnTraSIbOgtc0HxvGYAI1W5SgIgCwgmFxqfr4IwmgpspxH4BYO1b+07Hpcg8J/xRM9eTno=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1112326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRP9NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfGRAAiNWvenSYw2pO2LbBkUx8TEWac4xWMLjgFpTaip38S6r70iT7\r\nwqon2CdlUbxXZecHkxSZPXGdm+jFv+d0dwcmMd2sL1mO0TcuHpe3H0zzNQE6\r\nD4KNINBZoWoUMWAdu56BLZuQuo7zTN+qJh19fkBaOtXXLu51vv7KOi+OHwLU\r\n4REhLMpGpUEP4UcParWBmA7NXjFYNaQBxgrWONGy/kJhh26UCgam8l29TYiN\r\nFNFBRRnpZ/BYiNJfYUh5Mic0Qoh5bHLvEv6nQ4sxvj8xoA4EC/tbQzdxlhrK\r\naH7XPtPt8YxnWkA6mxx3UFA2G1sHEPqL+29kz9C2TCjrrA0ZQQ1SPTZHqFoM\r\n656s6dr+Rr7FIFcVkCfxuatDvhmXmrJQZapvaKzR1N6ikca7dAJCy4+4zHXY\r\nR97fj6ImhjfecOVBU/37d1H9jp0f0z9XCzvJo7jf5cu5VWZlCP+x6vxgXj0F\r\nq6xxrNBKKkKBC6nTOvjuVLchT7JrHLPPHuccS5zWU5dEfBQTe6wmbn8elFqy\r\nyjuYIn2yQDqMCa/DkN0pxy2B4BCPXCT/WNGeyYTkyoTuqgDAFkV93z2jkwYU\r\nLGuTD0SonCNSg8nsglwrSq+kNQ081IuyfcuZWNfeb46hNpsyvxICXIdiwvcl\r\nv96euBn4FjcRUSlSWmtkmzte4T6JKbNCk3U=\r\n=w7p3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"127746c89f0da806ef5337b43496e09c882e5cb9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.104","@apollosproject/apollo-server-env-mock":"^2.46.104"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.104_1648688973543_0.7863711848948689","host":"s3://npm-registry-packages"}},"2.46.105":{"name":"@apollosproject/data-connector-rock","version":"2.46.105","_id":"@apollosproject/data-connector-rock@2.46.105","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"93cca9a23d8a3b37f503e4aec9e7dd0aec3c88e6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.105.tgz","fileCount":158,"integrity":"sha512-V/5Nhf7QY30ulMHY6GomNEHiw1PtjNqWW5ACFCx4vw6cBhSiaSdccLaGNFFP8m+JFBs+sTQ7cx3AwbENyIdnvA==","signatures":[{"sig":"MEUCICAFw8qGrruoxmnq34VcFyRtDDbGfGk3+uqie4HoHsGsAiEAjXX5AruW3D/2koF1B7j3C7buWzTyeFlfRShifsq9q14=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1112514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQAZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5dhAApOi4ZW7RHMFHCNoNvp+iNOZt6RtIvLkZn1SRuYuPDsMoedrG\r\nY0M79a6/7sjrrDH89Q02Ze7YTU91RGnfTTpKpv3AN0SuEG1izOwKkbziKIk0\r\nNUXsaWgHurJujk9Innjb63hBrKUF79td7/9Zvx3n5hCixOtrHw4NIpDySL4q\r\nLZaV0YjGvFrwyT7iqqnakFnAbX5dKySGAaECqjH6K3/fy8E6QOAlEYTvbVGz\r\nzQpXPh1rZ8BDMSDNvP9/sEnBOqgg6fF0rXdRWlceG1X1nnRWkX7/LFHeRaY1\r\nnRS8/1tIoVQafX39jDKQBWWjPe3dAgvus8sCi+9tY3lL+uUMv4qKaRWIXDoS\r\nUIkI82oqp7tGqX6PiX+lC8c8sWl+3/z1zdDPUfPF2GE7pHZclbF2eDhwR6lR\r\nYC0j3PeusIkjeCcH29A0I+95JGYvNuJRtHUQOuOE0f028WCV51dSIjKR52Xp\r\nkjrmuHJsf7njTNk6oAHviSNxvSwvzrvRdNzNcRdfLmnqvJlyE+kSDi/0RKML\r\nCrEvvlOxlcp5C/s5Xi71TW/i9Va6HaiFzLN8p0mNfQ+Jg/w/9mfOg1Q6Jswv\r\nezpFSQJLmXG+BA5MlfBJukuHgiaxkJvInDcZslQYDWEz4puK06CNVh/MEAy5\r\nl6hUmowbNEvoa4jNa/WOCngfRZaT8vMeoPQ=\r\n=DrFY\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"725483cc961f97bd88da5304cdcb3c6bb6fe5802","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.105","@apollosproject/apollo-server-env-mock":"^2.46.105"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.105_1648689177080_0.0030775439181727204","host":"s3://npm-registry-packages"}},"2.46.106":{"name":"@apollosproject/data-connector-rock","version":"2.46.106","_id":"@apollosproject/data-connector-rock@2.46.106","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"24a6f737b11c2ed1fff3d416ef97a675e976ee03","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.106.tgz","fileCount":158,"integrity":"sha512-ksLmMyyAHLj722U14Y8BFu8G51WjPtdU03mI4ytwpab3JCqHRmhU6rFz78eDseEKGUT2293zE0KQzQSRLRTAeg==","signatures":[{"sig":"MEQCIBcN7IqN5m9seNnZr2L/lRSN4PVUHFozb/YRLPzw5UAUAiBuT1WQNVMG07VytxfN8u4BxgDi0Hvty6UNZpQVLVMvuA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1112702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQDvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1YQ/+N9/wCjQp+KmnTGFhjRluDLdMciWbeZQlsD4jsWn3xVmSFyAq\r\ngVgXjmwmTElhE+FrXF1xedZZZr5USF0WKywB4IrXUeb1p07woVuC7nqAF+hG\r\nAOo/nIeAwNfF04yGqBaS+oKUl2Fv///U6UfWDUiU0Su4ogTHwLsMrT6F3mac\r\ncGJfFsZOcHPGY9bAfzqm+3jR/aE24D/ygPJoIDqGrzQqe2v0dfzLa9m2GNgS\r\nvT1Ce/FATbsh8cbkXYuddGslSq4bKodTf5nszqkBubQ6tp7DGtclM/u786tc\r\n4eOAbxeXDQNIGYqt6x9gL/rnsy2seoBVUC2Cxxy7QOC4DCuiZ2l5LCg8AOYU\r\nay8aKnygX9HQdmboOF+oPZvb69YbxTCbRfFDcmFImS5SnDkj0r/vVCjBPUYy\r\nef4lKiXAXDPv8OoRl4vhXM1iFhjZgurjD3yevyD0pASPQIJpYkzpsCCeryZ/\r\nRd543GnCEYhBiGTP9hcFbpLj9Nj9eRGHMoiqGihztXknTrXmtBusYHZs+/s/\r\nzn95zqiqyhn55h6o3Ov+9UnXoraKPGNtoodOn6oDJPYA77NxGi+hXfpZh2qp\r\nZyizqfgDIou0Dv28HNTOmzmkgDAn0+Tuf5ffM4nFUIjsxya2XEvOBNpd+tGI\r\n6wdand+Ay/NprMSVGyOte5h3LcxNuKGkl/o=\r\n=LNf9\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"ff681a492e28ca04557e77e88ef18281bcfc6b68","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.106","@apollosproject/apollo-server-env-mock":"^2.46.106"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.106_1648689391677_0.7598877748510664","host":"s3://npm-registry-packages"}},"2.46.107":{"name":"@apollosproject/data-connector-rock","version":"2.46.107","_id":"@apollosproject/data-connector-rock@2.46.107","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d010077e97f94fc527ba62feacecfa0d3197f20b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.107.tgz","fileCount":158,"integrity":"sha512-DRsSY6zBVBKl5pVPw+vMNfsWppTQprVxxuRLYBqZXfi/XQLcHkAeOKcplcOzz8TbfuNzZvYw0aT8TpSS7ktLdA==","signatures":[{"sig":"MEQCIF2w/kpa1iEA4/IB+wkkFfDlMfmrqw4mXyBSNRGvV3MDAiAYn8yqkIk9D/khUIQSu/hgazVH56N5vIKwW5EZYNXeyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1112890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQGrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqoqxAAlYNOzJQlMyEfubJMiuiqaAuOvh9ciXHIR5KCkQaaEl2/K1vT\r\nDpq37US04FQLRVmM781yRy27zVHwam4x2/RIU3hwanvLk6pCXuLKdbUwbXnB\r\nge5ctOa9rMNQzf7fyvlKjPer7Q47ak4z3P6mADu3SHUFflsHrzgUkJbwbz5H\r\nz3wCTwRS/fkTxt/ppsHPiAWPGSpLPNGY1xIdS1ziombR9fkunIypOY5M1TFa\r\nOl9gRqweVX3McSK5vEpPFWF6QiJEcKXTKIKYZd0laPnxmA47oho1M+e9fH0T\r\nJycjh6gYOqUQPQghu+FlpKnM5NLyYwORvJ7Z59jaTu6V1SA9/985waN5T1Gj\r\nSD4FuFaERd7OOrrUygH2Dy2d6UltAT8I8yA755UaRrMwxYrLVoqzArzQHeiF\r\najTik65kddJP9okSz7QvNfk1WG+PBVg6s0Z2MbUEl8GmkeEuXRe/ksMXclML\r\nc/jQ8jVD9yuJQMkQcNT756y55sMpkdW0voQb7Ho/wvix+XhKt3FOjQlLnMfu\r\nBK9HQHR+MECOGLUi1FyKLPp4JTbucKU1qxHfixcM7o3OjNUnd3A4vmDZoBZO\r\nP1Hoidd8yWkpuEw0BzwFf05wz5m+uhHUDB1CINFRbNvoZ6lT4CcKkG9rnqOX\r\nVOwQ3W8NPuzWHAKpNHY3Q5u+YpaeDdlDeLY=\r\n=KSVm\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"a083c6c8b8b42a057b722bbbdf420f487fbae85d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.107","@apollosproject/apollo-server-env-mock":"^2.46.107"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.107_1648689579671_0.99063593093457","host":"s3://npm-registry-packages"}},"2.46.108":{"name":"@apollosproject/data-connector-rock","version":"2.46.108","_id":"@apollosproject/data-connector-rock@2.46.108","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e54fecceeab69b398649d21c55477aff87cb166d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.108.tgz","fileCount":158,"integrity":"sha512-4/qOUhQ+OmNtj8onFu4vVqTaUIE/Gw7bhiBKlBWCZPEpDnO3Co/dhc/VVGg8d0UmM2EP0ie/DJIPVPka8XEaHA==","signatures":[{"sig":"MEYCIQDP7CqpMBQMBKo4nnBsw2CAOnywFOPEt4vwVtBnXZvq3QIhALZljXeroNMekWd3WfC11XIrVM/BMH7BRmd9/oEsY/sg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1113078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQJpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqjFA/+NauXxIAGPfLS7CtxjS22jyXhjWi0vPXRH0H+JMDnpzXxJ/zJ\r\nqsj0RQfVxBhWOAyMMjNbzxeN1L1AUwoOs5cQ+XFz3Mcl3Q92wFqzAqALWwus\r\nX7ummBUvUwxu0l/AhdtM5qEZaUjX+PqizO7CJNKYUW8O37ywzQ/6GLUnN1Em\r\nrXm5Lm7j7LNAQU0X98/m9pRVPHQCT5e4t5Vj82ex3qF9hFm5D8+Bamn7SUAU\r\nbJ1LTusH6gHoN1woYTlFwCrp5ElajL4h9pgzjkIXXtePuo8nqRMPUhkk+Dix\r\nbIGGeygjELG13HtHuuZQgX0pbBOi2XGdAXqMo2xgRfasXmXp1zqc6EUG8Q1E\r\nP1AsIJV8Cs+OB3hdRF09r75W8oJUxblqPOsQ+bCYI4/pMz/8nNWepb/UzTcg\r\nmOuY1rC2rJrsbp/4U7vHpQvYzq/ewLT+n3Ful7xNcoJqWrhxvC1pcKhZfoXj\r\n4nu4PA1K5j5IeMMEc7GrZbO5bIWB2U63Lor7JxsdflYU2ZIlmdmnZ7RlyqRr\r\nnYfIsIdzR4rlHMxfujk3vfySresKveuZlah0Gh3iJX276yYngtilcGcGPT1S\r\nU9sXesIwmOj5fXN5oPUOiPYxjRDRwNFFx10bghXoloBcCE+kGOY14GZ+hHgQ\r\nOjo6rX3uPK2vbLNu5MqoHMebkzcGJSNE3jE=\r\n=9dcc\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"3fee7a66e777ddc0497f9e0ce651872969ec60a4","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.108","@apollosproject/apollo-server-env-mock":"^2.46.108"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.108_1648689768983_0.5091313086981275","host":"s3://npm-registry-packages"}},"2.46.109":{"name":"@apollosproject/data-connector-rock","version":"2.46.109","_id":"@apollosproject/data-connector-rock@2.46.109","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"bb87b57efa5d55d0d7d132a98a4a93a5a0247cb1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.109.tgz","fileCount":158,"integrity":"sha512-oZzTmvXCMvEAXFeVHPDMHsdeVCzdk4GXdb8sTBdsQH9hm5dcPpiSnlBxjckiOM+CVs7PR8gJv/6eQJ//z8l5mA==","signatures":[{"sig":"MEQCIDiWgzQNMLT4OVNhkSsZEzyxELnrwjWEBSza4CYuuV04AiBSUzL38TFU6Q0v3+DC0gwF+LOLwm10vd3OIPYGwdvnRg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1113266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQMwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpgGA//XkDlaXfyhyOUWIe7dsUK2R1j/Pgoue6/5dCnS+OLGa+5GDG0\r\nIipDlKP14YOuBo0ggFsRhrPYmeyx8aYRxE0nkwn9iDMJ9LQwV1FORO5YXKqn\r\nTSaavIFsELO2/prEWsjIM1vMiaKRB09TMFy1yIGPGf2b4QGosNe1RlFXl689\r\nCAMbU7U4lL89FhNmDzOXnenCFrjZANfKuALnsXB1on1cf7WPV0/2xlMD7P+i\r\n7kdIX9LMwdDxgKlvh8lOJVAUcN1jWu1+munbDPNpxFuPG6XQ+aHJ/QZI5sOM\r\nxPv9J2u5poqWgP/AuMI+ppo4i3/sdZQ93B05IVrG1AdDsfDuay4Afmhh0N5W\r\n8Xi3Mi765qgyjne2iJylwdiAx7gMGRGbug+435ARDylprHYVHRIaAFWtd6Tm\r\nsy9Kb9wZTHNl4DvZDlU+XC+daCRj06Rz/+mi5UZXPIVCRxb4J6CFZ6OtrAoF\r\nJg0t3BwueR+LxIzcBPoylSqhxx7EAwyxNALU+yhYr9+Z9o0woRD2/0WK0dGB\r\njNjbTav0jxmbJq2fRmbH7k7XSiPn01m0Sa4Ef8OQD47AaBdbdLxKus9gXOjH\r\ndBLP1y8B07I8y+lxkPN08FGsXPP3ND59R98w8wPV7v00tyIN+36xE7u8l0C+\r\nh6X4We4JgjyNjI3gklb1Rwv+XUaJYZj9siQ=\r\n=bK4l\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c7b98ca1b30d6105d8ea394a36403089e94d3fa3","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.109","@apollosproject/apollo-server-env-mock":"^2.46.109"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.109_1648689968401_0.7383808142909514","host":"s3://npm-registry-packages"}},"2.46.110":{"name":"@apollosproject/data-connector-rock","version":"2.46.110","_id":"@apollosproject/data-connector-rock@2.46.110","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b21f808c896eda07a5de4fc435a0414df5acf8d9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.110.tgz","fileCount":158,"integrity":"sha512-2tNBE21Y63oQhsb28Kc0D2b7k4HIULDxPpkZNEaoFpwVLqeDZME5f+UbE6wZPeyR/3jvqgNdIPyEz1wSc/iqMg==","signatures":[{"sig":"MEQCIAm4bfY19Ga9J6s+4xDmS/Xb5ZIAdweUAzSvxeA+QQSWAiBl1p+xXssotmgYTFMTiGbFuMjjkGQHyNklyE9wDCqdbg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1113454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQPxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXRQ//XFhFs51I67qspblFBQtck3vmMbIauVTeR0B+hn/SC1RQlPmu\r\nr4jVUP/G0gyk5J30G5KgUgWrtSvQ49ht9qXZdZU8gJ6pXusi2S0GuAIGCpme\r\nfwcDNzTXupysCz+ej3gjrcgP2V4PbyHVINxRGSF/rb+yw6iu5aY03oj5DPxY\r\nbWSibxFgUl5rg/VYQebSZnqsx44CT2DICzVfCpZiDEm1gQ2ss06v+MSxSqyW\r\nnAGVB2xGuOU8G5LBryTHu24s6e86KyK/PtxMM8Zuw567395+CRlFPzme4t2E\r\nMgTTtC/sHsABUSTFZMSBM+548auxXssaBkmVfTy/opzdo9Uiook5eMwr8V9Z\r\ni3Q8JolDVU66VeGUXn4diAVjWEtYtxeyKGEPgli3KcTg+wRYoCu3Ri0Qldbr\r\n3wv30EUnCh228UZleMZYXTUxd3tpjJze7XOY3PnD1eW9Cdg59Cmo5kJpwmJt\r\nh2jUucKBFDjT9pb1jeUqsQEB0Vu9Q9SzWyuaohZryLeWnRrmA5h/teS9RFC1\r\nw8c5hJavU7PC0leVTpiW6SZHRkNQjFepNVO3woR/IgpSDv0JQxh/bn386Qve\r\nRPZFgiEpIlioPtJrqypTDUw8fKF9pXytTGyxJ1BYrWAkJIFtkB56G8q+xD0W\r\nYkSVW8N+VKeLmdsP5yVLDn512nRAEBL6QHo=\r\n=1rsW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"56a3be402b4b26ec1deb29ba99d7392719b2a6cc","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.110","@apollosproject/apollo-server-env-mock":"^2.46.110"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.110_1648690161111_0.23931202548415165","host":"s3://npm-registry-packages"}},"2.46.111":{"name":"@apollosproject/data-connector-rock","version":"2.46.111","_id":"@apollosproject/data-connector-rock@2.46.111","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"24f016a6bb15e36fbe39a138a1211d56e068339a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.111.tgz","fileCount":158,"integrity":"sha512-y+P0fQTUc+qzMAMIJPvW83P8xeh6OYhjAYz9b9qiGyZcTGsx8TaLURiPDGXSjGBE93KAgZE2J1m/ZO45YwIskg==","signatures":[{"sig":"MEQCIEuDXMpWCtumXeM+v/gA3mKnBoFTDy3O/NiuoFmqWvhBAiAOedM93CFyPf0e5loc7xqDG+9q2Ck5K3XC6KmLbPCTqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1113642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQSgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqv3g/+JtUSTeUWiTmguU4YbCHUFLFkK8JS5k4PUgnkkv1O6P8iK5qO\r\nRj5zEgiEKUUZ0fhQ8ytlX0kxml1j602vqTyc8Kws0/vC3cysBOjBSVt7GpWX\r\npE/40dV3os6mV4F/xHqOH7Ef2nlg/sBCZdiCBFL6lL4RRaqiwEx8uSS5u0ia\r\nt+r0MG3h+lG6lvgm6hmnnJN830aBJO2HNKs6fzJKFvgEpJEo7qNkRpQxxI2J\r\nevAa4yPHgIqbvP7foYq3jKi9bf2K0+J8A3+vOB2P2Ie6iDnML7+e2bcYHgHx\r\n5mLRZLEBQgoehWN+gBMk883CkAdKA4re90db0h6qyV0VbM5fW7xfKrd2eHz3\r\nI/x0CQx+o9ITcsG1NiUoomA8ZtxaZpkA6H93L4FZIAgwZLfNLvmaYuAMWiYC\r\nnINO2EcLAbg6jkdJMm7Oc3ybgpDMVVBTeVlVsOOcBEmDdPxfbVzo2SYBayZr\r\ndqaZxrMqx1x3hSWKWdzPN0lCVa7rA95MmhvHGr5ByU2H7ecsmlkiAuFnsNtj\r\nr7WY+8lPuOjyPBcdRUxfRQnZqCl7/G7VQXON6CBBuMLNx3aZH/Oyv6Rbz3H8\r\nwKGxGzTdKtqYLSBir0vWd3CYiycVcf/rDWz9zajRACpI3C5tz90EJgwIO664\r\nQr+UMeA3xcRHeuj2hJep6MFl5l7Snxg9Mvw=\r\n=HOB+\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8566f39c943929f508c0ddc0820a0ec611662312","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.111","@apollosproject/apollo-server-env-mock":"^2.46.111"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.111_1648690336214_0.32285122237451347","host":"s3://npm-registry-packages"}},"2.46.112":{"name":"@apollosproject/data-connector-rock","version":"2.46.112","_id":"@apollosproject/data-connector-rock@2.46.112","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e53379563c59855f89612ab79a66f0fee82b1043","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.112.tgz","fileCount":158,"integrity":"sha512-QxvfPExd7L9zP+V8PxjTWNZxbHp5ZDDNy72wLRTu6Ig5Htb23e7CZdx3hX9oGOKTb3i9klM35TzowE/zeAfV4g==","signatures":[{"sig":"MEUCICEjkUAABhQpwJFFgAp45gp2ysjOSOJACDhIiUp2iZSIAiEAmxiHEM3onpyy8Cr+nmb+UR5bN/U3WjOcv+yLcaoqNyc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1113830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQWEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUCw//TmP8x1uaDhCE0WqpdEZIASpQb1ZfoJx07cEyKrVXvjZsFsZx\r\nH3S9cfUZJSR3ok2CES9ldeZOO00QyUJ4YTfB2PS5G0W3Oq9at3pLLvf7St7M\r\n5ktxx7dk3l5Q/5gaijWGL3ltgEQAOR2eW5NvA8BgOmBsuoi7K2PKnedHy1qv\r\nhMUk05xzBgYxoS0ZKS6sHk5Fyxse266jujRk6mZNeAxZSObRc+I8HXwcOOnO\r\nRdlfXEr7/2Rc4yv3FvX7w6tbsqnsJ/gvRvyLzO8wF3nVrMiPNprMqtQeQNQZ\r\nO9CcgjqnXw4VlX2CDlCQ1dNmKcHT+nFTd2TXYdXLCv/7rx/2josulbWF7n8g\r\nQ90tRs9mJDd+pGj4FMGAIxwc2Ge4cVmKrnWKmYMCpZ+J7qjowet48or9dGeL\r\nfEh0IOqdJUxgJmlaBAYsLrSvLuWMhwUW1z2eXWgyFJEWpetTJCTJqKDZMx4P\r\n8ebhfDv1f4YYLMel9I6RI5fItwnQnP47HaV5RJ35uTqMvI+GFlraoYfNhKcO\r\nqGIrqMA0cYCO8E4avAjlPtIMLVH8EEdvkUE/bZT+4VEzqOaUygsr6OGvXKL3\r\nztAT5+pjeQDIV0WtSBjnVZEGSLCFdR+pJ8W6/dX9Yc8PqqiO4SXw/NYQHzDJ\r\nI7LQOsf2YTbNYsgeUhkjMt3URi++rfBhgVM=\r\n=Jt8R\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"37e16e4d639ed40fc26b589a6116391116cc227a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.112","@apollosproject/apollo-server-env-mock":"^2.46.112"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.112_1648690564394_0.24406632339409295","host":"s3://npm-registry-packages"}},"2.46.113":{"name":"@apollosproject/data-connector-rock","version":"2.46.113","_id":"@apollosproject/data-connector-rock@2.46.113","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"4e9c13467477c71dc54317dd4251324786c47fe7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.113.tgz","fileCount":158,"integrity":"sha512-CmMvQ1ZKaHqTvFnneP7uxp/xc1xTnhCd78nKNHOq5mWBrRC7DdNvXo843aDIgKhGg92DolUm9im5JCUfgI0Yig==","signatures":[{"sig":"MEQCIHaG2eKCTF0FB6rNkkQexbHlpNc/8YeTrliHTrdjvfpaAiAilbOAlZRG/Rs8gI4mgKh/ar0q8B5eiaSBJtfp5yoc0Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1114018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQZNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+HRAAkBakdUfJlkpex1YoF7CDhJz3Vm9PCGhm52jFVDjgXrTG6a7O\r\n77A/225Pcohz/3OCfThJ3fHbmheP6N7Svw+p7TsySaDUWwaYTzefb4s25REd\r\nEKOk760A1an5B1NND88vbwDQ4I5kNlIb0py3GOBNB3Dq9wRtZy/Gepsex3nT\r\nvVY4RjwkiHObkQzKlnVqe8hVYMC1+qyfdS1zRKbgDZeaK1z90nBUhb9T4Mzn\r\nRsUK1hTkHi58fhIKWhC9ufm8znNP4vrfQPExc8Oc3U+2KB80q3CzUDQdPptR\r\nRRWJE4jPG5vqIytvn8oZo4ZEAq4jewOuST2z1MWvb16oobAG1i56KYMZ9n1l\r\nESO/sHBdBUU4T3kMEQOAnmA0egCjDIWSx5kZxh2nh25KO8j3kS4nve43x5I2\r\n5r9tnJoUH2tVpWS3/ikfAvb+Mt+qmIrCfqAC2svBVzltmI8LpZq37+ZQCTvk\r\nIiv/UJeZS3uX/VSXHmp/wXJUTwQ96dcq1Hx85nBPzC71nNVURUttrNJr4luc\r\nUaVyif0aomArWnmq28zXCowRwzuYcZH7SgJf6mDpvUix/8pvMyRoH1QaWpOx\r\nhkligBnMCtljjnXaNM+r93FfttW0SxWoHc4PAw2qLMr5X3nCJ9Ok+Hz1lobc\r\nPzx6n7w+rDyyPQSEnvTxlPclYrph1NeGQsI=\r\n=maRN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"835aa1905fb50ed13adeb263be574728c1ae004f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.113","@apollosproject/apollo-server-env-mock":"^2.46.113"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.113_1648690765120_0.08202221509926222","host":"s3://npm-registry-packages"}},"2.46.114":{"name":"@apollosproject/data-connector-rock","version":"2.46.114","_id":"@apollosproject/data-connector-rock@2.46.114","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3005ce202b4959a8b43b3c9ecbd8e0b344d660eb","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.114.tgz","fileCount":158,"integrity":"sha512-l7eqhOfLQtjQZTIYztbD7jR7uhKD3UZFt6QX3TKpBnLylazEn3Br+Vm6/XMte2/89gQzRwtxsEAgbrZw62bbMQ==","signatures":[{"sig":"MEUCIQChGsXCzbTepy4t4is68DnX46CAxCrtg2pknLB0nAy6bwIgDc82ZsV6ZGnOMJXpd7uYFda0KT7lHcnzV59QI351WIw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1114206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQbpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnYg//ZKkSBSfe1r4QMAtEPeisgLxARJNTAHipU0VdITrWuTo3bzap\r\ng1KPaCKLopu1Ly18HYY3SeiI+eFNicyTqja3tWojKCVFBe9e1LCYWo9GrNNV\r\nrOXEFgcGbVrWeTBXMBt/mbuPeIq49QUoUmyB04sC5zdXAiqr3NLcHNfOvChb\r\ng50TocC0N28TKKZEDeiFhT1orqQKlgsOyvjeS1kozIiQVvdvkYe+2comGWkZ\r\nfYwgNdBUnAg1dYEDCingCgClZPLaNR+VJsuCdbeqz1UlUiiDbjPtE2xK/oUr\r\nmrOeRKIAIFsbaoUXkyh04Hkr0IDt1YVhuZot0FZ5i2Tg+MNoRBsZOEr6SaU6\r\nYbWVXhTRJjGSYB5wjS/9j31/F//rsV6MR8z7q8QPMs9Kq0v1uA+o6kiRwraH\r\n0vHNyQk9EtYU1yg/5KqsG3T1hJnka3OurO+C3lmoQwSnBduP4p6Ypj7TWKbd\r\nH1ySMdr95atm9yuiuYfYUM3Sk+8gY/Nu3Srk6e3j0fdHDHHY6r5UTysQy50w\r\n0nwD3zUUxx/T6lshYR7yHdHpoOO83P8gneZmiZ4KmjIoxPm0WTU1WqJhaqgZ\r\n7LOZJJuxf8buvHwj6K3bMOIklYiotCjVap/e1nGRFKJAaB3yMLP7Wr0zAU4+\r\nQBTQc1N3sIKGzxqN7zBZ9+kqXbh2SSxa6ds=\r\n=tI0U\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"6779956ccc56a7aee839bc11468ed4532fa05628","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.114","@apollosproject/apollo-server-env-mock":"^2.46.114"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.114_1648690921516_0.012559789785558051","host":"s3://npm-registry-packages"}},"2.46.115":{"name":"@apollosproject/data-connector-rock","version":"2.46.115","_id":"@apollosproject/data-connector-rock@2.46.115","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"253109676d864752f63e29e51027e8403979982f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.115.tgz","fileCount":158,"integrity":"sha512-j8SR+J1hMoZYRR4eBw8hx2E0lVA6jljMnC9lw40TY+KlEu4Cy2LvFPfkSbTYaXpGcTPnuCOZFdhyOX4D/RpK1Q==","signatures":[{"sig":"MEQCIEAWoqtPSXJrDktim+osc7KB3OWmFjrODnUu3/WasvDfAiBgEz5xjc+hjit+oK2c3vMgBikrFYAW/MMN/hBHsjlPXQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1114394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQfMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpwDg/+J42A2eNewszZMGAqB+qRhrO57suZncTXmUEaJSMVbodb1om2\r\n4iXA0Lh65RE/VhsDZ2IkCDgb8A9oIpP2y0w5HuySEr+eWVI70ckVhQ2BTIzA\r\nMe9g7bl/P9QlTtzTEnhIZe59yP1EyZ8OFABBEUQMG3mLOPTyGhuhSyp3QH0p\r\nqfgrVLcvzRNHUzdHKPQ9wB2Z/v1KxYulPZIe8UaPq1Po6+T+/G3VYqAqvI87\r\nZ//n5oKdoWXYfSU0DZxM+pVXuGASjWZdE1rJ5Yek/c/1BjSD8Bs9RCt3S1pt\r\nuiQXATejzAhx1i+/kfC2Dtb7Pll7U880lGshTBVD0VqZDcHKIKZsvGtdb3MH\r\nQJ9Asvwu20H9co7GNxusPs4CR8V8iSK3hQTrQ6GPEB28s5cprpemQRezd/AX\r\nM8afjlAM5t8EkZqseROK87YtH4FNqXsJhUeD8w44PlWob8W+Fxecxijjk0e4\r\nbS2tSCKRMgSjlBNM+13vfaAjC+vTdv+kzy60nEzawvkEPj3fejUXUK6Q5EfU\r\nSevwxjm52VZf4OwYTKChZRXvGYUVwRAfD2WWCZJmGnIJ6EWp4EcZYLlq33q6\r\nrzqVutBaGXCOghbIkd48aHL99mi64df+b5EAEiScmrb0hRv2hKP+2fFSzhH6\r\nHHFpKymzuT+D9/zdgqfOUv76i1x4wnaad5c=\r\n=Rx3t\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8f57a64938aef605d5369fb64e698e4c1b09a97c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.115","@apollosproject/apollo-server-env-mock":"^2.46.115"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.115_1648691148368_0.9411231977694374","host":"s3://npm-registry-packages"}},"2.46.116":{"name":"@apollosproject/data-connector-rock","version":"2.46.116","_id":"@apollosproject/data-connector-rock@2.46.116","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0f7b5b7d8760eb0af21af7e22505f8e6863f51e5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.116.tgz","fileCount":158,"integrity":"sha512-841O89SCKnFR+Tz4dMHzWiC2sn0y/DC3ARmoiEhuL02yjI64XwE/51nBi3ofGjoGjVFY2cQ15Ne/Ml4qQHuXSQ==","signatures":[{"sig":"MEUCIHuxMC0zqhl8ZFWRT/ht+DdsgyyQFpqw7aulrNDduyqZAiEA/VCcBbPEnS2/b6mH+uSOGwn7c+0aThDZSE4oWcDOusU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1114582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQicACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1jBAAiJWaOMa2DHLxY+ERhe5ju4xupspscwQOLeAdQyDOGVWmE2Pv\r\ntspMrAqZoV6dnlji3lH++qMAxpw3y1jwv2kpLx7AQQWbX3yYqbQPgAuxrWvD\r\nkX4RBbVrlp/vz/xoKMaX3En8oKCs2NQ+0VyBL+TMQDhh3wRKi4vRCBZqgcyB\r\nEr2sP8gDtqEj4jKDWUhZg8RpDFC8DuvFDzZoj1E3jt3t7KPjw2KUyxfw+tM8\r\nCxgFZAXj8k0aXtgV51svdSK2/ftHIQ0TJg7U0DuTIEDpL6FLO9WpTqoeuKXy\r\nwqvuA9amPgM3UGkswKV4kGftM6zGk0XtJ+A1GCJTIHG9KhnwuXxrBok1K+Yq\r\nde1DqZ1MHNuHsmCW0b2+n5XMsws3W/bIHSTrF0QsYYxBdlX67rNXSooG5PDj\r\nrbPKKyGf3oIfvLMyuIhWvW+Fydi0vRnqvx2kbJgNRlend8y+/twlk/NdH2cd\r\nhvSQg8/pzcs51YQpc2UMFqrL4cdBAt4h1NPbWpsA/6Ncpf/2b867Fm4igyJ6\r\nsdHu7Xhh6oT6Q+vTm+jGJLaCzX2QWPSuR+NpSR4xGMBBF01ZBcn40wFDg9BK\r\nofVmrk+W7OpiksSi+RtglYDIKxKwZYw48gdcz+G4x7Bw59NVqIB2h0107VgH\r\nZNgR2L5aPMT4hZXdyqsMgMdPm/6C/K11tnE=\r\n=9iY+\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"5c350ac88b59b1b0ca8f5e04e667e227411fc929","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.116","@apollosproject/apollo-server-env-mock":"^2.46.116"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.116_1648691355768_0.8045386767475042","host":"s3://npm-registry-packages"}},"2.46.117":{"name":"@apollosproject/data-connector-rock","version":"2.46.117","_id":"@apollosproject/data-connector-rock@2.46.117","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ec0ffc9fa3b40f58a3839679795db3332f9c3bb5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.117.tgz","fileCount":158,"integrity":"sha512-M7J0PdHgCScOb2YWge9g78X1e4wqt75MJODgPN1s+2W8G6ZHHSPLIZZgrRjgQcJDYyduUgiR+N0LJaxH2U0SFQ==","signatures":[{"sig":"MEQCIFweZBB7AFyqXj+XwcE71C3ElkxoxyOJpStTt8NyjeKGAiBX1yndaBtR1m6i0Hv3fhG3z5i9PM2nq41LlLOXhEFgEg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1114770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQl/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmre7Q/8DFR8la5DE4zAZRWRvJyfNnVPS2xCPaM3e9Zlaf3xao/QhCsN\r\nsLMDo4pQJW+edtAoP/JYjEjO0HWwugmXsxkgHmEQ6BvHwr46IOlrGE0g91ZQ\r\n9vTvyFtUCWS8rBREZY+ynixWBSvTMGsTFd2wfXMkdr4I+btjSG9iEtkj4orG\r\n1Lerol5UWV18qWYcnib7TgwyMkxY2kM4QorftrtvXqxQ8Oz2M49j1vyldEPD\r\n+nBgBh6N+/bCwUbFoQRDIV00QEAF2cTw5VaUQb57JJn12jnOJglwYDRdHCKQ\r\nvJgWMKrT8wA3sHb7Vk0xJirtq0BFfJikCozBl8VILZ2x0TWHNZQ2Kji5fTQ+\r\nirnpJTUe+KFmkc+CeuDyFMEYyRHH7H206/UKaGKwJmUDJJcZ3zHleput5xM2\r\n2kfRjGRrZHFRh3xmeDwcpPpsxBVLHZL/BRL2D5Y2p3La0JRYlsXErMR6tKLG\r\nwRVmpY+C3tNp7nK+GnxJol2HCDY9eaKEpuOuF0ig+rh5bhODHXgGrr0vm5Vh\r\noARcge+1AF5zVyanPO0SPnCrvLYpeZ9bBcYPpxJBtNnX57sTX8QsbC94RFTv\r\nhgFD6JCjOZdk9aCGXACRKVxiPMmW6RJN2auWz+Z2Hhk+FtbBQzFfnTow7wo3\r\n0FYPz0Bp2XpVrBhCF86fDZdyaq0DGCqrlOw=\r\n=LLer\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f428b79ff9fd9eaa60211839d8b703ea360cad86","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.117","@apollosproject/apollo-server-env-mock":"^2.46.117"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.117_1648691583081_0.14613398208619421","host":"s3://npm-registry-packages"}},"2.46.118":{"name":"@apollosproject/data-connector-rock","version":"2.46.118","_id":"@apollosproject/data-connector-rock@2.46.118","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"164bea9064028ad98e9b936ef2e62c7b542e5058","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.118.tgz","fileCount":158,"integrity":"sha512-5xARgBLQtF1HVy6MV8L8nRFEJK38mR+rtQmdNWmx21EPDsQrTVYXZBImON2XvbrMW23gRBWlFSStJC8+b7MLqw==","signatures":[{"sig":"MEUCIAV0AyF317IO8q8fki3nCREIerFz62QLKnStD/5pKJpcAiEA6WNsKC6p9KhjnB2LcN+oyZTim7pNBgZEXOVdf2wJf/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1114958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQpQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpooA//cH7aaIVAHZOXBIgDa15AdgpLYsiHN/8ukbCobYVHGTGo9AJr\r\nrIyyywpl10wEiMmc9yMbgn6glS+JLuUCwieV4o1p8R6t3YUjrx+Crxadymso\r\ntgv5qbg681jSVQ85ycWAXLsberhiNH1GUQkPM3ZX49Hgt5deV1GlZSQn3+6e\r\njEBu45+AfwqrARnmSkvmkqLvFABPN2t9WtY2WQq764dYcRRcDiquOS5Vex3b\r\neT5kpTpJCtrIQAu58kllj+UhcX/b24zbjIoIB5b7oaReVsN+nZ3+RaxluYBR\r\ns0NstJCMJZ7S391ociyAOGdIEt2pbkfSwX/lluqD5eYIpDPQHK1/sTAHDv9b\r\nZLJPPMAX+t1O3qdHDrOFz5m99zdSE/VUBlC5ZAGz7rcT6/2pQYbxF+kngKKo\r\ndxc9kORRKHfmbKG/pmcDX78m9YuBR7L2tIi1cu1JWCPgwCOhDczGmukhyf7J\r\n/dNcdJcnNz7x33Al7Scv1Sv7frQlzdahYdTvpX6btoWuFg/+5KfZupVWmGDz\r\n0d3JrCSCcm7Cp05avzD4kuE7UfMwc6oLVNo+9RODbAh3gxrgFirriQF2pcSc\r\nJIkQYYEvWONTAQLXnjhJtShuZXpA/0JITrpJg4WyQ+C5ze89S4H/tD4jsq4+\r\nXZbI31/kcBwLPI4tSaoP4UQJcu3abe5ZX0Q=\r\n=XWDE\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"6514e11138e54c5a64c8f20b6d13b36bee6aefd9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.118","@apollosproject/apollo-server-env-mock":"^2.46.118"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.118_1648691791950_0.3904586261952274","host":"s3://npm-registry-packages"}},"2.46.119":{"name":"@apollosproject/data-connector-rock","version":"2.46.119","_id":"@apollosproject/data-connector-rock@2.46.119","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5630010dadd72b60be23618cbb844154f9b0534e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.119.tgz","fileCount":158,"integrity":"sha512-llZQNVghvJ4mGQLQqLvxvSJkPjGY/zcpnd+Jg4gSvDWZV6UT9VShK1/liaKYyhFT+q8uWQVASDIsQvViuAA8dg==","signatures":[{"sig":"MEYCIQCZPaF7tTORQLsKdWpLZeWR/a+8OL88RN34GXTT04NiKAIhALlhbsvIuFLsXLyTxoSPEbFnuJEvk7TrkoYGAWDCxnzg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1115146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQsEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3Lw/8D/3C2EWQif0EoGCyFnRP8SwjmQimgYKxmS60dqciiwPxljHC\r\nYVMoR6tgAzSZqvS1V1lJGDBIO7IaeJfYr4I+dGdr7x9D2jgpS5s9FI7OscB9\r\nbzEmNlgPtfm3BplSVNB+OBhkNcjUucxZdcuoERLv7Q3eHm1E+Ghjp1kpnK3U\r\ngj7jc7Lcs5edFqERwcyLWlnA2Z/ZiBU7HJo5ogClsELqH2Ux5zW1mxyJ3eBO\r\n4O4zos6G6CF9D3FvAIVJxoUTS2Tk5CfifasGgAAoYghX2wAjr15yTbgxqMeg\r\nvqszFKFCN5vCsGarRvynhmsA2S1dpYAFrSZVnP1dXdYwPlsRJyYPfwCxmtY/\r\npTqPGqH7Y3GLzgA601sk7ngjoj5e/kHnHeuZTOSIncF5npMyy9enZLj8NBAa\r\nicefHigb2cIJ4wFU3X6uEgL4tWVhMxvieSz36myQypP/I/v8kBnuJWOEFs+U\r\nZDbl/syZbIlK3/NCh/ogfRJPWETGcU1HinacpDVhJXyCE/3ERqUtPWQnYM42\r\nw/0NIu4BfJZtUaKpUg7MswIUv+LHWPq/k84YhDpVx2mFHhDDpUFC23qCxXTz\r\nWEYxYAjJGIT2J8maitTl/w8ruxSNK50b9vs/k/6Kyhkj8+3xJ/DVhyAnFEVV\r\nAEXzjbZnFC0wqIcy98ig4RgA1tVvKu/ySvs=\r\n=++Fk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"e8e0b762260bfab1dc67021f1d90244a68e2ef82","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.119","@apollosproject/apollo-server-env-mock":"^2.46.119"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.119_1648691972670_0.9392302316705701","host":"s3://npm-registry-packages"}},"2.46.120":{"name":"@apollosproject/data-connector-rock","version":"2.46.120","_id":"@apollosproject/data-connector-rock@2.46.120","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a30232347b208acb20720bc76094f8f94c743dde","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.120.tgz","fileCount":158,"integrity":"sha512-Rwdkwm6x+NK7hTok4v2l07JbX3LQVfJ2H4nuaL10o6xMMZU9y21abujxGzOr0p1pNDDED2SuLNx8YpuQz4o9Ow==","signatures":[{"sig":"MEYCIQDPPFfwu/Iyx3cv+spYDd0c0Y8quqljQjI12nTGQaSRTQIhAMek+xjAuW/Cmawif9zzFQQyo5zmzOJM3QTijLUizQlg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1115334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQuiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqK2RAAkN6YoU8ZvT9C+HzAshPXt5meZDzV6xZPreow3R4I0NkZS4/b\r\nnq/oijLXwQdXWpQAg0Dip78A4fZlqWcTDQhn6zLK844QSnZE1qvlTSjM4nSz\r\n9kQzpe/m/jdiHsipDbX4cPF/zDFtyNaWx9tn6KU5lnsJ/Yrjk6kZTAaJ8PkR\r\n/39wj2I+YLhVnYmI6jJoK+mUpEtdT9oWaf32l/xsHXE5pHwEvrkELTdXBW4p\r\nwQm0jk+hJe3HNfA5gxrFrgmTaOply4LfDWd2RpPhsMTnVpwTPlWwyXytA8TC\r\nVIMRyHG6ItiZ9tlNOpT7DUhpaU7VvFXzTnDfJy9GrhuXkG/zNkDEF9Wj2M4E\r\niFD3MLrAwdxVdF0LNIvQMNbJ6ZfmKoVE7cHDAuC8sJAoIXqX/3QJEeDqst7F\r\nIF3llHY4/l2Y7wA/VcCbkBsHII9SPZlIBLEKg1Y+zsHk3Ot3TMBJFe3MQDXj\r\nvC/QMG7V2qOlKHuyaeNzrjbykbGcISpL+vD9tU4wX6WEyij+TpLbUZ9TMuya\r\n8QOXj1u8WC/2bxBxVu9q7kxIWyB1+0yyTxXZJeeHJbaGFsdBlEaOpZKQKjT+\r\nlWdM0h7VGmvR1631NFOX8gRFceV1MMyG8lAA84IqsV8PGy9R6hjkp9bjrSxe\r\nf4AxOSnYbTciB8ZUjM7kkp4DU1QNMSmQHm4=\r\n=GVUI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"24ae043c8126b300f712f71f40ead46b634aee50","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.120","@apollosproject/apollo-server-env-mock":"^2.46.120"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.120_1648692129781_0.2603091375321658","host":"s3://npm-registry-packages"}},"2.46.121":{"name":"@apollosproject/data-connector-rock","version":"2.46.121","_id":"@apollosproject/data-connector-rock@2.46.121","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"bd351f2b1fec3d92d9a5e9b3acb177c473887b45","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.121.tgz","fileCount":158,"integrity":"sha512-Ba1Uhob4TvZHSgfnBuUpiY/AAF574bPyHx/DOpnD+w/bCQ8T5KrMkL1OtxcgzEMhr90ASNVjQqzwTqyKZ0uP/g==","signatures":[{"sig":"MEUCIBV4s2oZu8DoNZwUXOb1XUwQEb+QnfpcZkxwZzXUj2sCAiEAxRQ/r6IUiCBdcBcZorwJMkOcGKkWgV+hMi6mchsNvGM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1115522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQxMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmquAA/7BpYnlm0eW30qK3ZCK4oetJpnrYWXboWlb1TO6vfrjBZAtQ7r\r\nW61WemI1g9yC/uxCBxQODZ5Esx6he4FcJm2n/83DP/b51G1cn+piHS0oQuzU\r\nAYXbgHGDbeRHPPH4PVnMz0DIhECRUoOU/KAhJiQlQem6F/hR4jjRdhp8xhEz\r\nKmTxhdoK4Ho/tj+UbV0aiT3Wd5hLLiFjGl33TYZHBqrEaCHvncNt4DkOIa8Y\r\n9zpi1rIG2uK3wFkkVfuVvqRjan4d8ROqw6m1T9DOc5hIhPmIS/KFR1NxJo6Z\r\n396VMgVmHRy0qVxlksTouJuLS2j3FOkH1snvzKSyITPHVUnr+ba674g3aMHe\r\ncuWBO3iJkPt7Jy3GMxtiHkRuYjMwmt38zJmJsF63TDT+LrbM97FutNSw+kvE\r\nShfUFHKlHPpamtbK8I6WC6iWImsn6n01leDKOe3NkaCouXwG4TMigbovbCye\r\nzw5yb8yhSdwPO7aL1ywb5vOM+TkFeCRE/GRYnB+o39cP3KTUZhm2v45u/KyR\r\nCyh1jzLvi8Vc5W1rdxagWqQfxngMHDZV05YwXpX2UmXz9vhLm8yY8Mg5nTLl\r\nllr/vrEi9Shayf4JFizfxtW2x9+HVY4oJI+miUiuMXexXk1de9NTeoEMTwch\r\n4SHbOEqIRAo9Fr8NI/V3gVbGI2RnruAfJhc=\r\n=sIOZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"157d311be52279e45f1683cbd96c68bdfb724de2","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.121","@apollosproject/apollo-server-env-mock":"^2.46.121"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.121_1648692300146_0.24380891584649844","host":"s3://npm-registry-packages"}},"2.46.122":{"name":"@apollosproject/data-connector-rock","version":"2.46.122","_id":"@apollosproject/data-connector-rock@2.46.122","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"297dcceee52f52e18ba91544b2e867a9633ca10b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.122.tgz","fileCount":158,"integrity":"sha512-ZlM/KXrHPkJFj+YZqVKEnz7bDUqQnCt14PXwk35Vzd4ZdP1PwO/EfneDgJWr4JuOogh121p6yZtWEzmG/GBULA==","signatures":[{"sig":"MEQCIDVghkyJeor1qMioismKDmJlOo8q+LR4MsGP8OFHK85rAiAFEXMW/7iyGXmX0aHgbsMag48SZ5VfFIE4gk4dTvBbPQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1115710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQzxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFOg//ciLvfKntYB42LGFDXFgIYMmMY8X/0w01FR0BOOJ550GAph8T\r\n1hdgasnv1jePe/X005xpan6C3mVh81bP1GL4krxk3Sl1Um26hfCmtZ1XHoc5\r\nDWafBxdpIlblGZmNIyCxC186SDMWJ4ARILIUCF57OwGE6pcSUrf1P/fGu/6o\r\n2ZmTUWsMCc7X/+YlWVuojirJV7ofLD5ejSbrimihRcfQdOs2R188tqQR0YgP\r\nlAkgJjWWjpfMjSkoeUqZfC6vZtrZB+DEUQzdJBPAt3Rt1Jskt63I0DUPc+aQ\r\ndkVMJrN0NDSYmd4ENmrFSTpu78gLMaD789ys3t8BQVtG6mriJjD+kco5oqjf\r\nYg/eee1o7/nLB7zJXBrFY1CBP5ZXiyND3fiKlg//FCzl1DwzGKm3VeF3IBWa\r\nkBOwPwlDa7SRxwoDxlGZTemJXgpq195q29+T6yyQC70ULiCf41G40Q4S4g57\r\ngojwaOEVrUiZo5c2yoO/wAbSHZQydAypocH/57lTLfjIApmgKYnVl0/MPXNd\r\n+rwN99+RdhEk+bSaAr1ZTWHR64Jp2AR05xrb0UaJqH/lpErBJY9c/KcXg6B5\r\nH2HhoYQV6edYME1nIsGUKow0LpUAyO10tcfwA1vFU3ENa+Jgn0t/63NnZtjF\r\no37h4vyMHsCsbzeMj6HLI+oIlNfXvp1Wi2I=\r\n=6rAI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"b2f789c85072330715ac09d2bd9b64aa22776569","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.122","@apollosproject/apollo-server-env-mock":"^2.46.122"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.122_1648692465227_0.5341196445981022","host":"s3://npm-registry-packages"}},"2.46.123":{"name":"@apollosproject/data-connector-rock","version":"2.46.123","_id":"@apollosproject/data-connector-rock@2.46.123","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"71c426954c243b8c6ab97cdd88f4f8a462fef2d4","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.123.tgz","fileCount":158,"integrity":"sha512-2YqezqItE6GtavRs6R+KpWqKIuf8FLPrimMmV6UQP8l04x51m+gegT0KwPQmaUG+lEBCah2B7Dz8yxZzvUaUrg==","signatures":[{"sig":"MEYCIQC04Oqh54U0YL+Mixbe8pKjjGab7Wzi9+I6lU0o7YgEYQIhANtDopxkfNHGP/Gj03u5338qx8Bh5grerRXEBb9MF479","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1115898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQ2TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLAw//cPSpvPCmpfkBc5DX8E02uAzeuWNQFvwS9ab7YCc7yl9gJjV0\r\nO5K0suaUUQswsqaA5zWvsrB1dqnQv1fXaCYbgijUOFxuI9LNZQjDfW2gew0K\r\nqELKV5nNqWng6cqgQghwXm6uFgMYABGm3/N9Bo5gz0XM+VBWrXkpU5DRJB2f\r\nCV/kBbUw1PCXoa2Fb88N3yLGUvK6HQjvE5yQUGJ4Y2/RKo/3LRYIpeZNLZ+r\r\n2lH/MB9GwDUdU/4R3aiE/drEw3DSIBzqVvC4uwcXJ0YKS5VL/9NbI+hHoSjO\r\nYPObn7aRcoX2cOeAI9JNs1m0M5JpdrzVhBb4iNR5hDfafKdzGoBNDc+jjHOZ\r\n2vpz/iiyBVQtxOtc5VI/p28wiTJb0A9jMuGrpptcXXYjof2JuPGub3I4lR/c\r\nNjAl/xrw/tPUeeioiPvSeEJ3BRjtXpLY9OqUDQTS+USGulgCnXu8KXNvYp4Y\r\nJ6Ijxtl7hxJGenwKXt0NtHodbce2KBwhm8RHF7TyQgGt3W6G8LTjySp+jf58\r\nLOb8WbDUahBqw3RhyWidW8AS5GMwF2msrk9DFB6/hYm1gsFud2gwyhkA1L/D\r\nNH0uoGlDPn5MHCM2pcUOi3JZVA6rKa5K+vGZq1cYFInn7nksayLcKedUoLKZ\r\n2NXl+KGS0RAr9VJa0LGsdCq21qVz11sBaM0=\r\n=3l+y\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"7104ba9463c89a42d7a7e9ff0227b19afb13a687","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.123","@apollosproject/apollo-server-env-mock":"^2.46.123"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.123_1648692626845_0.08289797577056546","host":"s3://npm-registry-packages"}},"2.46.124":{"name":"@apollosproject/data-connector-rock","version":"2.46.124","_id":"@apollosproject/data-connector-rock@2.46.124","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1edfd55ab8723d00e6ac7571bac64ae8bfde412d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.124.tgz","fileCount":158,"integrity":"sha512-TYsjIPIYCBs9/4h15Rf7RpMnNDr5LT8urA8zkHfEkuMQv18jYAg+hpXsOtfZPGqzn/rqN18v1CoLIv0Vwua9rQ==","signatures":[{"sig":"MEYCIQCTt7P7E87OrL7VsmpS6D5bLPas16GeM+cVEfS8EGG+DgIhAIMZscDrEjFTtuE+v4c1OrY3+0uAwAiNn4fYbTUzQg7l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1116086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQ43ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroMA/9FlZ7ykjMBNZ96VQU6F1rsVNCf9WWLezPZqHzerT9dzrPgABF\r\nTIopTRlmd+R2dCk2uxRCIzCgeJXcBiIocUrT52J+771k9yaLZIy8+owyQnhH\r\nWqmKy+lBdT2hHZIHqBV/DuvkHcQvVy5jyi9wSs2+le18Vhsxs1CNS+rphzvy\r\n1R3fydDa/Zuz13q63NtBiGuWG10JS1QYwGEEK3FA0XiySUOhvWh0jVJycIp5\r\nwury9Ko7jCkjnfcpERp/9pvDnvMF+RlPJxGIq82ZMxFQ55LZHEXAsBCXWg6h\r\nMuslPg1EXOtEM7ddj33RUDIfAJyq6OdVQm0pNfgdD+GX59pkBoSTtrukdXGT\r\nLS8IFYU+s/zpwdjDDrv/K/2h2K1FhbF8nW4imIx1TiisyxS3ICKxXin1p3yn\r\nWNADKbor6co1uJIELFmQDg/jescxUwsSk4jKUy+5lH/2gvTrGgsjiJI+dBOO\r\nrlO583KL1vDWkSkS80bJhUxt05ygZ2XQ5/Ixq/B7k4sYfO3iWgV6UDPhM9cH\r\nkIeSs/BpkX51At2qnU0MqmXyxArid0BNmi7BOytGGNrMPZDY+FjqmIU3IsbX\r\ndm212r+umwbMPZUwzyJg5UJBVq7CzgJVdjHHCcN2isI6lr1KkHS5XBp/gBrZ\r\n3tDRISWIgtydxFDQA472o24KRq+1FzfvoBs=\r\n=/Dud\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"4ff4eb4ef52501cdfae66dea4defd5c7d8951da7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.124","@apollosproject/apollo-server-env-mock":"^2.46.124"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.124_1648692791634_0.11411610308143083","host":"s3://npm-registry-packages"}},"2.46.125":{"name":"@apollosproject/data-connector-rock","version":"2.46.125","_id":"@apollosproject/data-connector-rock@2.46.125","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"53acd7a32f80c1f018804c164b6856b6f4a15151","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.125.tgz","fileCount":158,"integrity":"sha512-VYXFkqio+wB8T2kpraZPem54nIaTpd0VX69//1y+0bcfdJ5uC53m6ZCPoxVx+RkzuhotyBtGurDj6Jj7auogjg==","signatures":[{"sig":"MEQCIEwVqn9Fj+gQVMVEkxNRI9p5NjUA6zV7U5LAUWQsMW3GAiATYr7TzVueoootAhZ5d+D+eZeGZQD2pw9k4pbrMmnv5w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1116274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQ8iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2OQ/+KiV5X1e15o0ud4Vkb+s9S9kPRqWo4X4GFtcktfqwJwI93ouu\r\nAec/NRyeI/N6lONUbHeI9n8sKtLf06qaCGoXrPYa9m/S+We+Ds8LQjbIY1wH\r\n6JaUqN5V0QXh54UmprjIWmFwV1u/bbSj0wlIGlvIa2lny5LwkKRaUNU7RQ/x\r\nYhJDDNM9Sz5sbgfL4BI+QFb5Mh6ovAOfljdr+57ltYXuRFz9N41wgu6tcLH2\r\nwDzbST2F2VGxy26UsVT9SZ9bFOB3KuKKVLPJncKtL+ei7pw3SWN8eNZ6xRiP\r\nKXD1L9G8eNLn5IgZLXTYpr80OHJa+YVgYU5VsUS3ul3jvBd2GS2WoUasIdSK\r\nJl5MoMz7iDao8DYRm5NAJGP5/daJ4YPK3YboIGE+hSb9LTEbGDPpgXcM2TfJ\r\n9fMw9ORwbaObnT5iiqVQnveY4BYFISkI2e2Q7KNVZIf+WdJrQqZMefNx5V24\r\nQEdV8Cl5HnQLHgEI5CXS4KC1xV8LWr/0xL7+b47uAO1FSLgOKvSa+UyFvp4V\r\nF1QBj+FPR7gxEeUp+TG/c8GqobDgV44Ay7ETMwnfUBoqYl9+HNyaa6G42Hf0\r\nVleILClvCudriU5FxuYsW1slgrJCdDQhcJyky9Wv3xeDnK61roMsM9CC0AfH\r\noFVju5PlP7BJPRuM8iHmxJ8tJxKYNEDDswk=\r\n=WaVq\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"170df02db7a79aa10492d2d1b180b12be51176aa","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.125","@apollosproject/apollo-server-env-mock":"^2.46.125"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.125_1648693026280_0.3051563062939946","host":"s3://npm-registry-packages"}},"2.46.126":{"name":"@apollosproject/data-connector-rock","version":"2.46.126","_id":"@apollosproject/data-connector-rock@2.46.126","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3e81ed6cfdf935ccdb64aeb6971cc3da1bf59587","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.126.tgz","fileCount":158,"integrity":"sha512-SSgyerrt/+qfXckPTwlZPqV5oTiWGDx8ZZrFvsN+m9LyE6jU6qQafmEv4B6/7SzI4gE6yYP4AxJjBzF5CM0EFw==","signatures":[{"sig":"MEUCIQDUpEBVV9Cnp+L8Wg/8zjMjWdT1oCGKsrjKl87pv3lfVgIgfT3F5nIOufLZfJEgcZZ3Bu8ESH0WDJm4bWLyd79bBpw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1116462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRQ/gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpD0Q//SG6K0EkIvLl3mAAekftvEySEBWs79puQmJ5+YsheZwNMQ7hF\r\nLM4lck4icK67OvnOJafjqP5RNG3W4JdQm2ot1r1U15xN91FhEVOuomDrDbqg\r\nK9bTqNzSXSu1Tl5e0cYkHbmSK5VEovuHqZac+kmX7BfoHcsITOySOI62veub\r\nEoSxHYGAGI7z5oC3SfMZSPMYAyi1B1MXVfTapwVJMhVJR+OQQXBPyQu/sEGR\r\nJvGRmy0v5Z8O+koZW+kDGYu2XhUeRKqFd/vTobRfZMzqmIwa1tS6l9jd1k0b\r\nNB9XAYHJt6gRFH7+c6q+8dnlXNI+NMvV7K7O2XdJGZnswUJtRYZMBDSBswQQ\r\nSBOT+Q7QR+GTjm77eNuLYyYylvS9JWZGh6XPr0/yjFAXobg1Giwrr/bUm9Dc\r\nHhr0wl6yf1bUPrttb2s3pLFpDaf/kMsrygNbTGQh5epLNDDVfoXteCbTFghb\r\nRLBWS/HdUT0OvT8ko131/sersOvRasSKHffJsv6u70/K1G/XYMzw4TQNrkM2\r\nx4b0kWwHZufWyyllVrfGJlxMdC09nnfw/3hkFV9loWakNgpf7rnrFVsEn9/2\r\ni2R4A2kWTJKdvloNJ9C/q2ZHZEeEWxb2TT3yuUHaNYv36qzfAQWN2dimhSM3\r\nSDXOSv8wrUZGX0p0lCb+ZxMZY0pQHdIgfGU=\r\n=cosw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"cbdb155d987bf7e478f16854244138baa215e0da","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.126","@apollosproject/apollo-server-env-mock":"^2.46.126"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.126_1648693216727_0.024953964105821624","host":"s3://npm-registry-packages"}},"2.46.127":{"name":"@apollosproject/data-connector-rock","version":"2.46.127","_id":"@apollosproject/data-connector-rock@2.46.127","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"80fbb1994c9d61151d13391e78be0439dc10ef81","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.127.tgz","fileCount":158,"integrity":"sha512-MCCnYhoHn9By6hVL88/6+JyivPNqm41xCAWMTSQqAAyflX3CU6r802pqQkOr5wXkvaW89/ZIIPfH7FUYTptWsQ==","signatures":[{"sig":"MEUCIGlvEcy4IpZ82U0+zmxqLyZOh+J49U4ug3TarYg3TTZ/AiEAmf/QhU5yIf6p2cR7IAT9npV/xHzpfnsqdLssuhZJ3qw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1116650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRCqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmorFQ/+N36IJAovheqhQDWzBJh9bAVqV5qiAaAl23QVj9EBrFUZbGMT\r\n7puUlysA3cPBTijW9rdISUck8JEj9ZOi/f0z8ZPML0PoMW1C+KAKcYF68Dzq\r\nZ6ivgGTXSNGIyi1iCJgFWRPxXQnzQRKovDJy/x0iIcDrYH0ndR++oXAUdX8Y\r\nLVn84uzSk/WCN2Ai7GfopWmNFNbITqp0V6dmad5UJVywW0uuXkDQPRDMtgM2\r\nC9HTMEhw4us31Z6Rdwvu9n+Mi6G5DX5UnwSFh7mTyufxsex0VYW7MNxuIpUD\r\nJ2UPjA14HW+yYCpSQU3LDayXseIDHkpI3sCshILPPwliv3FJN+GG9+1NGQFM\r\nGHlsxu6TvxqUNFrVTeHtxfEAJCB99sVhpVAbj6PhND9ZhZ8PwksK9UvqFJ8z\r\nXXcaF3NUfTTnpSAosGxtXEw9KPuZSxQAogZee0ohPo88U4fzcdFOinRb5eys\r\n6SEykXOX237gk8i55tbcgFlq8AfLn9hDQn57a9/IcZLVCsuACUT2BnT9uJLG\r\n1kdz95FbIWq5/1dvTWmzEyjvFfWpkZE3BTzuL9O8q7xtn9ODWJZ6JFVBGbaw\r\nrRVXi/2QXe7BKbQBLlXyIoi6Acf22oiJrpiHcKOW4seaJqlsMDp6535UheDP\r\na7VtZjMjr/q5RAP10H5j9IjyPqBnA2Ew+e0=\r\n=oZSD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"9af74da94ba1f98b472962187b26a2390ddbd954","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.127","@apollosproject/apollo-server-env-mock":"^2.46.127"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.127_1648693418288_0.317392747867264","host":"s3://npm-registry-packages"}},"2.46.128":{"name":"@apollosproject/data-connector-rock","version":"2.46.128","_id":"@apollosproject/data-connector-rock@2.46.128","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a6684a51df4cd2f09f6ba421e7742fb65390caa5","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.128.tgz","fileCount":158,"integrity":"sha512-m2fTUtjo90stCVMeooBnVUq1w6cIrzRIElmmHsuaUlI8lxHN9apbFIfrsSX+553ZVe2vmaWbdN21h15E3q4tXw==","signatures":[{"sig":"MEYCIQCQQsVEoLSBBh1XoNjM3TvCiXgZz1HPgTQSLgwInQKO8QIhANcRYqB8Mgbj89DV7XPI6kpLDqsM5oMzSuWhBbHNtlrV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1116838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRFqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpguQ//b3M+MX99y95MlaCHRbE44Wb+/Hc8n9TnAnfzMf2GswfQ0voB\r\nmEgqMjcZgg2WN5/nWQ40OVpevlwf3anVIavgq22xq3P9SRglO0cS3lQRC+6Y\r\nPX0xd0iJTF3nHIZcQfu5QHqABf2T2dKyWhnaTW5BEIov5S1jWqMiOpKdTEU4\r\nlPtFup/iUiiPfWcqfvW+H+TnLMLG1QljW6yCH+QGLDMIf7xM6ez4LkoaIaY+\r\nfpcxOUWGKfzA2G1PKaKJ86riUtQBDIYqLNxf2e8s0a5iXcPwFpyGai4XbB1Q\r\nIpnwV1Sa8oLX2TBqUt1q92q3Jp7kWxD+n52O6hXHih94e4b/IuwmiYDJ7E0h\r\nRZ0mR3VEfmqttpXPmjBs++scBR5wabkve+ZybCwQmJF2Lw1y3FgTPBqn5D8S\r\np3KLX6EYiWzX7mMtyEab2iJEAd/5UdKhb2dPRnX1DkXrEVs4Z5APySlaWIn6\r\nVq9FcRmlRUMs8lNZoBW0ygQpc3JIisoL0uBsfXAlt8uCLF+AP6dXyFbZ3Xup\r\nloQdBtX/TPkHoGyheAJEDVT0+GLItXZcuUhh5LGxQVDvpotAr+EqM9Ka539X\r\nzRg8Lfc4OL3TkIUf3JUdkYRiPVT5yiX0TbEjIHPMHtVdUHby9u7kuGX1FkIX\r\njgweyIFS6a1iEQQ0gDgdz33cVAZYitaYixs=\r\n=xyHZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"2434bc07d091f8756829c94eb98251b6b21b5dc8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.128","@apollosproject/apollo-server-env-mock":"^2.46.128"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.128_1648693610624_0.7035957109416038","host":"s3://npm-registry-packages"}},"2.46.129":{"name":"@apollosproject/data-connector-rock","version":"2.46.129","_id":"@apollosproject/data-connector-rock@2.46.129","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"19cdb65ca42910439c38f7a30e859c204e6ff7f2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.129.tgz","fileCount":158,"integrity":"sha512-iP0y/uptXJTpeGvHMaWENj9xU6DRLX8DnHuLotRU5NTdy0UL9AZ3SVfd1pmfEPJKjx3DBfB0x3N5zEaLn43vGw==","signatures":[{"sig":"MEYCIQCLrvdRCdh0Q4gLaQQDgrFHhKIfh3Kc9JATEz+2fBoQzQIhAJP1rdL2uuIaYmu2O4ZZc5lyXyQlj+1HHnBXmzi1H9/7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1117026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRJRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZ1RAAkjVjlOrUJEpPKZNf/OVbsIi5Q5nPhAvMHIEbIHmMg2MN3LwM\r\nRHKzVSq9aaRtZwOnwk2dlFHSfEOcjlKLKMduIk37SCgpPJ8N2rn/Xgsdu6Jq\r\nRNDT523GXuF1SnPh3fD8UgJNAcdYcFf4DqwlwB8vq7BK9XhWZb7osQoPHAsF\r\ndXTsJKyE+9Ps6UrolIsR1vF2LHTJSSNGIYESWzTlGOEzcjTyoTSsvaigWaDu\r\nd39EfjTlY/eF58Puw8cz4/z726+Jwj2maLlaa8EHYs7O6V8o76Qgsd0FpBHJ\r\nQqH9DrmpEEhPZnsxnnTjGnBwtiKlwDzxxToC82Aq/m3qBW7L7mqytzb9Fugi\r\nF2k3bTXqz+X9sP/FPeISdAPUN/A3SAGPeujoLk8qZKe/NsIpgi7y3rwnSzfm\r\n3X1UesMxlJ6zB3MS20mbxxtUMf5XfrZLCnineLDUhD8ZhAmyL3cim46bCEp4\r\nacsSNewc/bVUozDRKh4uW+c4EQ1bUO4BkbUmFpLGcveQQvZsG6Ev0d3dQssP\r\nW5l4Ftx0nOH3LTqMoggRxOv9eKKggaw4NF01peIk8NUDCdF6gIHTe8VNfRQ3\r\n3iQPzKqyQ95pCLCgIeXGoqIinPf6K+gSMmEvPKdYzxeJOB0OrTP8wkBHBew7\r\ni6tVlloLjwhycl21wT14L3EhF6kyDuCXIpU=\r\n=pau0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"391bff8f6273074ed6a4c87222dfe83fd200e4cb","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.129","@apollosproject/apollo-server-env-mock":"^2.46.129"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.129_1648693841232_0.05767697035064856","host":"s3://npm-registry-packages"}},"2.46.130":{"name":"@apollosproject/data-connector-rock","version":"2.46.130","_id":"@apollosproject/data-connector-rock@2.46.130","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"effa89905c46e3e9310d6fc44dc95c6e841d8840","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.130.tgz","fileCount":158,"integrity":"sha512-yIwqkFuFyG89OGqjVWm8f964kXDHXS3vDSa90ta8Kr3lURbUHbPuEMkqc6rCiOV/mOE10oPe9teYzQObkthtBQ==","signatures":[{"sig":"MEUCIQCONtXZQUHZ5vEUHuC8HhbyMB/bzIz8tRXgTeyE+9zQpgIgbrSVglK2N85sX+LjRzfPCP4HMEnJB/EDlB/HS0D7Bu4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1117214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRMRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8aA/+Nw2bkSzS96Yj7DXoNpjDN7RYFT1jmsXegY8m4vdIyFBAdHH+\r\nATfdhSCA8hlNfOs8q8lDJwX4ggijVGB6tamSHVojtPUMzPw7mlDia8chknsj\r\nTlEWB2o7kXxOAdQ72LySPm5NRsBVHFYZ74kO2CEDcX0KCaxRdlRVg8wF4fY5\r\nW1wRl/wIhNhYTmv+M46wGVsgQD9Zs/jhvQduO19M2K0RcZ0GstQkUEKzj1sF\r\nAvZJWb0BVUEZY462Cm9kkijdKD++PEho98Qx0u1e/J8fFxl6hc20auzQcN9r\r\n1VMNJ0MXQIG+UDrzZKVADYxcgIyUg1N6oCjYz6iShxZYe4rAr7bfwiVi7GRG\r\nkcRYzk6UFhlNaWUDVoc0RMudVzUkaCcVHI3wlvfl8wk8gccN96xJYhZ6yvQq\r\nozAmLyTRr7CoKk6An72J+V5SWDtsdeAY944LLEb8nh86tIl5+wtKIR9nUjo2\r\njLiCnGzgzRLpZC9Rlm7ZtKrZbCtkYHCDh1EFqyljjX9o/V8G/SkoHPcnhP/G\r\npAjjFtkByNVU6UhgAsXrGjZDQmtd5v1kvOHR8bcPRAhWnAHvdDkJvWdSU3WF\r\n69ph8TS0fr4cH3g9AsJM69iOwvc/5C6g3I17y0Mya5eM8cKRyVf09np74O3T\r\nEvsTM8+LfUqz3nqOEk/IlZQe/WvVs6v9B00=\r\n=eBK9\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"247aa37f85ea5d4fda1b24ddfc61ae1e449ff19e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.130","@apollosproject/apollo-server-env-mock":"^2.46.130"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.130_1648694033612_0.09236742489857108","host":"s3://npm-registry-packages"}},"2.46.131":{"name":"@apollosproject/data-connector-rock","version":"2.46.131","_id":"@apollosproject/data-connector-rock@2.46.131","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"50638ed8139c2d56aaa110a328323eccdf459ece","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.131.tgz","fileCount":158,"integrity":"sha512-JXeL8ztR66mHvFzTdO2XI7DPW4zeqZpN7Bfq+rXqBMa6AwYpoQzdQ3ubIBNYWxB+ipSxvkbeinn/jHBkvycysA==","signatures":[{"sig":"MEUCIQDFaw4rqIcK7mJ6SHMo+jmyKeUyQXmarMDp6XTmBuPLOgIgXXPGbS18tQ6kYINaZM0teN+d0tn1EdEnLPOaIopsVww=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1117402,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRROvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCWg//T47NTcPmr5R0EF4Zsca3AYhZXDCq0d9eJcHovPChxifSsq4A\r\n81AN1iO6vbKn5FX2qtTJxsbGvL/SbkjCFJBNPeyy248pneiGYEWeZFn8MuvO\r\nypYVic8juioz6O8G1Ju095e5xzFWvKDR0jlLSu0AVgiCvGW4Oae2aUa4ON9P\r\npig8tfmZTzwFl46LGBgBzLxhRZplUMJcug/Moqeyrf7MnYv09a501I/w4QOI\r\nbkOybT7e6ESWUeAAiz3INdLD0Hki0hHfsxYSEuuGzoyAWLacKq8uvENcVHW0\r\nnixckmHxe3efpFpWWHi64Vkn3Bh47xIu46nqmGEjJasktjI579p/aSWlOaQp\r\ntHQTsLgDsTL/7f9zS37+8/twjK65lnXJu99Ov3IbCHhz9jQh5kIWDf9ApLgv\r\njsneFVOjOktKvup7vAibtEuMqeywnHguPT1jU3f66qtHYDLRwrA1caYycLxh\r\nl4X4C0Pb512FiTrGj+1flb9/5+pL7nQmSm2W4Qef+M0MEKuc+mw8z6s6McVN\r\nNCFjHd+wZbv7tRxQNFy1ZioQpticBBIlUrS+1T9oq8GQo0on4GUIRt+SHQNo\r\nY26rwHKzzRa/C/Bl/l1gSe6AZNtXKDzBkM1x4Coq7HgwYuipypfN8V7fB1nf\r\nBU7n10bfmlLmAzbagaFfMr2CjVrc7YOgQOo=\r\n=IhYL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"ea95511c2da3016da0d00b21be0e1adbdcb36bc1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.131","@apollosproject/apollo-server-env-mock":"^2.46.131"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.131_1648694191547_0.916364041251416","host":"s3://npm-registry-packages"}},"2.46.132":{"name":"@apollosproject/data-connector-rock","version":"2.46.132","_id":"@apollosproject/data-connector-rock@2.46.132","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"71c7a75887d4980be8d0503d9ddfed477cff0da1","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.132.tgz","fileCount":158,"integrity":"sha512-iVo6J3TvQ/B4nYMmGU+egwfUuykGvyep2mXsgUJFSBUz32ex8P14Hp2sUNq4lcNG/5Cfc4RkgTeZ7/uthF8jNA==","signatures":[{"sig":"MEYCIQCwPNTUbSoN7Um8QVhmb6Tjjo8ofgScpMs9IktrLwFz6AIhANplxYgKzbKLV4vJI3KmnxulWN9CouPbjwZbA8DAoA97","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1117590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRR7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6vw/9FY92gawEA2r1GiVE9UZHXPq0EP1we8XkuOCwZkd7lmXj0BBI\r\nBp9V27FpT7YiHk8AkHg5jgN1/HyjQ7VzRRDpu7N5JDmhFowOrgAXyO5KknXQ\r\nsPt5OoxhsXZNf9Jpc0SDX7NxzrueKsuP6xG3gJ65reF+qBHTSWEIikwdh5yU\r\n9xTDw9dNVCQMpkmsnYE1Qk+puw//2luqAmiON2j3506b5XZyccvJ9SsYifve\r\n3BG32t1q+EzTAS1fxoeSDJ5aWv0il8du3Ag3VsnknRgcRwq8CRTQq4b1ySyw\r\nEmAR6Y9k1ymWtgNdMM1OMcf6OxYeOdhgsTM9Za7g6B72eWZCKKUsX86NyPD1\r\nJR58LlPWRPhJ2/Oq07JJq1f715yPvlqQtz9ZHCtxm/E0vI96zC7A8mC5I/+a\r\nKZGL9yw1S91fg5ooaVsa4uqk1nuHcAXP/EGagmSHHu6Ybv6ynyTf/VfJvO/C\r\namsBhdyPT9yzIPZoLqERZsncWdMXmuxkRtRCuFfa1qSDIDSl/ROa7c8+wbgD\r\nF/W6eMcBRiw8RvkUnDyu9L/TQ7WPFa0g+JiF5KQynKtYDWM9W4NhGkrYobdl\r\nIrIWjPddQ+0N/blF60N9mfHR/zx30uPpcnpXypBxm/m/Ikl3T9uUAmnCoPHC\r\nBJe/aDlYv3+ZuOIW5Us4qjTEniXOJ5M2NeE=\r\n=fbl7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"ab807ea52cf2f3fb7b9573acbd079c87d8cc8f58","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.132","@apollosproject/apollo-server-env-mock":"^2.46.132"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.132_1648694395318_0.08611870139888467","host":"s3://npm-registry-packages"}},"2.46.133":{"name":"@apollosproject/data-connector-rock","version":"2.46.133","_id":"@apollosproject/data-connector-rock@2.46.133","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9dc8fbf6061c3c63641f2bbd50d53d45d5e83bbb","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.133.tgz","fileCount":158,"integrity":"sha512-EbMiDRD0o8SA4wFeQ+hzVGUor42AyPdyFgbBWIC9KikNwwXi8iB7QBPVdrptx98B1FHq732gvmQqvtSGOZ7XhQ==","signatures":[{"sig":"MEYCIQDRe51cJK5MGDma0wIXpdvMPij3rONfvHP1fLVOGCQPJQIhAMliLsU47+UJVJeziBNkSIgv/020toa2Qb62PgfcEtDx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1117778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRUYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroAQ//aIZ90NeurlB+/GgX67jShI5ukqJBGKIH7JlxlYENZ+lFG7Tb\r\nnn383eDMc5fDkoXSFceJxvyAl6KPTxazUNWXug/Adt03lnN5pClj+ei3kt28\r\nQZTKkTNQjXVFxc230lpPz03kCgE8zppw9S3UHbz6k64U+dOyXEHgXYad+L8S\r\nJwTcE6luj2KMoMSUrHuierZsCxL7V5gOxvlR3l2po/ZB20CjtCI1jyPCK93u\r\n+MQEFSou+mIDjbbUrO4B3JuNlVGmBa7bT5LWBxUzAlfrj6XwPSeo1isVSjG3\r\n+Z0qHgwOMY8LmT01BAVt/EjtoAVw22tSWOWQFSsa+/IvSGlnDSynZFfa321B\r\n9xOKD+MBIAfsgyKNxZDgbccjAgGUdqDHDR22/raK6z/8UTamE5xSchCXGz1L\r\niyNdfEp6mQOywd8ZIzsZmLSB0pq0ua8Jpnf7HNL1sk3A55ANT8irwJ0dJ94o\r\nkM9Ja5vL4rLbwCNFKTVP/WFvpyALHGd4odd2JBceh40yQR/SAL9zZ/Nz8wv0\r\naNzh+D1Oa4x8Z9cn9jMtOYH2cqxcSkXbhWvur6qQ/WzcqlOqLchK0gS/di8c\r\nNcI/OICGtv3epI8InLWAnLwozAcrg77tSikdpfLUnmreJiw+6x28RKP8P0Rl\r\nhwyXSgBbqSm3JOH4JMhCGI/63G9tvgvvmyo=\r\n=wU+e\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"ae9b4f4ac59f32045e76e678d0ea13fd23d86f3f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.133","@apollosproject/apollo-server-env-mock":"^2.46.133"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.133_1648694551783_0.4092741775697699","host":"s3://npm-registry-packages"}},"2.46.134":{"name":"@apollosproject/data-connector-rock","version":"2.46.134","_id":"@apollosproject/data-connector-rock@2.46.134","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f47c4dc0320423a53b928824832243487dcaa932","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.134.tgz","fileCount":158,"integrity":"sha512-Gnf3gii2qwDclJuZzLbPcQO//U4ucAR2m6E556eJezICdVq2oPDAPfycA4H2fJQmQdjNaiWohW8nxcXac+u83Q==","signatures":[{"sig":"MEUCIQCSTsplGhKTmNrg5FJRMdKwKOPsTa2QIENJ8CFBSIyOtgIgJ1WVqsvhBxXW7EsnDXtWCbDBvH74paoJPL6Kw5BeVzc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1117966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRYhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQDg/8C8US9g/X5x6SfzY1lrGQcbIUY15UG5THICEXW2TEO3vndo+A\r\nUUPxgI8Rxp2q5CJu74LFZT22ggDlH9PfF3ty78Vqow4KqNU3DYEk6ncsNPE1\r\nnCoJudTjOQ8EY+epwSW+KsENS55Bh2V3cM5caUMz5l7a9lGSdpMo45eX+j8i\r\nE9XW8eZLvkSAyG41oD1b2r91ydr9esuT8Ql2j4ldkmVZefbTBRmDKZks82Nv\r\nPxIezKWs1oi9N/OxnV/eOPp0VZ8buLshLXyVVUu4eG+aMUNX2oWngVRrLdk+\r\nk8PUatetXmQPVJfnityFrGGnCjwjAHNKJhJYYUPWDaf5QHzgXDt5OG7GZPfY\r\np75Zvcv1wokEYYETzvUfDCHN69kNjrwFJJysC96+4Rv6qAjlBdmlJSYox6dm\r\n+NOPQ4Q5BGUshmqXSjLlEDREDbJYxptCWj8CcWGXc/gztM59r1kYIEC49+K/\r\nHf7CxLn1VsnPvDXG6XpKoYP8Nq8UTHK2q6KWLsDBQavTU2zftwWuAaw8A6Hr\r\nSrQWK8cHUAl2aWMreMSDVQVOERg58F8dH4zHxNQAuMU7hiSNr68a+c3q5Ra/\r\npn9s2K4hmLtb5kt76VvHkWhXezGEaT4mrwlAdnjd/B7WTQqD/2kyuIcLi7cs\r\n2g6Zq/TjD93si0a7CQe4WY+4eY2uQSeYTT4=\r\n=ymEB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"ff0731aed63697e11b5640726b00d7c53a5cc1f6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.134","@apollosproject/apollo-server-env-mock":"^2.46.134"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.134_1648694817447_0.265423611160738","host":"s3://npm-registry-packages"}},"2.46.135":{"name":"@apollosproject/data-connector-rock","version":"2.46.135","_id":"@apollosproject/data-connector-rock@2.46.135","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3915086392496691c7e6ca21ddce9670c910e42c","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.135.tgz","fileCount":158,"integrity":"sha512-HM/sAksJPIqsmMyemIJ08VgHqyFhJ9DAC/9WxQIFjci5vq6m0FMTY+zxJCjXGPi6wOXM5as6BYxx+lcpcTG1Lg==","signatures":[{"sig":"MEYCIQChSPXl0hGtsgT8A38I0JME0vKb4z5rQm/Hi1FPQlXx5QIhAO1i7YPqnSLk7uIEDt0t/wCu7AniRzvktBEm64DcoSQ/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1118154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRaoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2dQ//Qu2vPMjB/8HCMm00DtLfLQ8nTaasGU5jMruJlb1piPUMSXDl\r\nCOJYd4B42yJN6KxU16rdWzABS+i5Evh5UHKYoWWiIlP8ZeuC6S4GKLfjqV9S\r\noY7KmJeQ6oilSDqXI0ssSZIvuJKY4xyq+DCxEc6FCYVcwjq4IfOO9GemtIep\r\ngEUDAcDs+WuDJF27yN9oaMvRSjiCwra1andoBv2Z0k4Ech1iP3S2rl3mXwhu\r\n/lFxIMXmQ7hchldCb31Zgw8rKFzW76aEpMc4NvUA/vutG4TU1TdsPB3gFLrR\r\naD/Gjvu2Y8ktZXhJNpvPf5YcL2GNezilUxq/rWnW/h0PI+VIan0l3Na+c4dx\r\nRhFXdMU7kpJ7Fry1rBQwwAr2Bbs6Kkz/GWn2pRRAfM08eX6Mk2lCZ3iRcxjh\r\nzRIWurDWM/lIgG6J2LZTt2aU3EXi+MibICy5yxEpGKDwEjZlC2cPK/sceOUX\r\nFtUkPWqk6jnd1x8hg+utHbe17OA+wr5rXZHU0QgZLz0MHd9L7jAqhuOfwY+u\r\nBRPiUOlel5MgKzpd47nEG5zP/xsdrLYFt67/bgNKlRnHH62zEyWjsl8Qtuxm\r\nZ205odOHk/WOn+8yG7vs9bgo8BBC+I97yxHFYtHz2SvK5wndciGKgGRNElLk\r\nVotCL5SHLycDeAnPLWyY+Aswf9Up+mLxLzo=\r\n=aXNc\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"847f7ce9a1e9443bbf5921dcf4c59ce9056d7b0e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.135","@apollosproject/apollo-server-env-mock":"^2.46.135"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.135_1648694952152_0.8104957846293037","host":"s3://npm-registry-packages"}},"2.46.136":{"name":"@apollosproject/data-connector-rock","version":"2.46.136","_id":"@apollosproject/data-connector-rock@2.46.136","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2b1e3d1d96aac572825a9ddc943ed8251ac9bf15","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.136.tgz","fileCount":158,"integrity":"sha512-5A9z2wL6cxPlfTdUC/a1IGF85yI/Z3M9x+dN1Ei5ZNXlJF3+ofuP1Vd1eCn/URqWKpUiUC2yJ35v2Wa+jnMFfg==","signatures":[{"sig":"MEUCIDjjHFdlw2tWRjEGcrcac5yw9q2wntgjRuIHD8wm3a8AAiEAqMb2GU50WSWPTrZsRIFX/dvkc3yxkuGe4xbgjTS1nuc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1118342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRd3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpqIw//eEpIvqQx41RyGJ6PTYfuBTnlabEKJ2wg7/T/QvYYYGSUqzi5\r\nXVoe8jZT7WKKbgn+Lvn8SSw40vbHKj4nD+FIiHPMk2oCt1TyM+TNGFexzbYT\r\nIMgDyllkFzq+Mu43dmwAY320T2ohMkEc4rvWvzP25ZgZ132PQtimaFjMXeqR\r\n4hYtppIpbJwYguVmw+sJRo5nkMG/V3KC12JGZ1wEFjeCgictN0VZ2qCX9A+Y\r\nTgT74lTd7R2BPorvYr9SJNHKtyqiXQt/M1XyulYp233vsZaBIkmdUWDpBiJN\r\ndAu54PfEz6/szR3/YIgbmUQjG2UR829W9gB6E7FXA2VAPr25zwF9CN6uDJTj\r\ngrkoD8GDeS+zDaWZWTkd8MV3xnjIYbIGBTCaabc+v0ABswDfUHJU03amGXUK\r\nDqqiD0v9sT9ssNH0unK0kbilZT19hMmbC3/Aa4rQZwiGrBTQT2/WMtc/+nuZ\r\nG/Wdivzp1VooIdAkLADkEV7r3f453vGcL8h1Kgrc9CHL0djj0EpndPFlaCwB\r\nMl2Z6nG4zYDe98vZTdmWyYadlWlVSBTpch3a/lJeeBMZAIjdhkDRLHRCAnHz\r\nP7sC6jaGI38ysCCqcKTSsLvLgBBTsd1tSo9O1ZdC6wYcd3vydObV2dLlbfPh\r\nVPVDgZHHgVBZj0xOHVImWF9Sm3XrHHXk4jo=\r\n=pVGY\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"4ce0e27a1ac29199bac0abd3ba9c32cfdb29f864","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.136","@apollosproject/apollo-server-env-mock":"^2.46.136"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.136_1648695159426_0.4600434110273264","host":"s3://npm-registry-packages"}},"2.46.137":{"name":"@apollosproject/data-connector-rock","version":"2.46.137","_id":"@apollosproject/data-connector-rock@2.46.137","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"26cdeafef9dc601fa34edb6de19caa21d24d519b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.137.tgz","fileCount":158,"integrity":"sha512-LOEvhNOiLPN5fuKXhHGGQVl5ALeBCzi0zW0gT2hHWHe26vD5UaCblBC5/vl1bTQfA3dEUruyShySmoslqaMB6A==","signatures":[{"sig":"MEUCIQCzKnittcDjgQ+Vh2FsiyndSDbDyF9fX53L0bV63yfF7wIgCrBl/0IqOVld3tMPxssG3cj9IQMZIZCW9hdNiJqLhq4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1118530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRgpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdJw/+NDy+YZ7UidjDWqkHkbBCVuCgt7qnCkkrfy8zal9olRLYa96k\r\nY+Qr4a0KiZ2YOJbN4n5zYKphzJYgISuEyygykd/F6JYPgdULyYuPhYq2C3td\r\nPQIvgFUol75DmJQM7l5iDbQMGNAbzLi5FkomHiNCIXbex1yOU7iUTk2v9ebq\r\nSv7LmjU643lcMIy3xCb8WzvBU5CoYlFb+Ofj2CwnMmjL/NuSzHHjf+7H46sz\r\nF2mFrBP4gUpA/zF4NRxqgvKj1WmCVURzGU9GI8R6/Twtsnw2q6jNHPzleZ3y\r\nBcR5kZsfzyEkpTiW59IXnr9uNVEtEDo/q91z4LR94m429s3szlAaf5W2e1TJ\r\n6V0YXWb7eCIiDoJi6WGFQqEUqm0gwCTgqHgv757XW4+cu2hSfXvzQctoqriI\r\nLE7ms910JYvOXJEsX1HaixBnXwW/ItmswnS8WyC3nF0VwWXCP6qJkyqcQMo4\r\nu4K/RCuIS4v7Guhv1Kr52GI++VJaKe+521Dfi59ra3K9Altlh/ogctUvlO8n\r\ndyt8SDwj7GCsFPDAPyTUiD7KT5QRO2vtpdmU/TYr85H9NpCfCQpghXOtM4OW\r\n5CS3pszRe1PllWEOmdmeZiBBYtjohUSJrtGoOFd9fIie91UnAyJBKHVuT2O8\r\n2bUBmdBXQLxkcfA7tNHKzaV83rGre7CL888=\r\n=Ww0H\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"89efbeee9d83b8bbc2f75aff54798cb7c6167b7b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.137","@apollosproject/apollo-server-env-mock":"^2.46.137"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.137_1648695337578_0.2971046625359315","host":"s3://npm-registry-packages"}},"2.46.138":{"name":"@apollosproject/data-connector-rock","version":"2.46.138","_id":"@apollosproject/data-connector-rock@2.46.138","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e9a6f2208f97fbcc4a15986cc29db3e4bf284a0a","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.138.tgz","fileCount":158,"integrity":"sha512-CYSFvj2BlKhu70XwLXwaaB7q+4IwR3c448puH3acYP3b4/8Bbmm2LzSf3sA9wkFLYltuRoEgQxPoCZ+p17w/vA==","signatures":[{"sig":"MEYCIQDjkMCBFSri1bnjhqDc/1BtB5FWxryWJQ8cv475oBLV9AIhAJt9Mu8mILXtN+SYZkHLfAikKx0HBdAAiwlV0gMmNR5y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1118718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRjHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr7PhAAhUkYA4lAkCTfFeY2L+bayo8Jp6Wd3HAOimAL3VurGEQWJKSI\r\nM+gYYIK01S4fCraoW+0RYAl5Il/H1Qw3HN4cvBFApBBN58w9ggvW+C33xk2k\r\nv3p/eW7mRk2z7eno0+WoAgRQTDXJ4STGHyWT1llbHgNljKdhZrqt4ZQ1mgx+\r\n5n1bVn9qdixLsQLdVMrYH/HpY2QbdddYpt8l24HjTDvbxpSs08d1uI6MTn7m\r\nroPR5+B01umAgRH6y7LZ+jSNwS6kazigQkUzmGggU1UkHGVb25wPG7gHINg7\r\n1muPKwHQQSScH2ijV0Eas/uIeWpuhMG3A3W6AT5sHdtmlczgegqhuLc/44fH\r\nreq48I5vfZoK+ISCMlkNZnXaM667pXyfHwSdm5V2IB8fU5b3I+2AHnmXEZ8r\r\nVLZdc2c75hZcnrYl6OwFVzUfv9u/kIddCvoiMeckrpoCtlc1Z0e2yyKZVaLZ\r\nPqF+yn87gxJY9o7czwjm5cRY6fdTIRo7dpI5EMYpaCYGkRmoex34R/NaQEWO\r\nzP/o4TsI1e4bYzSM9QUWhEduA4DmsktV8pGKc2yFJkH4/b8zxRAcXggQjFwr\r\nuzNWBnapU+GsV5w/AxRv/gEy+ODIwVVTef7x+VyvYbHbM4MwDKHnTByxzl0C\r\nBzRSq2OKY6FBb8U0JdYpoetsEZQvhikujik=\r\n=amiW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"1f24c93d671542ba73fbc04896f17f58bd9a0a6b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.138","@apollosproject/apollo-server-env-mock":"^2.46.138"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.138_1648695495359_0.8846031003946262","host":"s3://npm-registry-packages"}},"2.46.139":{"name":"@apollosproject/data-connector-rock","version":"2.46.139","_id":"@apollosproject/data-connector-rock@2.46.139","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"65672a40cd516f276b517280fcc3ae9cea5941ee","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.139.tgz","fileCount":158,"integrity":"sha512-pO64fEeGoz0O5i++fJdL5jxNaMCmmWo/EoKP7qcPjvpAzG1nOR0IMCEp7HgLm72b4wAfM03cJo8ZU6tO5IrrVQ==","signatures":[{"sig":"MEQCIHor8a39rw7jkzEGnoRoKAtmnFRILlhx7pS5yPHP8bptAiA942+D/04tUHI6jhO15RCyENZuqBSt3uJIE95OA3wk6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1118906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRlmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7sA/+IO6YBQXPdfJi0HL2K8dbU3RTUvtew56wx3fB38uyFFwCWNuz\r\nSUUBLmjR7eEooYmg7subvQUaKAmpxUX3pn2b0fEWBAvNGD0ce1E07o9fyOwM\r\nYeJskUhDAPcbr2lfhV7SaY7ICZY8UrtpIgv+z8QTjFeY45vd6aoQTW2VcDUZ\r\nFptxy7pPCyBmwyff1rVR9qqEpcPRwJdEXtdph81VoEr3EHGuBYGfLdS6ktNP\r\nhVX4YVObt2ncHowwd/wrlk3Ls/r6H7RWsztZPYqDfuBuaVNfkFC0AjvTdmnk\r\nH9LuXdyscg58Pl6NhQHGq1nvRSqDBeKf6eit8GD66Wgb87jEamHIFQbnMoUP\r\nFBVJ2weTsgJJ/JeHpKdHrHTtHyoVRUzuiZGfPuSFo13fSHnxdtBpwhj61Vp0\r\n6em2g6Ju5xmV35tdvdGg+5ZYTPnlhWwRYi/3XuEuOTG3NlibqzgiBt6NVB3O\r\nmqpVtR2w5RkVW1XIKk6r9H4XYWbWmqkCAz+98hymMQhIINYrfU+79uo2Y/V/\r\nXQ212MSn4a2CtYjeixNl6bkBy8YzsBAqHxSJ3aVJoB0cneTduDIDgdypKoRi\r\n+unCxwOiGfdx4EnlT8F3O4S4l55f7a3AAeLLxiWMfg6+5Ii0JsWqDBwAPbEF\r\nBjQSt0Lbp3/PARAul2HHVOlb2SS7XYHWhT4=\r\n=5rm7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d4abab01e4055734accb5897a4f53f5646d1fb62","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.139","@apollosproject/apollo-server-env-mock":"^2.46.139"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.139_1648695653801_0.8151424180714293","host":"s3://npm-registry-packages"}},"2.46.140":{"name":"@apollosproject/data-connector-rock","version":"2.46.140","_id":"@apollosproject/data-connector-rock@2.46.140","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f360e043475cdcebb6a3e4a91b262af35ff3d8fd","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.140.tgz","fileCount":158,"integrity":"sha512-Wcs4apkWpcL26ON9e605Yxb14TsJm8UnXJGWVzLZIPDOVxN7NsMraELfV+RcBe0epkmj7kvOEIb9A/0ST+G4ow==","signatures":[{"sig":"MEUCIAy4PwbJ++uvFdpeDudzmJhI189xaSVU8kVWFunOoy5CAiEAxnFAwqP2Gqo2h4JJ7OF1oSgr3PBf53UCSm3vfA6xl/g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1119094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRo1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmozMA//WCpX0iZ5LjKZhgZrh3WqdrLGMFtl2aqFkj3tY7xGg8FFp0Ox\r\nHbnQaGhBLIEIH4ZDsXqZJhqEPyRyvWJ4U376wmXUrYns5UZ3STK+xLHyZQok\r\nFRo/DMNWImwAw0AGUb39EA3D1h0KPwlmc/MDP//uZNUghxWZJIoZqCj/iLhd\r\nPnq4xDnhV8wjhR1wf1/gpXoVyY8+tilKiqHR6ldqiS/MGi0Rtyc6DDqArw0i\r\nCmnhQ+weOtlxCWQudYDcRz0M1ylgkrPuCyu9Bd0M5BetSeXsLC2EEfPM5UN+\r\nID6U3BC6FjHgJFa/H+AF/gALojwaLYtaUEkBZopWFmhZwAr9wTpbS7cXHsu0\r\nC788vt7IZaTFRNWz+cz0CPbrSgAFXuCWXPD/L4due/AqgRoEGu3cgpWSYpRx\r\n9li+e27iSb6b4kbGQG65hFAp4pdUWkq3FJTywrHZpVD4RnqznLHThPiJkRyS\r\ndYbvHukwHVr3V7pjEKsdCTceCWV6CcItbdk1dkROiOw/KD7uimnsL4NGtQTN\r\nB8+NWhOld7EcLwXayNamP7CIcQAKAi7moWN6El/IJsnzX4sDEWI35d+HP/+R\r\n1GGoGMDHYcptzDLesaRJtwgfcQYT9ogO/lXLVyEqYdTNWYt6T+XM/dPIvDt3\r\nA9WrIVYXeZkrxaKg70G1IrmoFmLb57rRLUg=\r\n=NRAr\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d90db71eeab7f19ef15231d48549f70e7ef542bd","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.140","@apollosproject/apollo-server-env-mock":"^2.46.140"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.140_1648695861332_0.7351949200155286","host":"s3://npm-registry-packages"}},"2.46.141":{"name":"@apollosproject/data-connector-rock","version":"2.46.141","_id":"@apollosproject/data-connector-rock@2.46.141","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"72b14367695a63c26cbdbb4288ef8c71a2263c37","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.141.tgz","fileCount":158,"integrity":"sha512-MAsW+mLFvgO4kaRpTACc7EqLRUf3Zb3fKlsU7cSMt4nEdD9iFFhKUowIm/gmFH1retQSiEKGk6nurCzrNc/YDg==","signatures":[{"sig":"MEUCIBxvpM6B6Q/BpHiRDptMh7wv+tfZP0Pg7eUeVNntJfylAiEAhLM1VjawBCaFm4h+fKSJcwsGEQB83pbPq0WCEdaSNnc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1119282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRrKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6SA/+NFkZHDz64obN6WSCCs5X+vQ7YE9zBSBKMgaOKaBshkKesqgj\r\nNd+z819mSOe4JNNonmMHdh8viXlfO6pm6ud3/G3Joth+sntrCzsnte/632Nq\r\nGk3l7Lrgi4Ptg+jh2rrTl8eogCoETMZIeRoESE3pFzcH/yXIBrI0Pa0CCiUC\r\nzFgD7fp9YaUrvor/tJfzLs9N2GX8Jtcl4NTjZSD92NW4VwX5L4+CV7wScjni\r\nrGQURN0oKhf5ALn2gmaR4Ib2knnKXL0Gmm7CQLdxxpzMQcEx/1o3zXEKTUOM\r\neNzx/14CfJIy3ZNKETi8/sKTbq3kTBZnZ60n88gz9WqWlUPKU8O//mJoxejT\r\nFDlaOiau/hxt+805nlwus6i/9cpA3eiiMY6PQXj3GmRstHjQLcb/3XlLWozf\r\nQvCI6KwHSQaxY+KLjCWDLbFryUXXjQqoPI0gt50bcujCTDCvX7d+eryy2Wgu\r\nkB3aISLhfsbeeHLDgukPkuRcm3+nC+0vnZ0Ksnh9zoOTjdYo3b4dv/DDbcPB\r\nRDiNYFErPCv4SwdP8V/3vOd/jC6fQm7amcXfhs6fBqsQI2aMO8qRPgdfAxnV\r\nhwRSxyNrXI4D7nORFshwbyk0oJJEpdm4B6b8bmj0pynrQeR4j06ems1u4+WX\r\nDEE/Xiu8v2EE+iExCRDf2eTQCKtk9S4XNqE=\r\n=z5m2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"9f9687487cf7db28f7638a3b600c627524e29bfb","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.141","@apollosproject/apollo-server-env-mock":"^2.46.141"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.141_1648696009970_0.7351357577380038","host":"s3://npm-registry-packages"}},"2.46.142":{"name":"@apollosproject/data-connector-rock","version":"2.46.142","_id":"@apollosproject/data-connector-rock@2.46.142","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7e81b0925ae8f7250cf547ee9fb4078765e7bfad","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.142.tgz","fileCount":158,"integrity":"sha512-+7z/fu95Phh68TZiP07QBDGJZTgN4o98xA4ajja/D10R9/1aVo7I3rUwuJbTzn3dT2rZmomhUqLa6b/OTy3MMw==","signatures":[{"sig":"MEUCIQDXno0eYAwODDC597C5tiV9rvP4Ff8hr1Ha7cI5HeRlVwIgYV/nfTBUkvL9AuP+179jQx3qbqElWK8rN8zuBS+HXPA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1119470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRu3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRDw/7BMFQwakd2rDvXgnjW6ekp7tVn8p+fB3B61kI5vpovE0kV6Ze\r\nA0WER2x5+n7AuyU/3QXBlbAGl1unnOs833naVH+77tdSwHe1bpQeeXj9nQa4\r\ngo9Kk61BlfifIIOcIB0JZP3sb7Wj2JWJtzO5Cs1SDLn9BifA2PcZQGEU/Jll\r\nEOg5YDxgc3hhG1+dcd/yd78OpUnSqUox0DA4kbqZVjdn/IqaSLQFgXd2WDbh\r\ntaEJkAImjFfAKYqFR/xkcKXyrYFGWQa2SjI6CU+DO8SW8t4xeunz1GxSxSDv\r\nXOTt+V0N3FhWiUr/gc/UZOF8Gmqw10suhN4gSDB9QPeKyO0xnyoHseKU+Ni1\r\nF0YJTcGYWTF4AEgolabBsFpfI0vcpR+zPtv42xsN9nOOOOofNGOo1TIkoGAi\r\n9gZe7qSeVuGIWX764tUWokiDI9TqVlSki5LDjpiLkltzDa6FkEhTxobzZOmt\r\n89ywYhToYRWqvZWAj7/d+JFUdkVx5KnFeO9qiPPt3gYvc26dEnus1bFM9/cB\r\ngbtpK7l/PXGVIvvUoibcwcZaRTqOO8quaOS895DZIsG+xs5PTAOXNOIo8t+q\r\nOCGGJsmTTYpPhhKdVFiPTM++2Eg3vmaniouBADv3b0iHyf10njaGqJSaiWoq\r\nJnX9yoEhn7pIh6iUPhx8G3Wl+CZtHpbEFwk=\r\n=WKN2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d1234592b55577d3c2a697fc5ae4154ab6f5916a","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.142","@apollosproject/apollo-server-env-mock":"^2.46.142"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.142_1648696247107_0.5090189236683027","host":"s3://npm-registry-packages"}},"2.46.143":{"name":"@apollosproject/data-connector-rock","version":"2.46.143","_id":"@apollosproject/data-connector-rock@2.46.143","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2bfa1564fb5a940fb2f03dd0e90d24b07d36bd43","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.143.tgz","fileCount":158,"integrity":"sha512-NJBHiHS0vwnW2Fo4+174nmqVGPn5mv8FbT8FSTqvayu0K0hXdxL6u7zJYw9B+7Md9NJS+L7H89sSTKJdyI6tDw==","signatures":[{"sig":"MEUCIQCGZ+P8A3Q34m6up+P0xp0erGz08DPQy/IaagqRVIUQEAIgDIqCMHBa+xVQqr3itOeqOOZzZW70LulJq6yNPaUgcYk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1119658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRRx6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdqA/9EmocY2TkpqUAqEuINPTa/c3NEatoLXe8HVGS5JGgUbNPbN+E\r\nHQZulrfyhbmUS/GBvgknuiqO9FKDuVv4Fj07OcLd2h8X+SadzxORY4QH/7s7\r\n1KZoOPDt/8dEYsbo/JKZ9w80V55M2GXo4QCJzPIRJrMk83o9tQPepzyuN+zy\r\nU7BmsQyCYEhqbWx20ECejWl4DII38dNfr5s5WTHWMrgT6HbwHCnZYrfs0r41\r\nCZO5TKS4oP3WB8Ib93SZ6w49YBbkFU9EXxAOY3If3k5Joa59JW+R681DpDnq\r\nW7TNtT8ni0O8QvOXOPs8/Rz3CQrHybAd6odMvVxeGOOLhg17FHGj1SSRfd+4\r\nVyk9x808MhxLMqkM2BE+i4S/vWBlcUtxYzteGU+er+P28s0pKW6m4NvYFZsF\r\nP8/4jG82n08qtJM7CjtCIDCsUsBykwl4GEe1tOIu6KdzOCz0GY41kr+wq+du\r\nxV0IHEnEd0rTjqibAxvfFPbDyetQlhOsTCP5J/yi/tP92Gis+4J+xzLc4dMB\r\nO8qIWZ25Og/rVTrK0wpFm0FN3cDAUVFu2FSh9qFJymNAw6qhr6ck9Bf+JCSJ\r\nnOmyUWEWOKD2xmhFgLylw7HdJI+WYDPq5MjwsjOv1MMlbrJZJ5MOqnWXsgKT\r\nipzrBoSahKzgjHF7GPsoCyU3ts2iYzsFWYo=\r\n=UT5F\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d8f0fb7e1bb81ea11c772746319e5219f484dbb9","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.143","@apollosproject/apollo-server-env-mock":"^2.46.143"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.143_1648696442112_0.7382397508809715","host":"s3://npm-registry-packages"}},"2.46.144":{"name":"@apollosproject/data-connector-rock","version":"2.46.144","_id":"@apollosproject/data-connector-rock@2.46.144","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f7c13dbb08a9b25f17fd04b5f4b9ee7f14f47f62","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.144.tgz","fileCount":158,"integrity":"sha512-PDVjiXBMiqai6Go5AFTyIx2MWaK7QivP9mgLu1ZdBbFKkON5H5fI8h7EItPV2m9PsAPxXWLkerpI+wsi3YrPTA==","signatures":[{"sig":"MEQCIC/4bnC+ZNnJ/YndQa2hfgowZifzF+rDtLvZ+fX9/8mQAiAeJ75hdbZi+FWjLiLaAkRGkRzCD45ZoPKBYJx3BgWCnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1119846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRR0VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoX6w/7BNP8q5affC6+5gdznGsjDyvUKXXdLulO65Cvz1+mHA76/3kG\r\naMWe4F3dNr23RrWmb3MKgn+TMXO6K2qTNykI3sGDdmDl11ZWvMnimSo50vmR\r\nOZ2hL/q130mcY93FjIWRZtLLEg/5PzlQQK1pxJzDH97x3O3HbFUL8L4GIogO\r\njRR6y2UwTbMAZpdpP18fnIpx0P28315Fl+VTIPNxJnZHmWyEiwbs5rpEpff7\r\njM6QiheAEBtaliqka6Qgt+m5dyxrFuqT6LBTbO9PWMF+VJg554+Wh+w9aHTZ\r\nafGEnXiIAz3DDpedHVg/JO7BxHD91fPeDqdXJESTWwGTkrMIuHqBtaE4qCxD\r\nGn+nu2j+prPxBnJbvMwbOlKbLQ47BMkQKZ+MN5QjOYam4Ua/0Dh0KpEtOCM0\r\n264gpfD3zr3Pc8PjqdIHh5nXDIiFU42BkD7Fz9Cn5FRg7VYTqp2pwNiCHZ1N\r\npRkMuxvoTIMFXvBwEveiBJoJRcwUZQjqS6D3F3+GoyLxvNVqh5cl7l+raIYZ\r\nLaQczbMBpVV267FvC+VBeCye57wPvoAMRx/i/Sdj9BFAWpaGC+mF7VBucp7z\r\n0ZhEFxqGlhGYKQ1p6/N4ugqx9RcTVr232D+1X28OxsMc6bYLLd0M4yc9Sp87\r\nJjt6t6GBXRB7kYGug/ElxoYCScimwUTC0Qo=\r\n=d5IH\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"b1bb1f206d66cb240700f252548e8021b0a17652","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.144","@apollosproject/apollo-server-env-mock":"^2.46.144"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.144_1648696597713_0.8486197738333576","host":"s3://npm-registry-packages"}},"2.46.145":{"name":"@apollosproject/data-connector-rock","version":"2.46.145","_id":"@apollosproject/data-connector-rock@2.46.145","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e6f0338aaa34025849804d181fd5db9bbb6228ab","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.145.tgz","fileCount":158,"integrity":"sha512-htR/Qd4qatpBeQsiP0Jim0BdpbFnAQWEJBukbzX24sJgagGY1Zh9eRN1mh8oxAHixexeF/ng2Rj8h0jkTwNBMA==","signatures":[{"sig":"MEYCIQCcluJunbtqgzKz/0cfpu2Qav4cPrG7idzUZKdLRzXZtAIhANuPaYp79lte104vE0UEk8991mDph7x8fGLFH60OBXFF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1120034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRR36ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7LxAAgdsaTSFxE3xcpyQ3He80Q13w/c3CHI0IhI97Bu20OIaf1enT\r\nPIgV8hgh/s6Yd8H9bN2AoNYeMpK+vM5kAiwFTC6Jq8MfenubrYMq5MDCKjZy\r\ny6V0VjwXR2DbiLFG8ApLhXl4to42DoB4swbYr6E3+m++7SD6D2DxwheDPj1z\r\nF4vSmcA8e3lwPc9rs8pDDQbRaWjABMeWo+VnAC7LcWboiAp5EB6UNe2/3GEW\r\nvRrHBPq0X4h5EF07z3UwaHks9T3drZdYVMyXl66Sz7dpiJa5xIA98e2mhLou\r\naTgtAlz8BHPvQouBm8LTtCLbTKudU1ljaIJcMAoqZZ3ls3etQv9Jp5XB/Tv2\r\nHLocSOPvwK1CbEyPwztIQTWiYeA2Daqee3yZUokn/u7RH3elQw1d+28TmaRx\r\nOZdL6SsWYPUC97oAprIo8POIjI/PX1I2OHAeZdyVRcEfXFL8jh8M+XEo919L\r\n8PS0eyX05HPfnEBQ6+xWFf2J8Wl9MfDi+Fj1SmcG5vWktl1eXU2oD7j+pgno\r\nbonJBmFNIYjXSny2RaWlORsrg71srboP3FNEbPGndmMdUsAPfvsLHlPvIHg1\r\niMAEAA9F9btjx8BovLfMFAmDj4kolsBLrwdPj7TBTgARx13ZMO9FYx3pZ3vg\r\nM1PCo4o0mN0hs0KgMdRyodRPPwcez9eCLtY=\r\n=Nsd4\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"7bbc217e125f890865f76684b315c296b4e55361","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.145","@apollosproject/apollo-server-env-mock":"^2.46.145"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.145_1648696826060_0.41542489539954364","host":"s3://npm-registry-packages"}},"2.46.146":{"name":"@apollosproject/data-connector-rock","version":"2.46.146","_id":"@apollosproject/data-connector-rock@2.46.146","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3ae37cdf4ed9a39a5aba4ebd5b31e4219ecc71a7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.146.tgz","fileCount":158,"integrity":"sha512-dTL9ChFMYlmNoVRknr8Y9xolA4vTqx39UGkAU4yKbrzJv1btd0IFpH232s5b3ClDwKGKOQR3tmyElX+AH6sLOw==","signatures":[{"sig":"MEYCIQCFBbWo51wDOX5qp0Mi53/r1BrCJaVeV1nMjd0Z/1OGRwIhAL29eimQ1Se0iifIo2N93BgDsmAA7Jsf4+JH0/Sg896M","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1120222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRR7KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCvA/+Pg5Q8Y1q+AuBKAKwJZjCPv5a2X1nHANCHie15Qdt7G4OnFgH\r\nnbrkmyUzOYdWnSxdzX3E6lxzUgoXLmIgO5s3Gpb2qUxzX+34wDQcOk6amHgi\r\nkc9pAwClGvX8BPq5F09OaDCsBUHHtkUdBUzGrItLY3se1taKsa92QBBb3Kh5\r\njDGHWhy6X8RK8h8C/I78Y2s1qsTp/DmD6HPYCpVMWM6KkkpXwdvng1rOF0Ht\r\nKou1+TYMNclF2gkbuCO7vnUVcH3hifEDixqgKbDFRo+0ximnIB6uOeCx4nyK\r\nfFSGL+40+c3PolIYEvI2M4rZiiaCiSj8LPuz1VFYsS2p6sXW6IRCIQQuIQAJ\r\nFD3Yb5TlOWDNf4p/PI/CqhyVFVcD4Ema4oRVuPjgTx9HC7Zbk6GlZicXynBR\r\nrWgSxny3Ot3vcAxyhlHptsoBXLpxbfIl6bmDaLEWI6ot3w0H7eN1LkRFOAou\r\ncpb+vSd9IgZpn6MsviDH8xggbZjf6upMaZ4tl4QpAyOP8btqzs2OPrX/Yn1D\r\nZ2GAook8iGOWY7hfuq9RzYPrLjAj2MnPwGOf2tjWIB65V4UKlhxiDpCDJ3RY\r\nRMWPEw47hInkEHwn1ZgTNw7cZNI+Qxb9NKVogm3R8xVvn1o+GscnuFYid/TL\r\n7u1kaNVwEU3xbvpYk5MtTq+WKhArtfvMJKw=\r\n=LLbF\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"ca052b1487c4b77d24d491e6d7126b46cc60f69b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.146","@apollosproject/apollo-server-env-mock":"^2.46.146"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.146_1648697033857_0.8563820364817125","host":"s3://npm-registry-packages"}},"2.46.147":{"name":"@apollosproject/data-connector-rock","version":"2.46.147","_id":"@apollosproject/data-connector-rock@2.46.147","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ad4eedf42b0f7d0345801adbb3351a4d69a0d91d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.147.tgz","fileCount":158,"integrity":"sha512-X+rzfla3Bc+UfoosEaUr/Q5IZWvTyuwcUbNXC51zspH4VCUed+u7vvxTkmsOipWOCEs6WjoXUaZJFHq6Kxse5w==","signatures":[{"sig":"MEUCIQD3IH+e97c/eSl+YvQfYED6fp7Zn1rMootmMFPvPNZ2nwIgLpiGFBhbS7KSF9TgOAOVzd+91JjNI6MrLGUmgsZ972Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1120410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRR+eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrc1g/9Gb/8ICHlyOcQ4szy/ucyKc4aJ0XqS4P5OXd2d4IWMGsBnEE/\r\nLAJYwJx8pggzb1H845yER703zwPUalFG6oRCNDdCBnHFIEkPmPe2tc9fqWGn\r\nd7WkdviU/1MGNCeNKdlIX9CfQNYn9glPVmxWyJqsgcY9lhPU4J06H0d/EC/G\r\nprQ2G/tSdZBoyBbKlNOYWO0HBncX5Jby3vfzi66/Ak5xkltBbOzu9rwCVgS5\r\nCqsJ6W/ybpKH7CXkYr28cIKQvIalhnfsja8lAL30Yoo8rDoktXTFhFdPNn4P\r\nTg3N+0bJHfeBEh5KEJAqaN8KlWhtWSTX+/FOMuDjqEL5f6gaRImd/AdC4gD3\r\nxZi8EbWqo9hejsro/SHAZhzrgVqWjSElGj7gixTWud2akQ06GBIqWzRzotxo\r\nR/QNs4Mw0BfmMkjB1Ay5YAAvCs0tHL188Pw4/tcY4GR6rUZoBcxcylDl3DAO\r\nU8gdpXLCVeTLS/dXKRAegHEjTLkDWZ1iO06FxYpoBfiuv2ttsKOVDKMZFLH3\r\nhTSyCXVnmd+Q9XpNH9QiBgES9+/AyY+evQkUHpPtCc7gJHVERsVnF1bUJtK5\r\nOPDpaDZZX6m0tFpeSXInCI9b4avRmEcLJrw9Oca8KIw2xMODORQmNh6o47rF\r\nvC43xI+KdBKyRI4pigCzZlozlLKB2KptsHI=\r\n=4oHK\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"11ac560fbad7159656a3216598ae16ce032c273b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.147","@apollosproject/apollo-server-env-mock":"^2.46.147"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.147_1648697246530_0.23414284788165984","host":"s3://npm-registry-packages"}},"2.46.148":{"name":"@apollosproject/data-connector-rock","version":"2.46.148","_id":"@apollosproject/data-connector-rock@2.46.148","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f29d2a815bfaf3279727e0963c30ff8530b7d2bd","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.148.tgz","fileCount":158,"integrity":"sha512-c/0PQm1fg6aynJz2+rqJgXnBDIcnGkE/vZeVbvx0ywkPu0rXAAptiZVtyvOQEhkXJvkBC12hH65K1jRbxnCN9g==","signatures":[{"sig":"MEUCICFJCVEiqQohcg4reOvQbJdMkDt9QuVTYyXN0Nvn+VzNAiEA76HwJvg5RnUVdd0On6ib9WM3J5bJi6/Ay9F0Ul73Rqo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1120598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSBOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7lw//ZbnfuJC1BC5+X2qqOdewv3gstKvhe4cpT6hEx4qxN/SrXYsZ\r\n4y3wi2V/OyCBwkSuEcVNaUclPdCKBf1alEXkxxAvRpl7mdKVy3H7oe3H/G8M\r\nRQsnZlpBcqLV/9MTmb2NScIuL2v141QCS0Y/203F16DpFBnpy/7XoMlfdw6q\r\nSQ0cJoMb43S7Vw3Kf3UhEik45wJ3PQ17mN1X12aEaYpURZx2KEn3pjFVQ3Wp\r\nO0zq/1H29eiGRjXqa3Ch2Pz0jDlygT4uEcApF7/8zgmSGywEQIggX/xHUq0u\r\nbIs46ke12GwwG6TvD6FLtPcFu9FKHHeB4WMe23GgvqEZvj1Fnm8Wx/B8uyBK\r\nLMQTpI4vskKvn+eAs7QTrxQmwafkjgzXoev1+iLZ6yO2RVIFRXYgEAigTBgu\r\ncyyzAYjUVDPvlqTguJfI84eFldAQfO2FB+5In8kpXaFz/upe/CVm8/D5Xkp2\r\nHZlNk28jFV5QOWJAFP5GI/RDNKMQISJFXEbBsMaOxyJSjJLXE2ejy6hLx6H0\r\nECA4shYZE/xrT8D/wJ5mCajlRvUtv58mKG/hPzb/u74LHbDTCFi32G9G+nPq\r\n2/RkkQrlfmm/bAv5438BEsnQ1Tas6P90mhGO8P8V2fq2epJC/C0q9Dlf7NGb\r\nYd6eKa4x7YrhS9Z4YXp7RE+sgCUUg6qGizA=\r\n=xWGB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"805486007e214002f8f2395a13a8d81cf8714752","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.148","@apollosproject/apollo-server-env-mock":"^2.46.148"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.148_1648697422307_0.6376752257478402","host":"s3://npm-registry-packages"}},"2.46.149":{"name":"@apollosproject/data-connector-rock","version":"2.46.149","_id":"@apollosproject/data-connector-rock@2.46.149","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e210d8111ccbe3b959a0c33e472c262ac39e5ad2","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.149.tgz","fileCount":158,"integrity":"sha512-HWdAi0onarTCt3RaqVKx5DaQfXSDoOhUc94kl+WuNMHdU4Bcjj8xkE6MtFRkAWR3qK6nPsOlv+bGhWmzo5fM4g==","signatures":[{"sig":"MEQCIA7yIH/3PNre9KbasurKS0c8A9LeJU0pr+FHaAmPYm7lAiBK8KbsoOZ2iFUVjxcg3uRgi5OKdw4SxQgeRrVXHIsfYw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1120786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSEMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqzZA//Uc8DXv/jcANEHvPfhVqDIBWGoGI5+5b9g2bte/lEZUMm+wtl\r\nEl692fJOceM9u1bGOMYTUaLWYNeYdL7L2WDt570aHSExdndjCtp0r2t95dQZ\r\nf4iyig2nZCh0uSZdh4wfGOtp6Nxrx80pDJ508EJyiqA2J6qkYhYrpKn5Zfx7\r\nyyGnc8yZZ4Hb7Vq/lcErMSdxf3gr35r1ngIqiOQu6QYuzusthIyw74U/Rb8l\r\nLVVdJf6Mu+zhdJztcdKClnZK/LtOSGP9vDrNlGdCsWr7g6aZ0ZcyLwTH9f16\r\neK4jVtx0UCHkzef1DR+a8/kH+M/jaMvkb+/2AM47Fmlpf4vIcfO/c8SIKeD+\r\nrkhgewPCPhKTypi/qiAmex9ugle0fepoL6EzwwC14UZwyhdVLmFIoerLjyaX\r\n1iuk4QR4gMLCghVLaAn8JHU8T+y233bZw2EsrCkupuKAxPF3KGQsg5MkhWf/\r\nwWv8sXinByGM9JRvCmcdBeFnGKut4LDt4Z4rK+qpxg4k1Z7h+SDKVMj6U8DQ\r\nhdn3jKiDmEDbXbTqDQM9MFWbFGNFW4sgI0X6GYWIaAzp4g1U0+c7/oAsrpxb\r\nxNO7B77Imx86QbMaZTLhAnJ7ifq0d+AfngJdE+2sp9uq9CmFCwyrKN/5GjhD\r\nI34L1+Iop7Bb9ZmDDFDDcrf2qwLg9oj9mWI=\r\n=xSN2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"a05812956ce25631e9530bbe6fa7d72608acaaa1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.149","@apollosproject/apollo-server-env-mock":"^2.46.149"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.149_1648697612519_0.08529774929489098","host":"s3://npm-registry-packages"}},"2.46.150":{"name":"@apollosproject/data-connector-rock","version":"2.46.150","_id":"@apollosproject/data-connector-rock@2.46.150","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"4436c0ecc864a135a51ba8db5303df1edea4a8d4","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.150.tgz","fileCount":158,"integrity":"sha512-qRyZipXWbbl3HWaFgAtJAx1rHSHUl4+Z1BHcfCWASoI9wNZ1GJzS5wnd59FwyRP6EafO2acBAskxTTng/cpoPA==","signatures":[{"sig":"MEUCIQCSzg1KO1euQ/0pfrKx9+R82E8Yv05xbnr4jFnnpfvDZwIgMnn9R9LB3xlhD0eGTkZh9BkANpabHAiyMdEahL6/9OE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1120974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSHCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZng/+MDnkVubG78XkRSWKCjWyZn7N0ibra5t/9WfhNkwLmyzsmXcc\r\nSI5jvuQdZQn0C3IaEV3DCkdp395ShrzLAd7WNcEZ4uSRYpmw6WNoo4uF6NUa\r\nM8fwfsJA9+nkcCYp0r+o/wQq/FPpYNp6tqo0awLpkQhfg159kNUd0jlxYSOf\r\nt5XZmOHXh8I6wEcsQQ+3NrM+FkXved3LUlA5v/76tdDn0XZ1mbiQkfJcFEut\r\nZ2pjCOF3l32hHr+Z28hA+sahflIYb7d/TI2OoDwmfZ/5UIkgYOciVKTt3t33\r\nhDUmlrNCvxboumMn0++qQIaYHxKu7yodey+5CphEIRgOcASUFwNyMAPYuJZ+\r\nAl8+PfLKqxn5Cmj3JIcJUC5VwM0UVUOLFuLRWXM/ba4BO7ERtoqwGhTMh/19\r\nRURHAu4Qr24Z8NmBMyDzWoX5Dd/vVwuXsDwzMiNOe4o6rw5oSEKSSGWl/igU\r\nbSOt1GH4CC/dd+cqry05VzUcc5CWkIYtuXW/WOKm51BqLHwDb1Wwd3pKawJX\r\ntlCsWPiXmZXrOBhn0c+rtGXxM/3gJtV3alhPtt6Nh7l1jktsXtOdMXOWTdw+\r\n84Pzp4lm+zXj4kRJf2qEtGqlg5D2hHUKuaugjebUrVx5lc69yrAxf/2QuyCo\r\nhlJ3TfcgtWisIL085nHNthKvumbUdvAL5/Q=\r\n=39pD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f28a2637c1b059e39c0f6ecadd1fb4df1d43c8ae","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.150","@apollosproject/apollo-server-env-mock":"^2.46.150"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.150_1648697794146_0.07604894096523407","host":"s3://npm-registry-packages"}},"2.46.151":{"name":"@apollosproject/data-connector-rock","version":"2.46.151","_id":"@apollosproject/data-connector-rock@2.46.151","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"738cdf457a3e48dfd928acd2ba6bee726dcea31d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.151.tgz","fileCount":158,"integrity":"sha512-QsOHyJMPHPzYYY2n9N+A2PY3qR4PVdkrpO0dMw0j47hxihwDPvtWdbDF59S7ptMW8Nn17QBpbNmz4+Fu+z/SaQ==","signatures":[{"sig":"MEUCIB1rpkTOoLJxVB3+LwOXjb/9ehd7mGCSclDHG6zj97+5AiEAvweQ8GhSlIKiFGJn9AsFpDLNYb7DBy3ZTCTAJHliJCQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1121162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSKsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoymw//XGX7cZFjZLTgmKYZ6/FO1lS8RePP8H59XFdZNAG2WbdTGjuw\r\nk1yfG9oqNV8tzguxZoKiEWdUeYVEMsCn1tEV2sVvstAV71ZNL6oQYWSu/Ip7\r\nROd0M4YzenY6OxsTO23YeCYgGrSARidmfB8H/2vL18hP9ex92clRNZT3tAzv\r\ng8Ea1vfQIYS7tz7IoM4jorYUKNdojsY/XUg5xOur8tmIrxbf3cHm1OGO2xkO\r\nDBZdIblj9XIGaGhdjVpQ1H2mGfEjeT3ymiBIUTFlUWM9BLfSQ1C3pBDe6oK8\r\nLozFg1w/i5vQbkwU607IQNwvSBApHakRR8gZ8Y5n8f/Dy1XoTOWT7P/4quEQ\r\n2YAXhIvrwUDoXiSNeVieG28KHqmIxd9BekZRitm/ByHz7PPsqpAoUZAPMtOq\r\n+dJIyJd4Q9WeaL3wbEG8d+BhopBhntowm6G05BBnIc3vRX1f8EYPsOYrM6g3\r\nxk5GKaF+LjxK7aGePd+A6OEPtFp+icnFKyAvvEbeRWB0gt4s7s+dPmfw6R9C\r\nydvjow6M4Tq7j7+Asbx8PUGBZ7c5qPLkg8HqA2sR4W5hUsBplDPDfFQzK/ix\r\n7NgglOVDdA6US7ItafgvtDgFQ3TIwx2iFH1CVPOFZi7e9iGCRh0xYz3IOsSt\r\nU2Ec4EeBefC1JiRgWU734PVmxtNneW/CPjw=\r\n=sfbt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"79b2343ece5bc3316b86bc9bc74cb383abf9c9d8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.151","@apollosproject/apollo-server-env-mock":"^2.46.151"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.151_1648698028431_0.9772264926490004","host":"s3://npm-registry-packages"}},"2.46.152":{"name":"@apollosproject/data-connector-rock","version":"2.46.152","_id":"@apollosproject/data-connector-rock@2.46.152","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"796ea6f6d337fa585b1d3ccf1f1c4ba2b7fa7ff6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.152.tgz","fileCount":158,"integrity":"sha512-DfT1QwBq4rlwyQ2+n6x3ltv/9N5fSM1P36a1LG6OlLS82YRksnklCOIjnswjF2n2Rl0MSrR1ioBpgsKS06q8uQ==","signatures":[{"sig":"MEUCIQCeFV9sbXLlVTsZ+EWsyIZYx9IZsmCFJtQ/JpAfOZXm6QIgJCWANEUe8pab/ADQ3Pt5sg/4a7HX7ui6ZrpwEc0ndaI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1121350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSOFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsDg/+LFc+M4dK7LurFp/fJ7BIH5csgHViu8T+EmQEToQMltXSJKh+\r\n5X6AWZqVnBGfC4dxsmFsWQ9YjKDroDFfGFgM6Se8FzJgHUwUzgBA0MzJSZVS\r\n7H5eWQkMhIeHU13l64jgIaABnNDEUglNuvTa6kwx5GxAwXgi4QYl+KlcfQex\r\n4smbZrUCs44PnOHuJePn7CBtmit0tXE6OMeA5Uo+JVhWP6gVCs2ujknXS8Dm\r\n82ApDGdiYsmszGTfFPTvpQ9OqjUnVXwq8XUxIK5byfjtYOqkeYABXkWF/0y/\r\nIcMj3xlfMsdGiy+iZAhGjl1KZg6JyU2Uxi/rk/br0mqg93+QIVQ5/LQ/4XPT\r\nckmk8NHhfoGt0zMkDYriYbQCQB0mXGWjWUO+zHqPVeaoXpVyqR20gz8iw4X4\r\nBqB+lUhcpnCVPtTeWpig6o8nUgDjvLYi+xafSpBKXSSegd9t+633kTvRMR9F\r\nd3z5dGBBwWbhQWQpYRTzYUmwm6hBoxFXG9B3q6FrpHdnwpo4Y/OvLYtfT+9U\r\nDr43o0xfj95MfOTWlcd89SCNGnunPQxM864ZYaRz2zoSgXtfBKCYEdAhQKCF\r\nNn3GQfYbl4QvBr5mNzSyFEpr+jQXAQtGrNjkgMrCRuCRTCnDEhGi+EyQEcaT\r\nkl4d2Qpk+mb0U83S1IOQfVf0Ibv1R+dtNII=\r\n=twTn\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"3529055e0752d9c634706b5efab72f2b687cbb6f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.152","@apollosproject/apollo-server-env-mock":"^2.46.152"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.152_1648698244891_0.5248634983954834","host":"s3://npm-registry-packages"}},"2.46.153":{"name":"@apollosproject/data-connector-rock","version":"2.46.153","_id":"@apollosproject/data-connector-rock@2.46.153","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2ab32a9e736edb17ac4cd18f30327c636bc78dea","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.153.tgz","fileCount":158,"integrity":"sha512-o+KmWyueTRto0CVFQlbCyFsrW8UigHQesSxTFFVnK5EOCvpHYv6rkMD+fl23qmyt+MjA9KwWk9aYNtz7HyN4sg==","signatures":[{"sig":"MEYCIQClqC6ZqJMjfb+ysXw2yT8rluv/cd/K5rFoJlApyuH9JAIhAJnhxixoMtfzxtaYITJ9lsOY0fPbfWfwLXg/W1JRkr6t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1121538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSQkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqmvQ/8C7deR1FNVFmJISc46bKPc6NKbEFDQfDLIaNNC75UUTnpp7Um\r\n3PIwdYLPEyh8BW4sVJb23BE1SuaYSEbdkO/UC4XXHfx6hA8xhlovPme1Tvkw\r\n5yoEurGmD6A8HR0sP7wTEFPl2Y7VqWBTENCkIPgn92Gma8cEzkU2JgBN2iDX\r\nDwRXhN/24irOWkGdtxLD7jNL00b4fVmdvmmvfN5vvyJJmz9RCDylwoSXoYcn\r\nhjyOUHze9dST1HNCNT+f9YfygTk6qQS/q8rvgh7RBg4YcYzd9tAaufUXwZ1Y\r\nPe6dGntixoLepaIvX6436VO4wZbCKj+zmQOXOMO2iEPnYA45CWCHYV68kawn\r\nPH4glrpqemjdU4bjYfrQdPGxAkF9IBzwzld/RE3sNardliX6HBc0St9civ/5\r\nPXIe8YlyneZGMhFj7lntXbAELk2lwgiTDh+Pd5YA0XxC+4aMM5gfzgjff7jl\r\nvOfyX0jD5NHeKUBOucUQMTbVMy6kSIBmt3Y3Yn6l40QUErLwKOFLed9AqeEc\r\n2hkpeu2tATV4nW/WBA3FvCa14eqn/ywpNYdsx4KgCW4yR6kp2wZz5nUXcNh7\r\ncZT0k7+Bw7xnMAHmHg5jzG6bDRWJPXGDi8x7XYnSkaNY2/kXaU9S6r8HjkXu\r\nsDmp4+O0gB+SVZsbgpaNzYcjC1Tbvf0h6mw=\r\n=fZq+\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f46a3bdf6d3e2471cad550bfb6f0651406a593b0","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.153","@apollosproject/apollo-server-env-mock":"^2.46.153"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.153_1648698404489_0.46120049037271094","host":"s3://npm-registry-packages"}},"2.46.154":{"name":"@apollosproject/data-connector-rock","version":"2.46.154","_id":"@apollosproject/data-connector-rock@2.46.154","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"02bc3fc75ae0395c0490b97e07a20f648c7aaf1e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.154.tgz","fileCount":158,"integrity":"sha512-DK2SdJJnSN1G80xKagHbyZhvddRnr07VEGRDS3XTIZE8lfgw5ndKjbcg2OzIEMguuMW/IrT6F1D8lGWkYP/WwA==","signatures":[{"sig":"MEUCIHNDq2LowtUApKssVyXvUgRhThH1elUnOrqkP+UyqUBRAiEAmqu560XY32TIDvrjRqEVG+ua056AYfXWOUb6dfRmkHw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1121726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSTHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRsQ//feTXBR9+k2S/8puPBF30KyTpicBlsqdX+BYwOZEUq1obrvsI\r\njZ9QJ/jR1Bn/LZl2grxUV1HplIgQ0BWpzX0R7b92Z9MMdxdFHApI7ihO4lfg\r\nnNTgXiBZ7cvJrmU891iAfeVzj+JpXOfq3eUmgnOrowRFBqCHuxfEo8HKRBhv\r\nwrZ1mhLD4BcoFdr9yXZhUldek3gxs+GER9I99U1rB6O6adwf82/ejohDVoAG\r\nwW0V/mGnlF9Idj1VlTODpnxl4wXsLGdcNBLC5Rx63f6LSRF+LDtT1r5thsN9\r\nU3czhI4e0tsAB44nRoP4i50GUxuz3sdc9Ungky1QRUmmDUwbREuYOaIFz5J1\r\n3lagZULhoRK/VMowZ51gQrD99ulgbXKDjNAdoHNe8UhZGamQ8A2D7e6sh/ie\r\nL6EnPqzwq+P1z/ibZMNe8lCWCnW65Jm1R1zeOD4ai9dQ1Y/JoxxDg80mn/2j\r\n1J3XUvVb2TdSeu3rm/+KsibHRx4t0iEuA6JX3XzAtdg/v+kbefwtNmQFwkMI\r\ngtI7gTG1kgfzKNMkh02Suq9yVAwdW8KE5apggnERVgo5PyP/x8u4VUiyXFOX\r\nD4YbbiU8v/GHQygcFtjg/O/Cnuq/pG78z3XC3X4E4nd01iM5oYUHC5q2J3CB\r\nzOcYmPf3Nb97cuPXv8QrfmYdo/CstcZHrvo=\r\n=8ozf\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"782895379e233c1756d200c51252be3010410f66","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.154","@apollosproject/apollo-server-env-mock":"^2.46.154"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.154_1648698567349_0.3411763526486675","host":"s3://npm-registry-packages"}},"2.46.155":{"name":"@apollosproject/data-connector-rock","version":"2.46.155","_id":"@apollosproject/data-connector-rock@2.46.155","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"16240c9328f6a3d1a9dd649c43f255ecd7f80583","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.155.tgz","fileCount":158,"integrity":"sha512-yyXwEAbvJSbe9kq5YZ2HVDgL8cm8Y3wQl7VMF8gjBaE7ALrf8lpzpuqY1Kr57vILGDS10k1/0LqJlsi+PJUKEA==","signatures":[{"sig":"MEQCIEg1QbewCo3ZvXO5t7vmy2wmPUMlDn15R3Uh9Xe3lGVDAiBzwpTI751ZcDXeqNv16KY/27OKbEUn8sqc2+kh+sDJ2w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1121914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSVtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWaxAAiqEreHxyw/7NHFwWiznjqzFbsQ8BR1tf6905WOIOKZdXyb78\r\nzyXWvTOsyRV1oj+MDPHiq5UtdVljaKht+c7HcQKkXQ2EWWHCxXJW3t90LBZI\r\n2RzWJlwpmzKNwAqwiUUZfQpELpT9hYPiZVwxISTZ023ggxGNtoV4BNLQEC+P\r\nQ7NFHtYwbt1jBe1Zv+GPJszOxGsPJ4WkVCBFypMOG7k42ItdVnkyADuQoIGt\r\nD589RQWNOaHNdfEGR7PqxPoQLEB07vs/4dVezZqByHOZGAoz1kq0kiowJczs\r\nKTaLKY+YEmyNOYb7Bm9llF1HDXLt63zUm4lMmIa7mszm1BZ/FlVsPBCFZFfN\r\nmr+E+SmLTqmB1MIeU+FSP5K+gJaEvOHjn46T0Yk25KEcay/t/foojtfrpCuR\r\nc64n8bIZC2FNDQ/SmMwfbd3pFsqYsLuxzt2e5FBwXvH6U24ov7aN3U7sbYcS\r\nu4UC81UAI9ND6oo1+VKqgw7lE4uBDcRHs6rCwhoDeYx++mX7yqUgnYXeU3hZ\r\noIcgymflaAT5ZF1tmxtWyBUoBITCRaZZe4VOtbgZHui6VSKg+jzfoHCGPLdk\r\nszR0XsZPqqODmJFp26RUe1ABEe/pbrmOq7qyl3RBfp7MTplkPGaiDu+yBW/C\r\noim9YbBLtBAhwfFY9No0tjNsswpM466+PKc=\r\n=ul8k\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"1877f771ea9c4563ed5d27cf7e28d8b6ba2498ab","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.155","@apollosproject/apollo-server-env-mock":"^2.46.155"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.155_1648698732922_0.2062631144109277","host":"s3://npm-registry-packages"}},"2.46.156":{"name":"@apollosproject/data-connector-rock","version":"2.46.156","_id":"@apollosproject/data-connector-rock@2.46.156","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3ecc13d66dd5af18411f412fed2c946e96444c1f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.156.tgz","fileCount":158,"integrity":"sha512-KWY7H0EUX1NQsjPAXJchnphP7Z0sJ7P9NRDwu2mN3n7FUIzc4orkl1sbaaPK+W5HJ2+cQn+KKQg7Z/kSnAqp4A==","signatures":[{"sig":"MEUCIQCGlI4HGAbofhzBs3Y74qi3IJzlfH8MLp38rybQqKYGRQIgdIvfcY5Ra9tYGmBLPGPSWipbXsedSbcVYMbEvayGE4w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1122102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSYiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpfZg//fMQhb4zGT/scoecgXFjfE87feZMwvgSkRA57TzySJdADYUa4\r\niujOKJVi2m3BPuSWBqn79ibuQrdI2DVCqlkBrZqQc70lIAUBBk+XqTsTSvS0\r\nbqZ2N1w/DaREZyJ574TeVMfTsQMz3TazCV+s618E6BFhOmJYzuS4jTOEa8YN\r\nbcQsNMxKX3ZJoV6e/W+p/X9FtHwf5zUzoyfHNfXM378qxcT8FRzgWWp9bfSm\r\n6jm5pNjbiqUQBFGx/sboL+IovVCOx0AztVwSIZc5cjjpNeNguvBa+gqg20WA\r\nCDBCU0QDbB6a3ZQpZQVhHdS0H5+2wLY6kPHl3mzLrCQtB0ki+6NnbvF7WpIN\r\nN5ExUu5R2pTkuCjkH/UKd8TWEjT95vPe4/ZuF6af0FkulbLEEkNsVMhLmrYx\r\noEXmA7VMRIr/Pmbtm7RXhlIEc3iLSk1ovYsGWLIT0dO3mffJ4/zyvuz03mpj\r\nXXAlKtjopj5v/W3mnPzEabO0oAK8hep24OkYcxnBYo9xkyUU0y4OlLW8K+tS\r\nDpLMrQ8kvlxs2JPm/J0MuUyCSb0gpnA+BWVTqBjY6ZCqqueLoO+2zpzvVU0c\r\nWGD4LPLuyyRvucE7jIXJvkbeJv08utTwXFdYmJyH6pkcchbI1PbI1oMe8hmI\r\nLOh/hEBZ2zM8cnxGKA5cDte0MzMKbDWtIBc=\r\n=zb+a\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"9433c159b9aa68ccab833e16585acd82bb221a79","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.156","@apollosproject/apollo-server-env-mock":"^2.46.156"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.156_1648698913778_0.26640746127794546","host":"s3://npm-registry-packages"}},"2.46.157":{"name":"@apollosproject/data-connector-rock","version":"2.46.157","_id":"@apollosproject/data-connector-rock@2.46.157","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5945450ec47bc78e39b353e37b4345b24d91daa8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.157.tgz","fileCount":158,"integrity":"sha512-Xcka6I5RoWBeRXkxEVHOTGl2ejDIpIZS5mITYGGTI6BGgU3g3EpfmP9XJNI7KKnTNldb2dGGvhDY/ll8rBD2rg==","signatures":[{"sig":"MEYCIQDboHyAzvtrOwnGHh7b11Sp4KmGF/t+qJM9GDvd+Ffm1AIhANFUmDiG7RD12mx3l05Sr//P/RRbCoBtpF3If+tlYq30","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1122290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRScRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIvQ//YchkyNE/FxJFk8Q0XinGZuUWL0eN7NB0mYcPc6GB/IRilvGI\r\nvachn8xoFYcE/Z0vXReYduG3Yd13azon7JlaMRHf0QIM2ZdhNx+wtvOXu2Ly\r\nSTzW+lCa6r3A5XWP014vpzzehWd+KRiJgJ0wVabF2OOncn+62saUDToM8wbJ\r\na6ufQfGbCoFvWz6pyi/K2CcM4du+AoHv45YKpUMr594BlKQHmxT3Brh/uoB0\r\n8zOd35vYjWQMJmA/p7hauqPlCz+JVPLpGzGuA8gK5hgA5pXrymRDSAjs5JPP\r\nhUgmQNLroRz6AQzfzci6AcfhpeiAL9jzAW1exibDHi2+Xwpmz6kKd97uoe5o\r\nDo+IzKZQCyqYV8J7DSEMvUKPwr7TcpRZULl20b3CujgrTxVBAz0NqrlfodRO\r\n3LvEDCMrqqwJsUPg6EI4a8REu93Z1XjDkUWJeUz+bss3rqdIOzwiSRHUvxHg\r\nXCnRNVic3Twzi7EHhXQ8mUQWQfN0SxpnI4FITR5Mlh0QaIvlpJMZJkentspi\r\ng2ZGQR5JrSil5Xitbw28Rsb4OFiK4Tt74boRjTVudgDqhBGR9zKSt+Yahg5Y\r\nv/M8Z3Okd3Y3+a1oib4NyP90uPC+wBuwAY6tMHVI9IcFBNZlD5zWoCQtzrzZ\r\n9fbgOPyFT1E8WljNOv+bdbpGqVutAtDCHn4=\r\n=79cC\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"0141a4706c1ae3aedbd2056d3831fb519e73b7a8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.157","@apollosproject/apollo-server-env-mock":"^2.46.157"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.157_1648699153374_0.4107963237926362","host":"s3://npm-registry-packages"}},"2.46.158":{"name":"@apollosproject/data-connector-rock","version":"2.46.158","_id":"@apollosproject/data-connector-rock@2.46.158","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"9e1360412af3d393c7ea1b29e6cadbf013174f27","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.158.tgz","fileCount":158,"integrity":"sha512-9fF2CQjpJ+JbknSIMboNyUJHw3Yk6XLR5wIN8IMSgSk3HlmJ3O3tnyy7rjrh8+uuR+xc3Ac0h3OhM6jRSTg4jg==","signatures":[{"sig":"MEYCIQCOOpxGOcCGgax+gM+/kmb95rqsDJ3/Oz5MVCZtyYIJ/AIhALJ1lBVIirKM2IGAIoYcaRxGeXTg7ItELMQaGG3w2Ib5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1122478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSfiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYQQ//TTr7s8bOsscxSpy2mG6rsFA4CSytFAwoyWqBaw4y6T1zEOR+\r\n2ZWOj8pPjFVyGrIxyv4PunLGG8uPGf019gvBWjFN9lSvQw0UfREcW+qIGzyz\r\nc9az60QVwcSnEnKHMtLDDAdXth0WwxfbSlsWpv05sAEz9G3/NGf/ZRGGSwxz\r\niVLhcWIp5UD7pJV1eg7gaOSvUvILXohDXYF870wlL2Mbb1u0yQX7RrJ9Pn+Y\r\nRzH6xA6IZXh1RwIHBuNL0kfReC9MUuBDbbzFIt02eKtjOFRC1kVSyokjcewj\r\nzux2IZP17zPIwfgIF37glKie6d/i+/VUW93KXlRnT8Gm8qc86dYQvZxC1EiM\r\nVzhNALgjlVR9GJKypUPAjbe827QCPU7kDccMjUl4aJixGzhvxOiw8aLPVmh7\r\nlqt4qSUn6GACnokn88muBtVaRbyG/1nqT3x9GZvQD+xm5WQYa9305/yNQaIe\r\ni7AqMo9KgOSqimLcx+Bsp/isD1lsGk+P64iJTIS2Eq1DN65cL6YEVmfBHR68\r\nYCo+usl8WC7RRQF43UFz/muIaoYCkRsWcJ4Nb/WvCFrEFrNXCU1INEkiads4\r\nzPiB7CpBBLBSw2vvXDm7OieUnWiug4mz2+SobIRZTHGMiwvCcUx2VDTWtuKz\r\nY4jN5SfTAOnIsWrvUznxelJe8wE1DV+FhRQ=\r\n=Yy+g\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"7772539c55b6a87215708cbb0e828b13bd82df21","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.158","@apollosproject/apollo-server-env-mock":"^2.46.158"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.158_1648699361886_0.29588102682096706","host":"s3://npm-registry-packages"}},"2.46.159":{"name":"@apollosproject/data-connector-rock","version":"2.46.159","_id":"@apollosproject/data-connector-rock@2.46.159","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"80fb1cb6643a27d9f9bc4ac0e842e5433818b758","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.159.tgz","fileCount":158,"integrity":"sha512-1k+C3Q8Vpmxi+ynZIW8mPjgfxPnp98D+nmubr0EfgmjTyu14lQbs0GeFqyYfKHGQqMJqibv5jqgBmWpYbgTBpw==","signatures":[{"sig":"MEQCIEQF/jn/NKqYyz0swWV8JMJmMlPzw8lCK1b6Qj+tgS8EAiB1Uu+alCSY6vFMDx7TGXRH/y8Dr0uIlBPMNMGDzfBgoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1122666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSiBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZQA/9Eu4V5AZUHytKKbq7Vjz5C1P1hyJ+whGBza+sqmRvQ8j+vdc/\r\nxe9Vk9fQIVac1tyIXPssAGNgrfXkH83mnKcAgSHBJSYSBX/ZBdGVAyXkVVRO\r\nCevAsalAKI2+3F8md3fE1AMAGEj0UVqBmj+/4lEGuzlDiebCVNwk0t8kx9GU\r\naR2JUXfWWCRCORFNs3q3rdI7Gp4IxLTr8F+8yegTiisvD2uuo8mlwjOWJfAU\r\nNXyDI8sQC+6/iGzzwSbTFyrkL7ni6h2Bf2ZQWHr2krOPeRYO56T7iPLBdh1t\r\nV9QnYC3Av/b4GRtN+U7BWUldL7eBX44fiJfPZWIUSW8WEFyRMeD0AcSR5rLT\r\nTJtHRPv/ORSxpaue/7DhP5/bf6wxs8oI3zL1CNmx5e6rWZbMuQYE9Gm/dq1x\r\nHBkuktFtWXejRPzeXzDgx99cixfbLmkoOfDKwFxMNon/AvYa/aE7F+t8oczj\r\nyRmeWHCfHYrn5DN1LeWQGePflJ81vATuRpSZ6yIRs2o+gMmL3dq+y4HKbdUn\r\n8L/dwYS7Sr0TvPQKwzlc2rLwD67mGiBLiNkAKbcei+/BbvAUvGnvVU4a2Atq\r\nWxyROQP40UR5f8scP4u4VrdrLiVAM7WHmLfWZwUGWTz8zRYin87ekfAkdZYw\r\nQXpYpBriL5duVIa9gXcwO6j2rGb13ifk/Pk=\r\n=ZXzF\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8109c012ee7ea19712c4b657d048ff40fdc5c165","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.159","@apollosproject/apollo-server-env-mock":"^2.46.159"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.159_1648699521444_0.45027639804598896","host":"s3://npm-registry-packages"}},"2.46.160":{"name":"@apollosproject/data-connector-rock","version":"2.46.160","_id":"@apollosproject/data-connector-rock@2.46.160","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"df42c8ea2d93e743ae87dc13b1e848ad4e5f03e4","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.160.tgz","fileCount":158,"integrity":"sha512-Glz5GfQY14v78VnWkiUGvuivivizUwJ2ikAUZ5/uoBXHz4Y5aBknM/jMMz+hPif667aMtDU++O3hNmnYeUtXKQ==","signatures":[{"sig":"MEUCIEvza0F7pdCmdxERHhWP9UQ92HvJtHw5L8FEWJhHgcwnAiEA5fdUJZT53QLVV2qP0sZyePpXrflQhCTztQsl0PgctJ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1122854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSluACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4jg//R6/Ojek3A7FbfvMp7LMRXi4Q6vRgPHPFL3RnT7CvIEYUqhTW\r\ncj/8PE/GY0Zufrqz3t44IKi1loSR8HjOzHumc1NFCGmEIBCYjPRT2w/ObhVR\r\nYJBuMiMkrbD4pnbQ8TEJX2W1P6KgEjD8wvsx9CMpeAWvZ+wPIozVY0L6z9uq\r\nzAmFTfI+0Wj/yqXFuNwWIG6NmYGdyR7V3uwSjkuPxBfS8zTOjYGMqiUBrvRs\r\nK3gXuqx2UoXLJF2nJ2e3nbyGPRWNOBx4lGENQS2u+5Rxd2JVqoO25paT2Y9t\r\npvcZURrz2D3ycVP029eDkNR5UAabtXYOecikgNUxqq6on2YXxmCOf/P4SvXV\r\n5Ttc9TFItC+CXBNZ45WpfAADemgpXt0oEuicTIl0RiYA5ww0iDzZRfZXiNun\r\n2PURgeFxK5AKNOn55EH2iniaubN/7sUsSQBfUy/hhYlodkPBvXj7TI7Ie0Dc\r\npT5Df5OkebmmFc3HchATeRhhfDX42lkCpvJTmF+6IGYDpAOz9I8meFuLJs62\r\nUjikh3S+GsOk0DIH9RY5ATow64OqkG7At5RPViw0xUaSeUxIDqFmr0z+RCTg\r\n3E0w7kS51G8gTfzcXaggy4ozRGaOXmORUAk7ToK7H6CEWrYh4lVLK/ntu5Ad\r\nYwVsrxXEzFp/Cm+kRmH5b7f7lDf3UBTr6sU=\r\n=1CA6\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d7d5a359770d6ed3b1ea166fa990ab0e67e82d0f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.160","@apollosproject/apollo-server-env-mock":"^2.46.160"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.160_1648699757976_0.7788235546210762","host":"s3://npm-registry-packages"}},"2.46.161":{"name":"@apollosproject/data-connector-rock","version":"2.46.161","_id":"@apollosproject/data-connector-rock@2.46.161","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"e8cc2715e6c19c48c3f68bdc6681dcbf20535574","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.161.tgz","fileCount":158,"integrity":"sha512-IaoepR25mZzy+wisfDBDi0A5la6dZ2uHJLbBAyylOgBq70wXqEQ9PuDHUhfUsLOKYEyI+vRoxG9B4Uh26gvQlQ==","signatures":[{"sig":"MEYCIQDxKn+1ZpvH0stxc+9IsHdAYQGaxhvHYa6Y3+r72LFQhwIhAK0KoftKoKps5w8J01U6esOdDM6Q2AMW9rMuOwpJNl3D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1123042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSoKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqfuQ//SYuW7y0wgcT+6XGczxuAbNUYqaK3JZ0dlNh/OyKVYXrQvpH6\r\nYi7Eq0j5/N2L19M0Gym5W2gd2cSrrUaoUaoi2HiCl8tDgVIioQD585zNfHMV\r\nd5voJ2WUKsg0YSRkDFdS3HQGpZ6qqP9//1E2Tz6tuHoG9SRCinyWGiR+Gr2k\r\ngCy4dnBqwnQQrXUEkAeVxNOJqfDC5rRROHhU/y954tR9kScigSJ6x/4nlWUi\r\norcqcykW0NTl+acXp0pWfpMLbrur6bpCW1TeGOwQ++TO/7m0+yJuZyKeO92T\r\naRtPU1woa+EMgVWpELrtZWl26qVK8A/a8racfOy2L/YLkiVHdLkgux55MUSV\r\nvek17yQmNsvseNh42aVMXa2T7wghWovHoj6nYJYZl+ZOaTquzxWNF6c15alk\r\nzQSQDDcAIDctx3E+3BTZSJ+EVRRVcI9PkyaPGxtRkw1ppsoLzNEREoY9Xvaq\r\n+PN/2apZ3xZYEd/CcWxWSWoicYxC0gUG8p2g/hWiiBdNWGoSckWs7ozG8fZk\r\nN6VbkbcgjLcltDHq4qLrzSmpcy7CcSzDtAIPO/xl9XBGhx2uJF8WfOgJcBmd\r\nxjG5LQS625u5jLqxA8JO5hCAaZsVFNDcU4Zj6SeYPAX11uXPAU60DZw/k6iP\r\nurz4iLNP8rElgPBMIiFPvnNC5SgSpRS7Uuc=\r\n=A7V9\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"7ee8157b7aeeb6488c4e79847384cef9c7b17981","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.161","@apollosproject/apollo-server-env-mock":"^2.46.161"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.161_1648699913862_0.1286810371265361","host":"s3://npm-registry-packages"}},"2.46.162":{"name":"@apollosproject/data-connector-rock","version":"2.46.162","_id":"@apollosproject/data-connector-rock@2.46.162","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2169d97a6ef6f4e6b81d66f6f8a090d8615d3714","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.162.tgz","fileCount":158,"integrity":"sha512-s9jJeq3N0/LZDd5vVLngjvS5w6LzxKM9VtoV4tn5a3niBt2cYNwtz4J/Mg7EK8KNA+k8mHTMSrqLvBLZLSF9kg==","signatures":[{"sig":"MEYCIQDlErMQxnVY8rjcd10t7AbDp3MTxKFgJEgd/reNQznEuAIhANZc84NgAHqrKKyhHu8HpOXd7J5xdUKsk8R7PcWU1oBE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1123230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSqqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrnqw//dhoggSoDazN0NXqnUa3XEC8kvRycpjZkXGe5yPk5mgbg7OrD\r\nIo7k8mxPgbJ9hzWURLWEtOYGLmkPgCD70c9S0ipNyTk2hqgHjWbp2H8dagXO\r\n7+sfwqx6+Xp8+Fk9gj4npLerfsgX2cEu62Qltf/rm5QzUve0EaLJRxQZa5xt\r\nnVpLwdI6mtnZLfDrY75yAidmcdjjzmjPf4NUS7KXQcWhW6UAY01uP4Le6EYA\r\nSc8FCZL+nFezbjmeY4wGNpO7k8f1/KuA37bghr7trAMVTNYyi4Disu06s/Fh\r\neKSIyZwpaV0dxl/gc0ctaAcXT6a9jiNnqaR6VG7LK4mzazeU8an1TknTWVW5\r\nwChhRsP7BF94SyX7oyfbZCw9UUY+HbTnc/yeRiS3soi+2ysDICu9UW1xhSh/\r\nmEyKmYZ4kf60+UXBPNy+poVaN+ouyQIczgOzw4Vvs90CKqZ6LPVyyspAT6vA\r\nLqJ22y8DgGoVasdIkgrHWMiq0AZizRhDnNu8t2+lcaQF7h+v6H4fTWOEsJVf\r\n/rjkAdL1G2tzEPHUFo/fOOf6HSr8URXlnaPAIFdKoMkCTPgkZMVG363K1h+/\r\nSUKl383D/YQLNR+o911ABLZvlwrNbh+s904Db6rjxOknl8IQTDlEfTHDbRLd\r\nVZqnPx1u+5jn1FSrilMPEStLEAdiYp2xDh8=\r\n=AUA2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"cbbae594c23192afacf7e812d6f04bdd87b86e34","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.162","@apollosproject/apollo-server-env-mock":"^2.46.162"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.162_1648700073767_0.29738112998526134","host":"s3://npm-registry-packages"}},"2.46.163":{"name":"@apollosproject/data-connector-rock","version":"2.46.163","_id":"@apollosproject/data-connector-rock@2.46.163","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f327482ae1f967a253586fddb14ca2f856a1ecb9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.163.tgz","fileCount":158,"integrity":"sha512-N6KcJYckl6cDjGUmnCQKI48VTeSU9uEjqOptYrFpO7bIvJ2kbNj7HCcf2nYUPbOmZt5w4K5pstpbawBYp/yumA==","signatures":[{"sig":"MEUCIEA3Js6S7180p7mvS4Cgc99JkbOFNBN3hr4LrQjfianxAiEA2HBD7YcVkI0u1wZG/7UatcgDTlcpWluVMbD8EEdqTpI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1123418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRStqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqi1w//fJmXqnSTX9PW9zuKGnaFg8C3EQym+6U/x5ebRCRSeW2sRJor\r\n61bxMyioAdO/quTy7MsLYJjhmuclZEbQPsQhoFQxtMv/JGxtKLiu8ByPWdki\r\n7ioZTb5SPXnZZKBKixrg0MvytE+wtc12/GVOhNmEapIv5VgNnxZZAAK5RfCQ\r\nQqTst4YwYJNAMKr1QVNEmlEU67XG5iYG/BEz3h1BzqJIrIjD8PZGBS3NJ8LY\r\n4d3l6jE9+5ZXJzDBUjbaNqCbJ3eU2A/zmADQMpiX+C5hl/jkAPYMSZR/kS1k\r\nxSiQRsQQ4sldH0X6i6sLY+uzkdMIdurozBnWKE26yO187bgFW9PSyMpzDnKx\r\nMOmaT313hEZfxFoLOSrfwtpuOPCI3xen9Hul6BfUlWMH7yKohrfiBaU6Iw3W\r\nt6JPbLHanHvzmp3dbwfOFYJCvUJy2boFnttnZzTGtZEflOWF1n2wpwTDUnrS\r\nVo9kgVRDa0jJZ8WFGXwjOtFzuYpdsjWaN4ClPdjK16z39fbANL7suC6t8144\r\nmINl3HPsMh7Pgmr+71Y/AkoUNva4nZjvmK/clAKFG8D13L6K8IYIMurQjPFr\r\necp84JoJakhDvlepFsLE/CssfsnCEA+jfj/wNhDb2nSljbMyCgiRVbgb9ves\r\n4EqW0YKZzg/fN7/OP3icsmGmc8m2pTIZkQg=\r\n=XJtN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"02826c214e04b88798be9041aa51d7532593e8a7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.163","@apollosproject/apollo-server-env-mock":"^2.46.163"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.163_1648700266621_0.9821838584538656","host":"s3://npm-registry-packages"}},"2.46.164":{"name":"@apollosproject/data-connector-rock","version":"2.46.164","_id":"@apollosproject/data-connector-rock@2.46.164","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"b3651aeebc08f3c8f0eac08ae07948e6a7e5ad36","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.164.tgz","fileCount":158,"integrity":"sha512-egWHz/OOsg/59dyirKoRaubL6iM9WcUlu5mBixDyQjUpo3hn9ljv+fiYLQXpTiAimxZaWA5ENXfTLoVjKWjBqw==","signatures":[{"sig":"MEYCIQDrlTBTCu4V7KGHxbHnLwSyvFgDsyRCc27FeMi/5NyPAAIhAN/1UpVkgagZtW2lDEwmxb9tERDUBJWryxpDAaFufU3c","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1123606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSw0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8Wg//dy86liKm2roJ0Pgq5abSrEmKkuqcAEvkiTxUQOPty2HcXCHj\r\nk9W29FBvesQzUk6h/4PCFTRCfxYdR3Y0u9Ag3eEw+1HnBOGqBkuQ0dmKryLx\r\nd+6zltI+vi/lCumA89adZh7qqxlxLb3RbT7bjLSnvxDXFFP3f4c0cV0QGeBv\r\nxO3CHZFBV/SOfkEOYtgWcD2RfnvL3qMZYqpG1X88A19LjZ4023MFcZSbTVB6\r\nnAtHpLaxHr3QhII+jALOAPiW4w6k/jJdzxjmYCx3vRlqtuXGynoMu8oMzgK4\r\nJ4zHfIGJ90uYC2QwAFmdv2fNk4T0tk+mx1EnQ9RSC3ivtFYG9T5O8Vq2Piej\r\n+dH23YmVT4nC6bND3MdiLJ12rkIu9/GXQPzmB+FgCh3RbSIIjvmogm+JdsjZ\r\n9j6ILGPn6AXro8bzDGsOfQ8Ikh936TFeGT5Hk8jw7/X0lbhN8TNyD/lJVC5r\r\nBEbV45cDZKxIoc/QFiNll9glroOK3d50uwH/FSAIMaba2XwPWzQGmnOz5oms\r\nDildX05taXArZ0wrBXw7qU2gW1Q2k8R2lLOIoLzTHefCAfr0z0D/IK4Chvbj\r\nSUS2/MxNpPBLHnYKmUhYCej1ZZ6U7G0CHxgmi2lOpBtKAPlOzoyznZ73qUcT\r\nhayNnEnAREqSa4npwsQyhEapGvAvcNeCqFc=\r\n=0qJ+\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"1b413456ea127cb192e4371db1c50c54d3ec9920","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.164","@apollosproject/apollo-server-env-mock":"^2.46.164"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.164_1648700468185_0.29928669603771874","host":"s3://npm-registry-packages"}},"2.46.165":{"name":"@apollosproject/data-connector-rock","version":"2.46.165","_id":"@apollosproject/data-connector-rock@2.46.165","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"3a0e01dae1b52425c77ff58c6889952609a39037","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.165.tgz","fileCount":158,"integrity":"sha512-5fDS9Snc6pNFF1+OhkfWYt1wuiMrq+sWuaTd2sjgNoJpS/tGzEe4fBUIS9NTDHi2fqdeNYdipr6xzkIwTbgUHA==","signatures":[{"sig":"MEQCICNBiPWt2HONpsUCW6P3AU06TPvn8DpCZA1ormZfMqqEAiBXFxtv3e95bYAAFyc50jaq2NDcWKPakils2BkVb9IcRA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1123794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRSzPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmov3A//VUKdRUWLX8bEYovu/SUTi+YghcA+bqIfdObYmHh+ZaPi4AZW\r\nFswkGiNBKiL8MG2K8fkdZwz9O8jGvsLlXePUvJA1SkaISUNWnbTubjNyVCuh\r\npAd0107wqBmd1XGQqrquPKGOqAtLRDDfWcfhlV2xmlYqBx/HdfYqIWDLTbOs\r\njaKUVdPaaPTXXi7hurxzqgN512vYf2bNSy4dTKRCUTfCGQp5t3LG+dxy2mpE\r\n69t0TYFaBiY05Ih5K91rM1zjnJdOZ1ykNzXx8zQxq5M+Mhv2NVrM/0zH37lg\r\n3QhJKaIIiN4iZYkS3MDRtVY+cV2iND8/7Hd5VFjRfBPs6DOC83L0jyX6cFQB\r\nIuMTydvvIhGHRjqcWZhqKsNUgyB931VMPz6zSPNaNxDuWsJXz6vVoBaIpV6j\r\nJGe5bgr9izPX/qrmUWrzC6PlvEa0Ru64OQ59ufxJYSoSkIif5lidJ26NfZAU\r\nVtwKUixPVaSGCjQj1iphasETMEnfeWX6zi33zPiq3KABhQhZzonWdb1R7ohv\r\nAuIu5BOjF+rRzzBeHXPk2j1wBjm7wu6MqfEkKfkqPMIciNyfM/kwXx5EIhJW\r\nACP20NyBblpsrBS2S9bAUntICGEfk4UHHHlqIlCNSN0+rneDgm4hXDWnZ/zj\r\nmp+tXxF7xztAkf9DsoEOLxVUdpaoPJQobBg=\r\n=S2uy\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"b654a8ab63fd5d8461fd0a02f92e367f034dcca3","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.165","@apollosproject/apollo-server-env-mock":"^2.46.165"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.165_1648700623203_0.8714162402040797","host":"s3://npm-registry-packages"}},"2.46.166":{"name":"@apollosproject/data-connector-rock","version":"2.46.166","_id":"@apollosproject/data-connector-rock@2.46.166","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"959db5824d8984b514129eb5f2f07d18b6ceffe3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.166.tgz","fileCount":158,"integrity":"sha512-dum3aN5CnIQNPyN9inoiKC4jxdyfcmpW9/1ahy9Ni/fKo0651j3JP+XxYAVNCbeW1N2pQWaNOLJCboFdOCE8qg==","signatures":[{"sig":"MEUCIQDWFDiXMNrSnNZ6vJ/OK76UPKGTL5tKx0of8bShcNO8tgIgLjUAXIHuRlH1pRkMexuid27siLg60DpTasej1E5iTFQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1123982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRS13ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmok5g//XaNQUaevY9kukMGhdXe95OEe3deOSYqzpY1keHyXUUhgECNq\r\nITRZusbwMd2Fbgs2AKNGLWnNYMrzbWo5o+uHmr7L0aR9pRDK500lKpdsZEcP\r\nLSWTFwGk93ZmX9/pvlbiQGomS5KMD449yQ7tj8+9cZsLWQ8+fyd1+9j3MAjI\r\n2joZfAYvk8u0ZC5wa0iQnWsBh2wW3ZH9Lu510uxvlVGXmYdAnTLSLWvmHXB2\r\nQvHXmAiQx/WH0tXvdfg+DHFJGbIa6AgEcOm3l7lgCV3MlGJfnkoW1OThDrv5\r\nno1Js2YAlveHGdeuWFN+PHnA3RhNyZVfOSRQ6Mdq1agZBhRseqQRViaoqfzU\r\noS3uR1JZlwZwaua79cQc68S9z2CeEH5l7YcXn9AJyd8PJWxTovk9u5A9Bw8f\r\n+WgcblMkZ9GI2rpZNkh6cqT+JhIUsNFGsaWDXYGRUPDuu9wkh/W5ImOuGrCL\r\nX601bVnWexsjpMrAtY0zB9pzUZiqTjVfRYEUzyii79aFvSf4tDMMjBwwh7ue\r\nUDk+vX0ao8IhGKxIt05xZmnNlmicDTOPvJyZjQ+FveG3F5fDRBXGjtxl1D94\r\nIEI/GXaKkAwpkjR0S2lFKOlxcSjxPOecQUXhpQ+0gtS3U4VfgDLYWbxrkPFx\r\n3HFzyvLhM9qvyMg1Ica03g8eWnXE1CqICys=\r\n=A04w\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d6767e9d503739cb5846ddde3843b6f3c4986e92","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.166","@apollosproject/apollo-server-env-mock":"^2.46.166"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.166_1648700791406_0.24619168730986996","host":"s3://npm-registry-packages"}},"2.46.167":{"name":"@apollosproject/data-connector-rock","version":"2.46.167","_id":"@apollosproject/data-connector-rock@2.46.167","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0366107ef65c10dc3b75095a5a8b6459a415e036","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.167.tgz","fileCount":158,"integrity":"sha512-pNOBKe0WvXWMBYsrJ0X6iRlcVL0eCx5ifx7oxSxhddrucXfue8CeoVQN5MeS73qJ3tLrU8dS9s0TZ9vsFtsaEw==","signatures":[{"sig":"MEYCIQD6BEeAIYvjl7ZesJURdE7NiX/lhDFXjEdAf3s0t0E8TgIhAPRkubHmBnZ3q94h3w1NrT/tZ7VWWTVmZrB5xtjkMYDw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1124170,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRS4aACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpd8Q/8DIYtbVhG1p85SpxCVXOyAtzqzoRdo4FSF5z6xKiGQQjz/0QW\r\n2rSKAfRiL7km1HGJgFr5ZCyZW2htttRXN18otyEdfSrcgE/vFYPmW8OGD3/U\r\nVIK4bX95kFnEmYcctsVd5DXa5DWfqKay7rtqrPjoU8M5H0QD9Ol5Sd5vu3HP\r\n0vUrihgV/TvWsbvlrezJiVNg41B3xYP3RfWXa64uFyYlTW9wR6TpOButOpUf\r\nVmShr2JC52bKaMjEnGKcHs8ZlbaFM4309uF1RvXf4fRD/g0BFEG5W0cwmjUW\r\nGVscrv+Z+YMcTj6RoaC1G7DYw1PP9AtN+y7gSexMO9jIgYgDNV6mwwBUHUXb\r\nHJhh5LkX+lwxh1bAyNMFhRpDaVjXBRvOwHKPCF+T7AeoGUaixnlUh7ibazW0\r\n+bmgnmNjpCv/fKPnP+IDogwpyTu5JbV5pL4fsoE/ipPG6babiYPAXc7RF+FQ\r\nR7LE0F9X67y/wafHQ6Jm737BIW7KU52BWN3m5LDmBicnfR/xXs+8p+4GrvDt\r\nQxwk5qnSnXHR3H+c0qocRhOUpsPSMe7k5fQBX8Q9Rv7dSzeDxB7QI9oqqXvz\r\n19HKvvQ7NaCFJVb3XV0j+aTWEe0pvo/oxRKypOu2mSG9RLblToDz89M/x2tP\r\nF81lSPc+A1SmVAnMdQhdmSM3KJRBLahAZ4o=\r\n=++Jb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"502676b403454c64d60093d375b6fd0ebad932f1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.167","@apollosproject/apollo-server-env-mock":"^2.46.167"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.167_1648700953795_0.36696402215561164","host":"s3://npm-registry-packages"}},"2.46.168":{"name":"@apollosproject/data-connector-rock","version":"2.46.168","_id":"@apollosproject/data-connector-rock@2.46.168","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5c66410e6e6e7a3fff8c2cd1fe79649bdf138108","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.168.tgz","fileCount":158,"integrity":"sha512-bkLGrxK+zjoDRMirtEXwF6LnVqnHQDU5FSXoyhPYjL72wYFxjCd78xR1SGm1OwndSrXLmZBAvv2NOo8KaVQhUQ==","signatures":[{"sig":"MEQCIE0K17xpVMqHoTmosXRRjFs2ayrxP8HtHb357h1b/fbQAiAyKGRQ/Le9BjKvxCvq65iVVrj6BiEJBvdEWZ/M7AjofQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1124358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRS7oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrD5A/+MIgi9VARLgaJuqWCF7S+hjbdqFnHcGqNusS7twn2knk56iZO\r\ne11ZdtRleGPChZ8Hu/HFVulWI2dLxX9S3KcRkEI31aakA76JYCEC45sxnqrM\r\n5X2JuWkVO0JKC+7e9UiuRglt2G9nqfV2MuR+k+k5JZTbTNHZ7O6t3pT+Z1yY\r\nDzBZz3+STb3VSADsP5zVQ5QXA6JFcKr2IoW0q3QMeC95JGeOtL9KEjpL3897\r\nRQzjeU0/keeMw8DZMYQnEnXNIc21BB2QNHIPIizpfJVwW1Hbj3JeSE5FasXa\r\ncP/3s/5xzX+ZZXWEWuvfqFLRGFI1Baq2s5ULdFUVWVj0FMHVYpxt9TN0wTu/\r\nQrjEj2qwht8O+1oFRA6oygqkBZCwypakJNTAAbYa6pQZbReq0eY/C/rC8ZGE\r\n/1PMZe7FTnMxbN55iI5+j89n44y3i3gFOSZiGvSV6hjsgHl9wWAWCpu9cb9y\r\nKtjYyn4cey6HDHf1yfdaFKKJO4Ra7FdezYVveIh9xpFbGppRjALVcv4l5Mrw\r\nKW8kTEO0lTnDnXcz3vc26CdmhcQd2nDduDC45bu6U9akwdmNsmcZWwL7hRhN\r\nvE4hETqwAyas1WumdEmS61FwzGRAbugLPktLrDqII36obJq64RWuI6pX2A1F\r\nGohvoZ9RPHzXL32ppKzP90whjExwgC4BzbU=\r\n=damC\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"5077c01bd36be58f9d6e569886b8684583bb3a21","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.168","@apollosproject/apollo-server-env-mock":"^2.46.168"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.168_1648701160342_0.2870980010926589","host":"s3://npm-registry-packages"}},"2.46.169":{"name":"@apollosproject/data-connector-rock","version":"2.46.169","_id":"@apollosproject/data-connector-rock@2.46.169","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ef87a9ed8e04902a06540fb1159a21dccfa6d810","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.169.tgz","fileCount":158,"integrity":"sha512-r/KieX4AkWO6Ohwv+7iGVEH4aFotWWZ2gbP6d3kIexm+BdfateJCGUfHSHibn273c6+qphxUq2EG3TA2bfgMIA==","signatures":[{"sig":"MEUCIQDqQTvcTld9jZLSI2A3UaXRf9ouIVeJT2oFiceseHvljQIgOSz8yeRwOtXITUoiy0tWDEjQT5SidIp1ijkYGjGRWoo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1124546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRS+EACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoxdg/9EGhDvC6iWJf0bw7Jv6GTt4p+RZzc9YNd3RVSXOgIPBwa3rh8\r\nUSXbQx0DdFUF1D+NBa5hR7s7Bpd+H/gGFrCSgxOPYeeVD6kLMP1roxGNCq5r\r\nTQTEmKOBVH1tuUhET03QuFF9ct1kgiMP1KcQ1iZlOz4GqbSStRZthYCtl9js\r\nSVgvswyiMJsyNQTnYOEOJyRsIjspHJy84pu/h0cG+hik9v7iEiFGdZHglzVL\r\nBtfYsGSk7Z87Q22wuPO3tlft4V7Uwu08BW8iy0+nQtFub4n3qBoszI866Mik\r\nH0fByJM3A8wioHqgVJf2YMSm/kSX7tfSaDI9OseQdrZgmJngodxH4ZT4u4Ee\r\nUMcim+VpvC1nhpUC1E9qqM+syMyizQjDsBLwnrU8i9q4Qi3NZFehXAqw+mXm\r\n9p36UPGzYn/lQEdmtuWN8z1BZqA2hvMIvus+/hNIyD2GiJyawNRKb8k2WZrj\r\nBBfVwsNT42J71lEfaheHJla6U+gwKm9WotvqHTxJrSsMmwQskZUm73yHx61C\r\nexYQxjxRmP4DAKB7IgslOe0sqawOeLcBAAaQIG6jrC0EP5aK8nylHAQj/vFJ\r\nM+bH9fv5D/1l2xgp+q3cuSw0RyWzo2lVcngOz5QRbDocGTTv7lFVcig/J870\r\nNbvyZQJ8Wn627EMbfFzCIi/qZCgGcoegAdE=\r\n=IM+j\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"3c377f8656f66cdb1aa8fe0d67bb14ef46f8af24","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.169","@apollosproject/apollo-server-env-mock":"^2.46.169"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.169_1648701316675_0.5417146659051686","host":"s3://npm-registry-packages"}},"2.46.170":{"name":"@apollosproject/data-connector-rock","version":"2.46.170","_id":"@apollosproject/data-connector-rock@2.46.170","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"90390dbd1176e8d86b47ed7a649d227c0b5bb650","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.170.tgz","fileCount":158,"integrity":"sha512-LndWikQ3OzU4qyF1t/Z+PpJHWm3fCMgtM5oXJJGuN6L+4quL0yE/pL4SYzQYcbcQEEwLP1XUmY/n4DJRJa7O6A==","signatures":[{"sig":"MEUCIFCeCDLLMVX7UbkAs74qRxysyODWQDHbGzs4+CifVeMSAiEAnXqyMnpbOZfyVnKHtCupFSZJJh2nJuBmRfNaEBE75ps=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1124734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTA4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFmg/9Gkxp1cUktGqVmoCZqYT5OwRnOt7nK6xLCahF6RUElBPzfFp0\r\nZkSP4xsK8YYtc0x3sLzPYvkLAM8UlTbsGEqQ+Ms0/LhXqFvmSk05Xxdh9GoS\r\nhXmew0x+JCJV1y8eS6Brc2moy5VQxiUsntsgsG9wXLnF0skU4x/MbAtye4U1\r\n38gSSd6kmNzgGPMwLVDLxTGkl7ywUyeQqA3vR8aLdsSFbn/XN9rU+egFCBhi\r\nzaJZElGmnitFhbB/xvrjpBmITHUujB+E5Wz6kGqBOO9NNj/KWr+y3Gjhj9/5\r\nl00NIvv2D6m9wjrX9mWvwZ7Rw2V59bwGJJbj1kpECe5b6EromAn4pTTjyILQ\r\nQuSIHrGT5/KBox+JbWQZUBVbgzZFs0AlS2yhL/yui4MGD9yIYMNuOmy/xang\r\nD+cdRfNyAUAWRYsliAbWxB4BGU6ptC+IOQOUN3ldhUoTMhUXwDUBbCfjCzHl\r\nRCWeDr4Nod4/FIm/ZydEfx712bynkWQWUNTQl6bCAiAR7kRfAPzM+0A8Yu8N\r\nPE2n6H5jEauHMlfzp9MNaooqDBhOg+eI1l1mg5z7ombvyAySAy3R1ZWg616v\r\nCLKNKCKzQIBJs8Bne5YpDGz5b6kZJMOEQ7QwGa7qepEUz25q5s0zUDYJubs/\r\nUcG0i7mhK45JhK8Atjpf1t5iyyod+i14eQ8=\r\n=2k4A\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"1f219b74183b511b2b7b54b04f033ae12ef186d2","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.170","@apollosproject/apollo-server-env-mock":"^2.46.170"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.170_1648701496036_0.8684699050009248","host":"s3://npm-registry-packages"}},"2.46.171":{"name":"@apollosproject/data-connector-rock","version":"2.46.171","_id":"@apollosproject/data-connector-rock@2.46.171","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a7c5027df8f09270669bfa3b483cf63caa16f58b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.171.tgz","fileCount":158,"integrity":"sha512-dWhKt+2hutQLEI7LND9MstahiQwKOpg+EaQ7qb0PtHv7EYdQs+8LRgCEDlQ2VcnlRdTnt3UO4qvWReBFHXH7eg==","signatures":[{"sig":"MEYCIQD5iSZ5NBcQiCAhscK3rulbDHgSG0uw3P1UXLfFcSWD1wIhAJnL+6hU4vwpuTQlitxOs6GTmmLUz9c0EqYpXoifp7LP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1124922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTDeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmotmQ/8DRYUwTftJW3IaG+G1S6j7DmplRbkYN/l2IB1dxin6IC6bB4l\r\nimKWWDVGEkHEFRcSAdgSa0QD+ZdWrR8tNbjUU0/mSfHsli5zdx+g/BvUBiEm\r\nO3BBGd480OiYYDJwose6NJVT8hAXUTehaIUYB+4ekp5fgz8B2TQFqd67SMu0\r\nIi/H8Fl1soiCDqWTXqu5Gyg6dEb6bnZ+4ZGVTTkbzoH6lGOtAmZkK/rnV47M\r\nUgu8mzPqwQ+Ris+8tu0gbTEGT5I/t5K8ZDC4ubHIYLRpRm+x/tHMWMnHroQs\r\nwRDevXAxOwYkmeecotxYSQbCmjVcYAvu72s90/mdXNG/SGhnLkd8genHn0B8\r\neitUTWQhFUXdI8CvpdxkiWA0GqgPSKwKUG4AfWSOAKPIQ6Gn9hkH9gooL5t6\r\nWwae3mIXii+KoVllvktDNfRWprEVfPTSxzr2xLX7nSXXmdT1x2Q6D/C0eEX9\r\nE2q27Xfz5qNq2unT9VHaGq9k8K9+2O6lOe3m2GtkaBt3x+GfeZmCs77aL+/Y\r\nodmcCcOZRiEpXzJL8eHgx+jeALFuSPtyq0lm/cs05fWGNTTFpkVSirKR/AZI\r\nAVp7rzekeKC0BvJrZXqHoHmAbV5UsRScpta/Cu1nW0al8eUtv23pY3grhT1/\r\nLoCRx+iQBLKUyala27JgmBcQDy1yni36APY=\r\n=7ZAe\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"412a1c164c0d6402afe5bfbcb7335904c1909582","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.171","@apollosproject/apollo-server-env-mock":"^2.46.171"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.171_1648701662434_0.7928218105963096","host":"s3://npm-registry-packages"}},"2.46.172":{"name":"@apollosproject/data-connector-rock","version":"2.46.172","_id":"@apollosproject/data-connector-rock@2.46.172","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"13f1a4e3c0db2bc1dbcf581f571f9d4656864db6","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.172.tgz","fileCount":158,"integrity":"sha512-MYRxwqJZS6uGBCbHEI1m1bSuWg5wTobRPPBlY6yGzlU2w+4WSOSnRiUCee6jWGvNI3k/E2/MsF9PQgzLAo/3dQ==","signatures":[{"sig":"MEYCIQD0WZwUgMGMODawu/GOmaDfy7kcIVpKjB4wlwDK6KaREAIhAIPaP6LxCRakb6smPmoKwZnOr9lKtExEHGhodEfAieom","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1125110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTHXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmomRA//T7wbaletflgZrUC2mrT/Tdzf4w8Nc4gzBNjq1OVm/BlU0oiJ\r\nvytB/E26jEUZLMEcw7y9JXLCLbEkqVSSD8Jbe9PuNi8DQF/50J+PKCEqpdZs\r\nUfwupefntrVD7T027u9lz0a+XnakUm8xk9B+ZzqSNN1eT6IU4hxZVOZhAJuc\r\nkOIYPmE4MYCGXRipLIUiRdNvGvbASn9lTeghweZL0YXTj60zzKili98y6b+F\r\nDErW4jgRjJDCagr/BMGzzjArhYBxGOxiZu48NaIT4mywR6HgHSK21lPyGtmK\r\nSxFEqeKhxKRIozavENW0KxI9+Lu43QzHtvB4+jouCLMPVwGGSY3g/+U5GtvH\r\nEDTPaAWiEgViAoMJQsMgjEg1yUc6RTsCFTNpKSWbrrTHPctEFq8Y0+83GVGJ\r\nO8QujTN/ohlabnMM4lQNUiQ3rG/4CsfMMk6JfbucBA9dWq5LGWXlU4KqTn5X\r\npXWgurtYm94gCzo6LriIt8jD2vu9S/4Nt1imrOKURxouE1+7evY3fKfbrljj\r\nonn7ltmePIGg2aeqnfoRZS87qGbyRX1vObJWDg7saIaULIz/pVAtGugz3nVv\r\ni9yOu5NnS+K3MiS09ryygIP2phmoDARoqbxRyt1NQaxR+OyKdjyt0/vYvh6q\r\n1i55YdPwK5bj893bI1QmwXUp98msS0Rt8tg=\r\n=DmLf\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"bd29d663ec91ce2c1fa6b39dc1562bff0767b1d6","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.172","@apollosproject/apollo-server-env-mock":"^2.46.172"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.172_1648701911178_0.3121792072609202","host":"s3://npm-registry-packages"}},"2.46.173":{"name":"@apollosproject/data-connector-rock","version":"2.46.173","_id":"@apollosproject/data-connector-rock@2.46.173","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"95857ba530e632c2d5913494be4b5f885f8054e3","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.173.tgz","fileCount":158,"integrity":"sha512-E33AV1/WcseBTMvODCFhWbvuw/dC7oYjvdfLFIvftDXzLK8Q+BKVIK/2l/K6kfpdUSfzJk5ZPejHvzAMw26bEA==","signatures":[{"sig":"MEQCICAli5ULrSJXlinKf7NR3Jy+T3WSkKHSNuAktZAYhxPXAiAoEibO5PbxpIsj2ak2f2rhsRuo7XhXZWoo4Y2VY3hDNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1125298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTKLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHWQ//adpaYYCPamQdV/EIIAH36Abtfv6te2AkvywJ+OY9SHQ36f0S\r\nMb9WzXQ1dnO7WQ830Zpvij1kprjVl9qeYr895bY2Y1YtJMUxwvFWUQLAgpel\r\nLQyzWlRzGmSUObGklhAUXeh/Y4sq1OySdz2bXTwijAfze2X8CSVEZjDRtLWc\r\naf50tQUfUFcZ0qFDd6woYeVEPtaaxeEmrm70KHTIsyXCFnP/VXq5KA4WJXSY\r\nYIgklL6TXObcaTEornyUj01iCgjGNuWXmOzjvjOUTuUxZTyfFwNvM9dVvbY3\r\nf9+tFm+qcjfc/QK0M/XOUQRNbfI6Ro4OxeN6gs6SkWJNmFJ6c7OqN2aMY9gs\r\n0QFnAIwpxBvRYsfoLMUnB6yMmS2MJsKiSRVSJPd2sL6B/864WYQioEJyXqEE\r\nqayTifKaxYNhqUf89xVGZnYxmbaz9sbL39C2V+Bv4TApziuLVg/ZCzP5xW6b\r\nras78Vil7opLJ7EFi6nK2sia8mSgWqe5oQ7eujXVluux5WU9tGszBPWDz1a0\r\nJ9iCutEtPo0cPuWZLY2bPIybsv5vmfy9HVeZ7wtFA9Unw+vL9lLmySxOCUzq\r\nFYTl4gVvJRdM/tx50J2+al8Ww62KtR1GJa1ziaejE/OssycjiGdGotBf0bOg\r\novUE88I2PH1Zw9SXM8AT0AY1RigSs+YJ1cY=\r\n=swRb\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"92610ad8d891d78f50bf251926e897f7a9be6634","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.173","@apollosproject/apollo-server-env-mock":"^2.46.173"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.173_1648702091107_0.3595412101224329","host":"s3://npm-registry-packages"}},"2.46.174":{"name":"@apollosproject/data-connector-rock","version":"2.46.174","_id":"@apollosproject/data-connector-rock@2.46.174","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0cc31f4c074d648dc7e15edcc8703bd2d36fa71d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.174.tgz","fileCount":158,"integrity":"sha512-eRxyPigSGsSk9NtyDK6VCz9MUUZmKYFC6KRqeX5pR2C+XjUl8gFj6ot9mUTIIuEAEBceKG5s1SYJY71zT+uz+w==","signatures":[{"sig":"MEUCIQDc4ODFG8DKQ9u8fdwrh1vzQ+O4LC6/ULOXK1pc0Iu0XAIgYw1WjpZ06CRKn4Yswh+NZfIpOvtmj/yI8CeqdFRUXw8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1125486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTNaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpo2g/+LIJgWEZ/P1hsEhM2gdQp7C54gvA8XamYSNjEj0Q9Nf+S2HY4\r\nTIwhX+UnxFKWKA1MIX55LibO/a7gVERYSZfRD1NkxZj5hlNJhhfFnS6PIm4e\r\nGHqt58d1yQNvovSEa0sdfg4KS7LWzIGMO12yazJWJFHkElDePD8QbUfrz8F+\r\nIduqudKmiqsgetC0Q3m/0/DSPO+PNANbEW6unI9LH1cPsBrwIrCu93dDIuN9\r\nk/5sTsmgNE9rn8jMDzJJeFr/6Ubkpdw/+jrFV8vyWVe5oWeomqwyG/1bxreB\r\n4plBh96ui3FvWL8h7TvYgmjW7pbbcViJ3GuXsWxOOOAPHKPeh8U+bX1Lh4nd\r\n7fBw+2TFGQyl4a0Ky2Mntp4lJBQR+7ZNymLg2lj8N6cjP2JCUtwfOYtgSHkL\r\nIXoXQL3unTaO/GnBnzjo+sQE0xHN3ckGLBBf2YTaV0tXUruS00lzsFhFl9Xw\r\nvccP1lCm8SPmyKyj9qgUkrKsgjJC+orKV7YUIdzuhooVYNydhvE6PxJePb43\r\nl1S0iUFHeTZzYabIXk9WMuGKp0F3IAFBXHo5hJF4U7uES/HFiaUcJ4goNhqU\r\nT4RQ9LKkZ936BxEr2FnsnZvc6UrQ1wamgQK9A7xAcPEULnoni+y8twskeCZC\r\n7f2QyepL6bdrERmXIkimx+FsnQVtrBJXGfQ=\r\n=9blD\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"7e44c73ead4d42ce091c19deba82456633e222df","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.174","@apollosproject/apollo-server-env-mock":"^2.46.174"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.174_1648702298078_0.10600050722313759","host":"s3://npm-registry-packages"}},"2.46.175":{"name":"@apollosproject/data-connector-rock","version":"2.46.175","_id":"@apollosproject/data-connector-rock@2.46.175","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0a1252173451b42e7b2e32eac97ea1d74e06d066","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.175.tgz","fileCount":158,"integrity":"sha512-lgu6et+IVOuaskhhxpS2pnjcFxX7smCD1iot+ibxAz5Ez/3omEhOIMIeShYmpZqlaQkEz4yWr2YyTd8U3LIBbA==","signatures":[{"sig":"MEQCIAEIOd24uG1q+FAc12Qwen5ig7Nqnd4aguLJOi0u6LgxAiB5pTmGua1Jf/WyQfJvDmOvnxhgAL/1WurGLt8vGxw2dQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1125674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTQUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpqYg/+PvuvVvqGkLbaMODqlK7OJSJOzLzfw9ag94CoHQwHKCuSWXXb\r\ndStVKz8OVfYAMRNzASYsk8Xm+2EoPNvYFkzuDVM9SS59H+mb8l5U/1Qp9eeu\r\n3i+hYknMLuO0yP1zBhXO/SjDBPIWhxZ+i0La0ACiap4j40peJCyPQRLbNYvG\r\nfhqNnfnNk//IBhgkpiY9la0eePOJIjNFnRe5r4y9HVBwNv4b1+Fr4jtCjwxo\r\npR7eZG4OzLUY7x4W29l7Nugf0B4+eq8AFn1Ph9I9iluc74vGUKrH7dzqMzqf\r\nI4FuAuP5Yh3AsooIXz1RUxTDObSy6Jzuhummau8ge6OrOV6Tbs3/4HGLql4P\r\nTwXmrSPPdAN/FaDheoxDuphmEn7nvmSQMh3xgzxXgsKJhZzYlEV9841A2e5t\r\nsh1xM5eYU98UN2lfQw4Cm3EeLtkNkTC2SGXbyODSdow24idZZE0g3voQdJ9H\r\nxNyigRzq4LXo7cPki7wHe7nkbIv2tvGJwlIDphTeah8ZLOpTze8drm4DoXNf\r\n5aJnrbKVsJf2hNmpWzd7ebx7JtTfMoBL1+cUogHGZqpvvFfa5xFjfYr05XnT\r\nE8afFwivyeQ8mu14OgQMtuVaI/bsbATqJh/tHCgcKXAVG1cjTJyfO8Y0qEU9\r\nF4iEV1l73jTFiAsA/PrxFZOUogdooJnvW4w=\r\n=P7cK\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"62dc1eda03c493dd53d65479f60a3c28d31dc62e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.175","@apollosproject/apollo-server-env-mock":"^2.46.175"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.175_1648702484700_0.5187495135585467","host":"s3://npm-registry-packages"}},"2.46.176":{"name":"@apollosproject/data-connector-rock","version":"2.46.176","_id":"@apollosproject/data-connector-rock@2.46.176","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c2c97000d8b3aaeaf5234b9610e8685ecef0e814","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.176.tgz","fileCount":158,"integrity":"sha512-lyy0z0rFhZfP2XkSl8O2ufmU+LLxStbNEmcbv6edszmUcdBS/GMrXzHpu1Noq9ednkE4hTXOWp4r9Jw+MWDMcQ==","signatures":[{"sig":"MEQCIDjzH8PmYTc4j93ObIsGRcALMP7JFRH/6EkvARfrfpefAiBMJCZaKdJhhQgvpMwap3zGlc4B2a/j062YH5X8wpmJOA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1125862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTTJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZ0Q//Uuy1QeP+OLI2EWw2jHc7H3o8nEAL2tWjnlR221UNvuYAZ4Ye\r\n5nPpu5pZE8fOzjy1pLIPcXpntfVmHCUmhmSKbCPpjAht7DHWpmwAnST2AdQi\r\nN+P07jJecwHnu2eUjgyxHqedtzclU3+CNuX88SZvRsap2u+bwRUZjs241ypV\r\n90m/Sa7V0W2hmvssMUL8aTQ6kpslnqyX/Ng8LgN3h52NpmeGIUIKZke2l19j\r\nh/faFqsVvXAjB+VJEGgc0rXYlvwourBCshSyoaY1uKuvfWV0Gb4S/yN4VgoW\r\nuQoo69Bet5J2blhjetVLnmYp24RPe+Rit+K74qfPnudwAxPgrBml+/meOclG\r\nEsxpyb/HHTFV3GvP0q4tPyMKpxgNy76QOB/Qfl/hwfc141hlvR0IVYPM5oJc\r\niDuHGQOM45NfUp2eafXvEHCfbvxqsfs08kECV0MH3G3TwQEiVVAknGKNvH7U\r\ndwWc0+xlvYi9AUw9N7vAG7hHzcIm8QArKsmDyTVaF7GrDfkqiOr4lwEHoYnY\r\n1YDOIp1K8CELrLavrEWKN/h8nk6gEK3207DDdbukppytW15ejKiNp6Zay8n5\r\nkI9gyEIKUag4zarJsgrCOCli7C5B9vxF/f+FfnFXdCZzqEZ55KhoYzSn4NGq\r\n+SPkrmnlKv27MOaaMwI5Itwz7d9uS9b93TM=\r\n=7uqG\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f445a837b1b177aa3dd0e5f26bd2d16aa3cc8845","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.176","@apollosproject/apollo-server-env-mock":"^2.46.176"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.176_1648702665283_0.7212269567205243","host":"s3://npm-registry-packages"}},"2.46.177":{"name":"@apollosproject/data-connector-rock","version":"2.46.177","_id":"@apollosproject/data-connector-rock@2.46.177","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d77d233a78ca3d2a43b07a7568eb7eb5a87f2a25","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.177.tgz","fileCount":158,"integrity":"sha512-Lx0cIakffU5ktBAvBQ1uK7EPXDAFcfpgOHXOPtJCk/9LTXWCq3Gd7ExxePaXfpX22ao/cVSyUSciTawSTfKKvw==","signatures":[{"sig":"MEQCIQDXfIWjQ8gFNL+5pADva9gAOzaBUZc2E+sDrhdQautG/wIfFVxch5n+T8veePCKFNmP4kuMsNEAzM6DDgw7IE4nDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1126050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTV2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUDQ//cXzBB1TNxrOJWAgETl9fpyYA0fG3gY8dNeDzwUnX+FeH8Vyi\r\nUl+jS7S1ivNjyRhbgEfai0I9mIAbXQRpE+HrDuI3o/F6Ea9w0aLJVGQLVDnG\r\nq46igbia74suguPzAxy3kohnEiWnt3lxV+pU5+b3P7ZmMerwynsKO0xyY7Uf\r\nk3vnisNd7vu0i2mUqqjQt2Xz4quuQLpeg/sYKff59lUvAxzi5Mtb6nGUxD+v\r\ncTex1ft6mr21H3tQw0fpbmQBTA/xEVkkGgjaak3xM8woYqqOJTP+TCb5GQP/\r\n8m3L5Avdbf7jERA6qfbLWmcusz4i1aPGeaz38DOWaAVoMqaaiVcn/73NP+IE\r\nuI+ZMvsSEY4axw871arbShQDWdB+r7mC4hN7pp/0b2HIr21vBhmJhZsK+zgC\r\nWfiIHQv9m5R5EVzkxDEHqaGVkr4GOirbV44CCMBrJlIfYXPcWnDgiC5a+7Ik\r\njDRQwnyjvjIOAgPh5JVKwbbwQUdLjAWo99rUz+Nzq0jWTK7R/Wy/sMjD1oVp\r\nbjVjrxxVxW1LKPiMkGEWF35wcVpxVsUDI6a/x58dnInYr3/2AZeh/dHmbU48\r\nLMsPFd2fEqZwE4ZnJQXEmbWRk1PvC5gbQ78EX1cqshd76/sBJhDAmgmD/lTO\r\n3mFL9Byb38nW4NZRSgtqETQlNvklJ6ydH0w=\r\n=yZUH\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"cda5828d5e92c136e2ef0f330e1d4789215c1fc1","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.177","@apollosproject/apollo-server-env-mock":"^2.46.177"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.177_1648702838072_0.11280927897084747","host":"s3://npm-registry-packages"}},"2.46.178":{"name":"@apollosproject/data-connector-rock","version":"2.46.178","_id":"@apollosproject/data-connector-rock@2.46.178","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1d9b521dd9ea2b9ca08b82ffc8b69b33f09e8621","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.178.tgz","fileCount":158,"integrity":"sha512-ZBC7AX4wGv2SXR+aToUSHx83bgU3JBcN3xsJJEWim6+79WuF82IBSG4ivPDKTP30H7A9Sx4DMABoGaxpnLE4eQ==","signatures":[{"sig":"MEYCIQDACM8RwlMQwOOBP9fwiG2MwmOzKmVDKB7tdJY99bVKAQIhAINC6s1YKC9bgIOWxXyCEyKvhR/v23KsxF7HkYrUTJiT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1126238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTYvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHFQ//X/DQ8N3ra2V58DpUkK4HjZO5yaNRi5FTr/z07F0VtGxokNdC\r\nwV8gue3bLbuaqxGPE01qta+ujo/Jqw1E9tIzCqAMbYhYhvGkbsyU4L6mk8mx\r\nkAHyXVri2Rox3uz7wIXlUorsmS2oWIr3M7+gJKw+A2h6mIY1tqlJAbFEIjID\r\nH0HzderrqZ587qhGvmfsKkUUOOsQwv/oKjxc5xCfE6GM9kaL/HM4bOdi+K/b\r\nkPPGCa+bTBHLIsq64TCHNdjSm2wyGPLnAL45T0maNux3co+i55KozNoBWQLG\r\n4W0ecc9i2p6n65tr1Mo2VyA+I2eYW8BMfiN1H4aq12S/XuaMFEBJ3GpjR2B/\r\nyGZTTneaYpWVl3xzzkhDu7/RBW/F2ao5jGe96PAgCNxmgXASaDaZcfTHQQDa\r\n4x+iopZSKq1vNDUgcLEqIn2/fEvVUsPbYGWq2uwp2kLykVi44lnX49bBu6wh\r\n0ZyI1mHp0dJwaXSamZvcziAkFJuhw3CLrZqkxM6j6ixG47cniDaqcb0fa+pt\r\nKk70vzIT4Ju52vufIaU38Vt3TpKla7p/ifmAUCaHNFscNw6+EP54N+woF+HR\r\n72Fx/6xbYxAcfGh229VfCdTsnpNlxQMKkqz9VcUsTjw++0qQCiAexFyI/oZb\r\nMgmeCafRoKHrc4NeW+7OHtQgwnDZb4oeDZo=\r\n=Ivq3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"f1e682d61c9eb0a84ff9769bbc376cdb8288fda8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.178","@apollosproject/apollo-server-env-mock":"^2.46.178"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.178_1648703023007_0.5141681683058652","host":"s3://npm-registry-packages"}},"2.46.179":{"name":"@apollosproject/data-connector-rock","version":"2.46.179","_id":"@apollosproject/data-connector-rock@2.46.179","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0064cd0af2aba79d22cd9867f75a97ac1f875214","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.179.tgz","fileCount":158,"integrity":"sha512-/TZUF6ZyO3j2jjBPgz9ebfWPlug+0c+G8R+xgfT041CrCaRDAU7+vlWI6hM6kYwXHE591hmCPlAPTBaRyfQ4uw==","signatures":[{"sig":"MEQCIFULmU3wKGM/PDB7g5XsWhgPatOqwzlKIceT3/JeeaAcAiAPTksFwRBDAvD5hHTcF5u1nvCWhtV42pL20HE5lt263A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1126426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTcNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0Ew//bbnTNJaPyo2i2u/X1e2E+Hbm5RtYlX7GCe9wBWF8KFt75MF4\r\nhOs3nolz8HqNZJVpWhfITc4LZIVWiKciH5kVx8O854Wnu9k9OqkOvfBsoHJv\r\nI0Mz8hk1GnrxDcpDrMP8tmY96efZjVZjgsNC77QkxUzUJVMX7AAe9wESz62t\r\nYzunegVm85NE6DSsGSNJimWz8OZFWgNZrkfwy1kEx585b2vDZBHEMB+G8+zx\r\nJRsqrW8UITfWb7057Ij9f9YK/hYSBVlgYPv4qbe7tIc5X5HEKx6KfnLJTfxU\r\nMY+43sTmPwvvZsJoQmSQUKGCOiC19ObL48xiJq8M8HRbirUnDWRzrKMvx0uq\r\nAQxFSwoer0MFFEnGkqjNFp7/kcxZKWnJyD+4rb5dUNmJv9mEbeQL2ht3TX0N\r\n7DPSB/k2v266luUeRPKOzU14GFS4w54iGdfNMIl6KGj267FnM6CwsWNNjbte\r\nSq6goxPYiQVXLXFulMuuUw5WtGvKoq0QIndGrpl+xqlM0wOafmYK7RTEBuXX\r\nqLoi8TrBUMcFX8c0W5Mq4BBuHM6/Un5dx36KAi2KyYHqPKAYYLKLtzAwfulG\r\n1r6gDzVsePJADfzQ3XZsLSAGd32jTXrVG+qv9bmsm03hI0L4A7nxt8jP/G+k\r\nllgpxsStgNcg7lC8TPyDegI9hn0np+EyWiE=\r\n=jloZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"b6e9a3d9bdfd821f305fe51dc64660562a59371e","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.179","@apollosproject/apollo-server-env-mock":"^2.46.179"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.179_1648703245212_0.6248800545494857","host":"s3://npm-registry-packages"}},"2.46.180":{"name":"@apollosproject/data-connector-rock","version":"2.46.180","_id":"@apollosproject/data-connector-rock@2.46.180","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5fc2dc19c8e46963a61692ce53e6e0d11f2195b7","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.180.tgz","fileCount":158,"integrity":"sha512-GOVIohXQpfKJ8FjLevwTn0bpc9q617RuAsltRwFX+kMiARS4VMjAh24b8Wb7cdOHCg9nzr7l7UdIfKVXZyIA+A==","signatures":[{"sig":"MEUCIQCRc/9h1mpe8bQ37MLBdbfSRdE8qf+6QTn35N0r7OXyGAIgZ3/KtiCd4oWvyR4ruJ7+M/5chxwGCO1L9Njmbdg6fBY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1126614,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTf4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLEg/+PqwBTK/ap9/6SDH40PzWLsfFOLb9BiRmiV+MYVuT03b6A75k\r\na+YNVuyTDhuXBVFqQ70MWbM5jqPNMKzicbOdWnUmXOokSegUM1bLOERULO9r\r\nfH2awKnM5g23MsYoip1zQ9gF6MKs+Bk/+BVPi8Yr27lBruNIOvvF4lJm8IpN\r\nSSezV2lftgtneD6aeB1LxQ29+zJKEB/LJmgv9qg5SYIfrI0GxPT2ZsBW/Tcb\r\nKFgnrIrEPsC4n/agYPnWV2xWhpYJWsnrJRITGNQyZEkX6LWTNwYp7FJYiexA\r\ncS5nPzZvpHudxE87FcDBG4DuteW4V4Q0Szcn6RY3xhLEhAVcIvCPrpv6hzQG\r\nQpV43tVozixReFj0X2yEsly9gy7dAGGgX3A1yArhgmtQfkMuN1KVaUBUMDzK\r\naV+hH4wBAMekVgLuQ/f7U1ZgGCVBSDNa38UpsesZjgaY5hMPTlJ4gCmu9mIC\r\neatNPWXMCOGjYD9m0ZDGNepxNq36XllXWoH4yWLtTrHbURz3mgk8IC05vW7j\r\no4iv88SM1cOiBmG0pQrOuNx1XzG2dl2o2PTVjG9T2qX8+NNs1WibzupjhhJl\r\ncbTYk1bRZBU2kFycUS9JSRE5k0ZPeqBZFicx/16ay2Cmci6P2LPndvjcaIxh\r\n+8iN4Y4zBkklh23qbHikB9u+0ihUb/OBImE=\r\n=2uLi\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8bfad9951a9bfe6521bc982f6d1d813c5b97eb84","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.180","@apollosproject/apollo-server-env-mock":"^2.46.180"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.180_1648703480438_0.6372589243894515","host":"s3://npm-registry-packages"}},"2.46.181":{"name":"@apollosproject/data-connector-rock","version":"2.46.181","_id":"@apollosproject/data-connector-rock@2.46.181","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2289c8db115c7d46c04e32026a28f46333b38471","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.181.tgz","fileCount":158,"integrity":"sha512-LU3RNyLrs+ipa+WPJ3x2hBs2qnZFY8W5SGqrLVxVWrQvwqHJ/YOAl3cYozisL0wgqRqbxfgGx9ymsFy5iEyvxA==","signatures":[{"sig":"MEYCIQDFNoOCJ8hwCLYd4JrxKtILGiUtC/Fvolw3TbxaX8OyVQIhAPga2Jd3oUC8SSZkBhmHIp9nZQxDKYLU3raJUn5tdK01","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1126802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTiqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVBw//Wq408QPxn6dhjs/D6v86jw6cbSQ1IlIqhnhJAPAuBrg849Zr\r\n6joR6UgwQ0X5Vjb4oyI4Ab1XJ+mLYNruS/noAHeWd0INH/v1Ckp+1D5wkwk5\r\nQes0MInCHZlWRXDO1mXkyV11CDLnz5qqR2lT7Bwz85XS/C4bh2kXFhUs6shI\r\nqZKTfkgaR6vxpXCQFAyFdbEy9XLolAnmsYsMZ1d4qWSs3IS5jpDfXm1bkPtc\r\nb0bZ1epkmzyxnEiaW7MOn2mztOjjvZlaiDjRKKBTZ6DSi9bEGUMwL9n2SyzS\r\n64IJM6d/vIr3+VpBTiN2gBcxZoL7/1YuMh98LkpiPlg+iFTmNOz4Z8falo6K\r\nczqfjLZ7OGi9qCRlEjkQlcMMKli7A/XV5n3EmBNjpP7ZznTLguvtgp9/eC9O\r\n86iWrbf3S7uULohm1PsVXkY+Myz8RQeRcFvJ1UkWinb5eZL1IV1yYqAaQs2L\r\nriZiRaZXBXYzhn4LiQHZ9hWK0RHxFAjanXy4t799Cyd275VQSK8ocgGAYRoM\r\nU1FKqtR/BSNiCDl1NIHJxMEaemHQeAL8ywShRubq6YhAEIaJRbvXZb6pq9Wd\r\nqG8lHBLqt4G1g+3so6DhtI+hHD4qxCGj2GX1qvue+n45917vDSZAx1w5Dx+C\r\niHiPU3D81iHuIrOuNcTNgZGd54Cc6O+jb2c=\r\n=7M7N\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"29c26de92452f7c96ad8b8ce764e9f823d9f8d32","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.181","@apollosproject/apollo-server-env-mock":"^2.46.181"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.181_1648703658493_0.9788041843296773","host":"s3://npm-registry-packages"}},"2.46.182":{"name":"@apollosproject/data-connector-rock","version":"2.46.182","_id":"@apollosproject/data-connector-rock@2.46.182","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"d820a430a7be40022ad147b76454bbe7a34cf92d","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.182.tgz","fileCount":158,"integrity":"sha512-Osdo+yHCPXpYO9dpBEbgaNnZhKwXoauCbUKW9++JX14dj/V01ZSS5kcM4GtjrmXB7e6vnMxWWUfiB7EAiMpKyQ==","signatures":[{"sig":"MEUCICPz6RSaXyWz204pB+SQk5Ptg+v0kotxpb+mZo9lgOmSAiEApaY2lsy7c8Fk4IQQDEQvk6Vtk6Q6aZ0deI/oT0D6DpQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1126990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTlpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrl0A/+JqOJwQOHnF4cE8Z8ZtFaDnS3PReJ4MBu1zsSwFEH4QIhqr2/\r\nh/DNOiTMTSrn+w1AtbXq2HuI9EXOKhLW/tDKhRHBSHSNtq4n/5+MnSeLtg6y\r\nZ67+YYFiwo89pNX/Itcm2NKmNhouO5mh634g8vlsYjdU/qpqxaqgOaAUGPWX\r\nVL8m2wBsZvHPwJd7cK/Y/tWQBV/y1dDKpqHY9xbt0edw3Z+0IGVCus2eWAAD\r\n9RUT/x68ZlYw6/fVomP72wkl3j02prV6pbgosGiZgJOjug27+qlW5FBBtKwv\r\n2P2+K/6E5afElg205hES2Ga/rVS9G7q/3aJuJ6fBZaEQQq3WPSfWsYz9puiE\r\ncIJ2ad9UYH+vOAycbkVFJ07XnFe6MOsHYY7apKlbavGq5nFhJakbbyh4hRRm\r\n9ePWJvSPcGTEw1Z4pm1QnOGxM/pl3XydRFWeIHdo8E/GsRadHgn4eTC2Bx70\r\nvQNsnvIwj/4IOrdqfZRtzkpmzRGG4k9iUomme2+MPwD2FlIYxl53CTLcwlYc\r\npYPtbQFPKcpvOnqx3TvYGuZTmRTrFUHyni21CnfKlCyHcuqj+aKjlkTFeVZI\r\n3CeuPp6LJ7nTbUtFsgtaP9fl3BsoIY1oGVzD+60aJTr2QH+9y3gof4ENy1c6\r\n/mZrKloUqEpDLfcm68E/TjDlpDfa9NQ3qjY=\r\n=aP4g\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"207014595d071f7ce424ec739fbea8ec2daa0379","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.182","@apollosproject/apollo-server-env-mock":"^2.46.182"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.182_1648703848936_0.9650249581649941","host":"s3://npm-registry-packages"}},"2.46.183":{"name":"@apollosproject/data-connector-rock","version":"2.46.183","_id":"@apollosproject/data-connector-rock@2.46.183","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2498ee24a31770f90b5337a8526c3e93056dbb6f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.183.tgz","fileCount":158,"integrity":"sha512-39ZWn3qhvVi+MCcSPZHdkYZTwSHN0u2SUWCs++qx8MStWbgYy6p1OYKNBCk5HBFfMPnr+NMXntOJ5h6RduA6WA==","signatures":[{"sig":"MEQCIDa1frsAbF4tS1ncgAht10MJubR2RM5ZPDnezELPMaNWAiAScDnZKX0NS+UASgXXXKTHTLfSCJ6LORajWZr7aQ45cQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1127178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTn5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqrBw/+KUCN66hAp3CFrkKz1yNUXw/DWXxL3hjWgf7ofEMBVlCrJV/G\r\nuDxuelxZLeCtyCbAWVgAiVAhVbasHF5hVMe3cF5CdeOSYCIPlxqwoc2y7Zfb\r\nB5diaXyl9DlADQjLXZ6KPxm4BA8l8/Lql5VQIib9ygpVE/jSTfwaJIOVfmt7\r\nAUEH90cq5TKFDcU2dpbzN8zmyQh5I+00SJB03pLPLDgC9FsqH3YmJJgW8oMz\r\npRJnkjY40LOzBidOdZTS82PkboVo+TZUfr0pdnMxCtfmdxhXeGtj3CczQU+B\r\nw4nz1hElD5lqT8K/yeMh/9Bs4jFPGB5O9SwYJQiymNiPeqXqnjefoXPDMkn4\r\nXbqhn/Rw0GHRp9zVPW5bsIcYl8VRNNmck+ssMTHzxi8NkMaugGP6SQedpEIZ\r\n3+/HZf76KTO1q7CQBtObgGhjeMh6j84qbddyfZSAxd7SBTT/Looi1FKAKdZr\r\nM5HMe7BmFk9JZ0/w8gZGMAAvn/HwT28lFel4/el5kRSYBYeEy//vqnV1befs\r\niTU6JnTCRAx1Fut5HGsZAdecbhAi5RbCI5S2YLuy9eJ3Kv16OuqMPy4qRHXs\r\n4r9tV+pWVr8B95iRqax1uyGNMGz30JNTasmCa/XwYvz/WgQKy85mqS859d6R\r\nmGRQeZSHIuWPeBO4Zuaju/7FXjn2nhiZflM=\r\n=Gzh1\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"3b433f03e166271b128aba5845fefba1a0165de0","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.183","@apollosproject/apollo-server-env-mock":"^2.46.183"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.183_1648703992998_0.10780075719261495","host":"s3://npm-registry-packages"}},"2.46.184":{"name":"@apollosproject/data-connector-rock","version":"2.46.184","_id":"@apollosproject/data-connector-rock@2.46.184","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"a65dce978002ef3bf9b71a549fd783fdf3ea1051","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.184.tgz","fileCount":158,"integrity":"sha512-rY9kTlWJs86w9WYVUsM4lxZMvOigDv2w/QhBDnzXf6QUp1qnnzQNowTznwtfMnCHehiG+66xwKh0dRZebFsRBw==","signatures":[{"sig":"MEYCIQDnn65BRzLyDKMLGQdyDoJdkX1XlOHH+UN2EznBfGitoAIhAJ7iyz5ZJtnF5RBfYy/NXt5ZU5RMQRq/JYkQCcCGpmEc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1127366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTqUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqachAAnl8BW3fiRpj+GrnRhZI6sOXScO/75kq+6wamoXneRukWTSd3\r\nrt26vjrgKjsuX86qeQkRyM90/5lhed2vyB+840LHw4SFYyGoOxP41b4U9EDE\r\na1vZoHor2dYBhyM0p4sZXd2yXcLO4RhDa5cTnK1+enMon8dDzbPyykkuxk3a\r\nujFySxmpxPhyR7Igj5bls/ROeHMoyLNuX+SZxzOy/cLOXX1i9XPqB2oWfxFC\r\nuQ8Egjji4HqiuUxnNhBvlNgyO3EQdAj3ips3OpPiKfhFFnOnX2TCr4rbkQQ2\r\niS1nFP8sxfOenBNrgkzLsF6mBYzvGnypvUklfI3qvGamKtFl/UMmXnZyvIEX\r\n6ZoegTChOsicIWJ4OtQZITl8/mzb0Gw8ahoim9dhU3g4c95c9Ef1zJp+HY10\r\n7flUha7f7PM71tiak2qq2hK6T/ZA11F9JJMU4XZGyLArxo64Ju4/R2bMx5gd\r\nuLTslZTwh0+H8XwWZNUpj2Cgd094uojVVD3tnDzHF3YrS7optvzwznXjXaTG\r\n2Lvp0gPgUxrs0vaW+QzrVgzIOjQFPae2/iU03ppeEh6RBmd8kOfCeXctoFV+\r\n2kmULGCJ+MFX1lgzznCGaZ8Or7gelA6RSaOlZGAlL/FWhNs1QzfCOuTllnF9\r\nRbDmqnoDB7TdbChnimWwA88JxlNtSn38uvM=\r\n=MIxK\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"e8a4443439661b949094a040e0156230e1c29f0c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.184","@apollosproject/apollo-server-env-mock":"^2.46.184"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.184_1648704148163_0.21160334203208309","host":"s3://npm-registry-packages"}},"2.46.185":{"name":"@apollosproject/data-connector-rock","version":"2.46.185","_id":"@apollosproject/data-connector-rock@2.46.185","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"5ecdf403b4a7fa6996d644f461ccae974f582571","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.185.tgz","fileCount":158,"integrity":"sha512-cwn72ai3QEKKJFY7gB1995NOAXrvARKdtxnL75rufHHYu3+Qckad4r2udy5vDYCE7C0ty4mW/NZglGG03sfLaw==","signatures":[{"sig":"MEUCIQDiNuO1GUb4rceq9Qu/hnmEDYRhwUnbct2m6Q99GOwxfAIgcKFI5y0TR84hUFwn4IR636SxVhbY9M0970bny6PGA0s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1127554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTszACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzdA/9HYcgbdxn/75MK2fxboO1u/RxhwRdVg4plytheFm42/CUW1eD\r\nvdKUAPn2Mckea68t95zDj+87/7Drd7ozJknOvhs/J1+TXaDQco59Bp4RUqUf\r\niXApyEf8n3pCwd/rjGGI/sZust/ujwtJQuDn5Flao1Bgc19bk2oNrPsBoyAm\r\nss8Nw4V5M2BQqt5UxbTI07qxqBYKVzO+MOnZM+UdDnim6RZm8oEjQqzjORKd\r\ncv/JK71RRPH6ZnFgqsBv0YONkjGH31Y5KvulU6J8BWiccY6AjZh8ekQUzmB9\r\n3O3RrtJ5QHMHmU3Yyu+ICD82UPU/Whz7VipxbhUXO59bXXVje3qskcUMDIqO\r\n2OV9iw0gfJq6Hg9dWqC+LGpKoyxssrkRKtkPWbzbOd8E9P5403eUidrnK+jO\r\noxZs5I/PEd1He83wY5dkRPN7Ed6Hl5h6BwWwHsf6uIFJENZNtJqxZ52ZyEQ/\r\n9FWXqIjHn9Z4VPKZwlhWUILald94/iKOOxSmcPcRsHqVmWN7Vzu5dp4vW0VZ\r\ngFHG9hs1X/awJXqE369YAos6F0+Bhb4F5UZnetV7T5tffnbwgqM7NC36T170\r\nL0kg37G6zkOH79FSjY9SKFEXyne5C9Ew0rYfmYuzuh3+UuK8xCo2YY/Tr+QX\r\ntFt+6aZuF5yCJBM5wFpIV0sj70tAgZgLV+8=\r\n=chTv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"956fcebfb7e005f77a2776c917c0302ad84ca93c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.185","@apollosproject/apollo-server-env-mock":"^2.46.185"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.185_1648704306762_0.9742654921024099","host":"s3://npm-registry-packages"}},"2.46.186":{"name":"@apollosproject/data-connector-rock","version":"2.46.186","_id":"@apollosproject/data-connector-rock@2.46.186","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ab65b44c307be83b3976d041290677333078b611","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.186.tgz","fileCount":158,"integrity":"sha512-vG588C6W8oY/t+Ta6hV2SxPKhxGwh+4McK4BxK1K5CPeqekhumHQgCVD6AXQvmPBFw2EjETav5m52bzzeVC33A==","signatures":[{"sig":"MEUCIG844Kp7ptuIt4C3aXytrZ2nXOdz6GpBCqzWPx7Kx7oUAiEAv6XKaNAaT1gHRDY5+9tZKUyjpg8mN1i4yJXpRpqMZto=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1127742,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTvWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmraRw/9FuerWJzX+fRYv2+3XNpoQyHwpZfKr2hx9ZvR7hgWRVF+1P4F\r\np9v3XWipr/iYxisi1ETRt/VAxkT8DANIxQIMQrLxRVSkjHswMbb4VypFICbW\r\n2WZx2ug4Gp6yeosMKeNsZEV762vqdJ8S8VQ6pcgKzrn4F1sLIg7xPnqGuVfR\r\nlFgkmy5eJOmMRyIDhncBEmOqn0JByoCoV0kTWl6xDG4gg+jP+6zhnc2+I1DM\r\nsVA1NKIFBUnewIPl945I2aiFbAYURwUES6IXqrW4E16TLvaMoSfTgQCQX/U4\r\nCBjJrBKj/S2gfsyRTMTE493LTLJ1Qeuh3IlHV3+/gb1rNNtsEP079Jbe5Ppk\r\n7cL/Q/bjFt0RSIygOTYPWVbe32YgepKnaNK+nAFVlsKHgl9Mb/WmCcD+zIAY\r\nVsetv3fyy23C014tArXvoXotQl7I+/zeAukbJJ6YmFqs26gvQhycNv/qwV/R\r\nsaUeIQPYmxiQ6P9Uw07VTa6uPWmKKoINiRS8OtkePDIZVbicH8zYOywmXtaZ\r\nyIEE6mbEH5pH+TZcSVPw6La8/G8l1ylMMEB73kT6IfCpGT+v/4cF+8dm/jZg\r\nC4RToH1xYeA7HxiFDDibX6tDuEhCaEav6xB7JZ/W/+z4QAMdn8Ru0OCiKXpA\r\ng9TAGBDX+SOr2Nxak7Aa+gS0m+rkUAa0B1U=\r\n=65sN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"0fc857e7c10d9c3adc2faf0d1cbd6bd9672cce8c","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.186","@apollosproject/apollo-server-env-mock":"^2.46.186"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.186_1648704470646_0.18111320589643398","host":"s3://npm-registry-packages"}},"2.46.187":{"name":"@apollosproject/data-connector-rock","version":"2.46.187","_id":"@apollosproject/data-connector-rock@2.46.187","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"03911c07d04b6f5de56dca7ff7d9a349ba91e59b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.187.tgz","fileCount":158,"integrity":"sha512-9J5t93FEg0JSh1jXzYnEBUgLXG5+f/DEnZJM+j4BI243+18PhumvqLyQv5muTTast9jw4Icoscx92N3rAN6TfA==","signatures":[{"sig":"MEUCIQCLuTUp0Mu/OmGGhGl/57F+UeJ4R1QRNqc4yvjtIOGmPAIgdG+nR2QbG4tphEXeqNX3hOIZAGA1254Adg+Qls/Z3+g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1127930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRTy2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQPhAAie+XY3le+lRbvSPwONCMqOXsx4SEgGHy9S2hYTIf7jduagc/\r\nhQYvDBKnwDMeQr8A84Het6wTYeByuzka7ruCxrLA8ahTWBG0dc0JuvtzdChU\r\nlgxHkv7lMkEuj9rwbZG7DMreiHy2uJ1s5DTgw2hi16IAMCVdNYVBRZ0oIMu8\r\n2T/AtdAxLu+dzIC7SiDxzp00F5mmiJTy0XkdaQe4YQzwHrH/EqRA3gS2zqWT\r\n/+J4WWVlFAmRfEte53xWmj8NkwB4lCsWKRxBukwu2saHbbJSx95R+OFhXlKD\r\nTjr4aOiDbZjEtfh3SVD/cQvEflhcYm9BKWEatMCIlUJfJZlkoFirDH8vVXKD\r\n3v+05ZbL3WBXL4ruQV7OfRw9S+b019O7dqMQVpB10kXcpUMj9xJJd4CRRbLM\r\nAiMeuGmud7h3Cm8rTb5eA4tyyksBEFRDFF6Cp4fVWBZQbDYuuR0C1QuVvu/5\r\nxHvbuMV6JOVIU4b1+Cbbmox7wy7fWbravlU+ls+wjrImXcop/xTWN1l9TWE1\r\nRMApJY9xVJ9QStdPHN57ihchU/uANpgIjGXAQhZAxr//yJg5/0gNtNsQbp9R\r\nISg/mn4kqK+Glw1RDfsLzOuAqmi80ZbCyRsKGnTXaHJEo0611o7Sauh5PBEd\r\nVYp0jLPbGHkzmUK6wIWS6iWsHQVsyhsDcsg=\r\n=fjYV\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d5ca2db73809ce3ce4694ede8be15082155277c7","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.187","@apollosproject/apollo-server-env-mock":"^2.46.187"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.187_1648704694116_0.08404110124765851","host":"s3://npm-registry-packages"}},"2.46.188":{"name":"@apollosproject/data-connector-rock","version":"2.46.188","_id":"@apollosproject/data-connector-rock@2.46.188","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"264faa354288271bddfd310c2f5a34f6ba1da5b8","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.188.tgz","fileCount":158,"integrity":"sha512-ROChtQ3IGRNm4nuUQoFbLcihhDl9u1PBihg/U1dEBbu6ES1J4S1gy/aOfqomCwpN2ud16HW/6j7sG8/uYHqbQw==","signatures":[{"sig":"MEUCIFMYbO9aTTccfd8OGK2aBG709esjnDBGtf6XzfVmEme+AiEAy4mtUDK63RABKituOmJcwHPUh8eJe1RLX3s0Zoi4+j4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1128118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRT1LACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmodPQ//SmJyGW3kzMjqYbkmuJhA6R8BKRWHd3tgxTUaU9F1Y4aN0NH+\r\nQDGWHj+ym3k5Wq9xKX9pFBSW5D+vBP+j+PE4hCHgfh7Uk9CdyTpPHH7qaN/v\r\ne0QvClNIqhpi61+8UHTq2iOhi0Fvn7vi1GVP3IeN8eyP2OyPJ5EXAIO38YAb\r\nKc2jR3XEahHmnxvJQn4Mr76xbCBW0cZ598FHbyyKcg3f+bReyf/s8UwaP/04\r\nXw9GGNMqVKtCPC/tEyk8MfaYldXJE+aB3R5zq1B4OFTY4jn7ohzw3DOEy+/f\r\nPvZ2vX1/D2RWLzppZu88pdXga9V5WNNWYsr200ZhExzqxEZa72t7JqO68bDF\r\njG/m9Na0LiQpbfU4b0r7ql09laCv90HfB0md4CXK8GEK7N+2Ai63/7GVEXl7\r\nxNvD+Q2kVY1HnNb4BIHfljCflNUXJ+hBQPZB+o8EHJjKmSR2UrKgVlepe/62\r\nJW9ZsVQomz7SXFjNgCgiPs16tRQrzv2TvS2BvKwN5rruxT1gSte6nIqvDJ+G\r\ndr/YYpWndWVfWUHVkmk16YK2Z+wFspf8vNKgQ9cQSCh/WsI5ulKNdMYa/duT\r\nCAEeEcr00czgvb0VFxz0KgbB9909BCf/ofgWDeyJ6KqYeEoRnyHse1ojUpBQ\r\nlfqyf+cA69HF8fCmIXBEs5rxwCZNc+JQTE8=\r\n=LFT/\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"0fb0bbaabf13e3d0a708ca953b9b645be10cb72b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.188","@apollosproject/apollo-server-env-mock":"^2.46.188"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.188_1648704843473_0.05551063937733214","host":"s3://npm-registry-packages"}},"2.46.189":{"name":"@apollosproject/data-connector-rock","version":"2.46.189","_id":"@apollosproject/data-connector-rock@2.46.189","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"0193aa8c521a6c8c5a447a00cb1272932114e895","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.189.tgz","fileCount":158,"integrity":"sha512-TEHHXWkrLnno80g6Tze9IdMetjsRyo5SsU59sPAVNFzFRga3mMaioEMDFPEgab6n4hSlymkxAe4M80o8fVQ+bA==","signatures":[{"sig":"MEUCIDXSAhUb02ZwAI9SzV5BCWCQNAs+StLQL7n8k0iXS2STAiEA9CC9aZwjbMbdoTzp0cnop+8eke8ZCygmOoAiPQwEt60=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1128306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRT37ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOMA/+PPKub/MiE8I1pE7vjF6OcGksDMbsKeyoQ0y6dKq6pFpFHs+w\r\nwlqiWOE6sc8Km2bH1ctIsNrcO6CgwBBt7QQDXbRFfIn/0ieBuIdVV9wZQDD7\r\nZn6RTWRJgfg991ISDebnjKoVz5+uF5o8ZQhCgxx88RbiqPz0T2eiz9mNNv9Y\r\nwBnL6EgcejsiGKgUbEpYfwqNACV3uYlRJ8Z4GjuYMfSXTArxLCpo+h1fOJjE\r\nWsMkYjiyvaojeA1/2zybMsMP1hqP3pkzSxduhL4gCrWxm2NdiSTOvx7XHHBA\r\npx9JJ9OBqpovvpz0ew9Gsc7X9CAKHQJ0cLzWuoPYWIH95tX1nRAV22zIOCI5\r\nM9VliE5ixnh7j7c5IB3TdBAjh4GorgIv2FC/M41jAVAoF41VSKZCNR9P4Sv0\r\nF7zwWP/VgAn3bPIMKY2xSc5L1F6gePWI/PVXlVcie7IAvT96Joortny+zR2F\r\nNsjhmSZcK7KpfrS8VqaabfWHFR0wzrtkO2HNmSBmTCTcU6RDpDyhBKzL7xnp\r\nrqQ598YopjROkss4dL4I1pDj+3ucYWMyd+ycUdAfeDBpagZpPlME9WdjwaE8\r\nyk+HAcV+bvCkdK8XsQBUEjIjhye7VknjOAb7znQXw229apNHXffWFTY3fYVB\r\n+MtlTOaBDX+32I/MLzJjwkqZb4dpYpUDNkk=\r\n=V3XR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"1835e8ccfe1737104e2d35e2a2147086e8582a08","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.189","@apollosproject/apollo-server-env-mock":"^2.46.189"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.189_1648705019613_0.132263858127889","host":"s3://npm-registry-packages"}},"2.46.190":{"name":"@apollosproject/data-connector-rock","version":"2.46.190","_id":"@apollosproject/data-connector-rock@2.46.190","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"7a708215f40ffb957e76bfe0ef884e3153a86507","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.190.tgz","fileCount":158,"integrity":"sha512-k3IYCf1yDnYN+MG/jLN3IveJJDBgRbkr1GUPk+/8+CPb65oXERGWIcVMQf1b/Pd5WRCw6OXpuKCCAFCE2uVCfw==","signatures":[{"sig":"MEYCIQDC6JjoD3CSuACeSL5JxLNWMwt3t5mxtoBCVwui9jVhKgIhAKn0AioXEE4PNuXmH+Xy4/VexHkEKkC+rnFKyMr3Hv7h","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1128494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRT6mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmopXw//YTyW4EXOa1hssDb34FiBkz4LK9G/JEGnqMSpUGCY6MaOx5eu\r\n2iZRqqfNdhVHXUdbqgjufxrHopNvZJFi1osD2hI9VPmK+TneFde9ePz3fteA\r\ndGdU6xTLpV/nYw269Zews+v+n8XGH1TpBhQF/tVZZC28ALiDhytn6hyCERgl\r\nQyjb75gXMgulZU4gcSmbLXeD1ti+vyBZTkH2u4uzbyp/3sCYoam4EqzfTSEU\r\nlAuT35JuW6g1cv/pc05soRtyFd26Sa1XuK52NeAkfqFQRk4V5yVAzRH0n9qG\r\n2997OejXXE/XwFilbTR/pymczA/KugxtQzk6mYJjUTGOIuDbTDbznTMfWNU+\r\nCINL0eknfMKdHxBNTz87VwMGhVfJY8rhA9EHi03FgBNYWRGsItmGWofnDqjD\r\nRbSUZjgMX1cxVJyT0mPQT+52XhVyXxZWoJjUBOinXU8MAO7JFpyO4w+4ocZT\r\ni0TFDRVeRLyKzpoMncB6GkC+TMZuROJBTbL5IIffGA4RHl7MgMx2SnGdRdL5\r\nW0DgZjo/wmgy5uGulkSt1K3kUQ8i7O2esSnCeRmKkcI48Fq10w5r9zvkX8VQ\r\nUFeN4WPN6/WrqxdKjQ6dvLcx3tu4U9F6RKlRuHnMPViwEP5yQKE4yeNPRAEV\r\n3jmEdoMlZMsibaYKUGcKOl5J4DNK1/scjUI=\r\n=ftIk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"019d5496d7370a150bd54d7e25a89f1b1b64d61b","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.190","@apollosproject/apollo-server-env-mock":"^2.46.190"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.190_1648705190489_0.13303211384999813","host":"s3://npm-registry-packages"}},"2.46.191":{"name":"@apollosproject/data-connector-rock","version":"2.46.191","_id":"@apollosproject/data-connector-rock@2.46.191","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"23da05ae91eb53abe5bb3149563435354acbf63e","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.191.tgz","fileCount":158,"integrity":"sha512-8+7dRVZSfHs9AV9ECP/Jz2+vSUdzpIfqy7oWmsaFN8sYkzXWX1+D87kvrv7A57iVJrwgMfvstTHsMINWoRlJ/Q==","signatures":[{"sig":"MEUCIQDeirxqX24mExRJYaFFgx82inUjB2zbhVlRVSbdIiqrXAIgHhkMu8GUxpFJfm4r6Q2FTDJ1lmWAg6ikodXyXTPX24U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1128682,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRT9CACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmob5g//XOi8EQ5KvAl5u/LToPYb512CGzPTzjFlxOQDd7Zm/jru4dMS\r\nMvHdKUspEQzDWstAk7KSjUl79vCEupUK3tjuRl16/8IbqzISQdw9wsQS6hIB\r\nqx3RcPeszPCzxRANjOROfDCiAPKaWhwFtbP4e+3nxQFwTiU0XEC4ZwDH3qjI\r\noybiYtpvmQtUxANj5odIwzst2qEdSk613sXwU3+NYVPDd2N1f9/Xv8DB/Tnq\r\nvc97IUm8cae8xAFmJtjOCHc0+LL4uu4RZ4j5eUsPr4fYQmtUsnWtpMtFHtLf\r\nBoscE1QMG/j+1hC3sWSHpsOW4NmJ1na3A6Pd39evYlHCl2jxQF2Zk1meIwPM\r\n4e2Xr5eaRV9RmITEaYLsFL4fJrL0/LzJxdf6KMv3z0hp+247CRtpL1Pp3JH9\r\npIdpqnVMTXnAO50y+iZOn+ojiFELqqTM5Xag0fsop+Ap9Ae0w4aiDUB+cbFK\r\npJGqdU8HGpy/VJXtxdEivhJktaz7I6MuJr98Ow7G0MjoOvNBLboqbcmRfuuH\r\niAycw5A2Tmi8XYDp6w6mdVUiJg6wshk9MWCfUBW5ap11z5NkxqMWlizFY5NO\r\nhqfMwTpCMlZkogrZbX/QtP1sCHmB/Sp38/0AD3HXQ0DdLaBCXN64YORlBJL1\r\nLVZ1uQUTLx05yhE+tlsRlM3m1CKWaWHaEMw=\r\n=SxyA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8324b843464e04cd7cd545a37cb6383457a2660f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.191","@apollosproject/apollo-server-env-mock":"^2.46.191"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.191_1648705345792_0.8888667967960082","host":"s3://npm-registry-packages"}},"2.46.192":{"name":"@apollosproject/data-connector-rock","version":"2.46.192","_id":"@apollosproject/data-connector-rock@2.46.192","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1845def62dfc1abd70b3af286d05d6492ae02654","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.192.tgz","fileCount":158,"integrity":"sha512-HYzNef4aP/s+yBc1reGX2c4LoL7JpytxovRya1UFX3dsuibtbqtZ5EAb2mqQma/WkR4OvdpdphqhdZJul1etOQ==","signatures":[{"sig":"MEYCIQC8wLLq5kqo1Wv2aSGE7i/vVzXBWzIFAlW2JyerF87kBAIhALpU4HqjS9JNgW70dH/zqczIpuyvW2bsTbSCzlpWq6pk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1128870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRT/lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrodA//Y9rc+dmmEpPtQetq0nixU+iYhNlK8Om/nej3lMqTo+o3oFov\r\nB0ucjEpM24XR2FBpmTAP1Vclrl5lOcT2Or4kH38wLGmUal4JV+ZEjGqq2FWR\r\nmfWS4QvByOpuYyFV4nC/xhfEm4Csptkbdqfvf3dcdtiiopIU5hMoAmbhxph6\r\nYpZF64lx5zFdxNTM3lYTJ/xTTtsMg/8hbEnfDZNTzvH1aRAg6RHSaqUEG4mI\r\nBy/SR2YqsPDcHtCMATCrq0jGPY58xNjfpR7HwfvaOsImGdXEclkYw77S4REc\r\ntIHryUmEok7BeWQg0RUWBPikMh2euY0+8rl3nq1GfB657rcSC4fZO2m8W38B\r\nz3TMJgzbJrfiFYRItouTJ/Tt7ZW/YODomMXzg3SAcjYwE4fBC4EnTOaiEUMw\r\nhfsAN3naWdtffb3qhMOk6HgxwlnK3rwEqDzfK8Nxl7ZGv1m/8SDWp0WyAjBh\r\nNLSPdOs3V55hk7LfMundP/HQEaw27WZUZnm5rQ3L5cKkC8JQyMlQiAeb7fu/\r\nxD8irJZfjvn+QqwZGoilJNHR42+XjIFy89tNWwUVMBY0roT1/d3n4gRDo3jx\r\nCMdvCzxFUP2RNapMf1JU7cjxXJnL7UBzY+ockt0BfgOjVCnW5Gfx/oWAHaUd\r\nN5a9GO7z8SNxCkToujqQ6QpHOkdjBiQcmN4=\r\n=4lBt\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"2d17456c3068820f95329c774a16a033a0fc7aac","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.192","@apollosproject/apollo-server-env-mock":"^2.46.192"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.192_1648705508911_0.037424909251020155","host":"s3://npm-registry-packages"}},"2.46.193":{"name":"@apollosproject/data-connector-rock","version":"2.46.193","_id":"@apollosproject/data-connector-rock@2.46.193","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"eb1fedecee4a4b05ccff33ed08e2dd4203a61973","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.193.tgz","fileCount":158,"integrity":"sha512-GMdvKI/wzvKqll6eDlei6sjStRS8nAgJpLabJh2Z42q1VFFXpKptMtX/gy3xZ8xtzDloOv+ZWV4Sr4TBvKZKFQ==","signatures":[{"sig":"MEYCIQDALB5aoTYgs6u4FdDoa+qsLUuZ+LFTVi6YQsKMq9CSGwIhANeS+JPqxQFqKLGek/9b1h2LBsKZRbxpinaDxIzj0mF8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1129058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRUDTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqi1g/9EVFxDI/s9b1Y5goxmO+MOsBujbsoXyg2qXbYiqLzSkucWoBW\r\noUJJwdfDTKKyJFdt6kOCL0qcApf/uAWxjFeORF6TeByNpi9rSBlGeq9DAabs\r\nki3ahz3YIcLfgHtSLTvVpWJvDxWXGszmTUVxJte29xzBuVDhjVzHuRB3EOqH\r\npeIAR6ChyDJgfJKNahVQnmTy1G2/V6UI7yUhJ42NW5xhyOJRqU/bF9s4dX2q\r\nNaLaHznl+I4ir6qxR1NC/kLMqvLqPJATkaNKCelb070xjnwEwBYZ7zbNgutd\r\nHsRwm4DnTJkqkfUwtWdgb+sFrtvfHtVmezc4dolfR+W1rZ7CVPuJsvK4lVXZ\r\n3oUjtsbyE6WrPkuWH5E8a5Z+sXUhsPa0kShqQnyTjPWG//w/uLeVGtuH7hOY\r\nCy2JQKu/pcgscqoWyL8vwjM4EIlfk9Sg1UPcFrFX0i32ueDU+ZIaR+4kwFQe\r\nlDrr5ECCtJp9BKE1rH9/puWBPgjNtxD7b2wxf948VGJxwkSF/h9tIymbj8g4\r\nQ3nNNzlkiYPxS/2X5HguQZXL1oWvMtfr0HfVoy6MjxtePIxMkZ9bAuM8Ejz+\r\no10sCQ8AbDi9Rmv2hTpKLFpgsiQf6kt/tmXjS1AhaNYofWbppveTZT80XDuC\r\nAiRsl4u6kHQVewXgB0pTf4XaNdod8ivrrMU=\r\n=caWH\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"b6b952bf4ab5d216596a153f2ba2f554183bf736","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.193","@apollosproject/apollo-server-env-mock":"^2.46.193"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.193_1648705747588_0.8553820688571221","host":"s3://npm-registry-packages"}},"2.46.194":{"name":"@apollosproject/data-connector-rock","version":"2.46.194","_id":"@apollosproject/data-connector-rock@2.46.194","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"17dd16ab04e7adf3f7ce88ac4252caff5d1bdff0","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.194.tgz","fileCount":158,"integrity":"sha512-uVQiwKmWksmD8yC6mJFx4vd3oa+8HODRS+ot8bZh7QsgD4jCXY0LeRGpoT9DB4nBslrshwSqZtKW9ctTgAD1Bw==","signatures":[{"sig":"MEYCIQCwtLDmHhSUo/w7ASviGKYpnmzYYNWLVYs8/x2LRq5NigIhAPXEVRPs+e+LKhIHX5QSQ6QtAWYo6HZnFMfHDNP2YIdg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1129246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRUGxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+mQ/9H9ZewsJf9reyhHPzfDSu1V0ri95T+tfXXCXUffRjterySzQD\r\n7bDyAEEsGDYT6M9mKfcmCwt21dLvtwHVude9BQYvuNnH4+bfhzmqnrm4vpiT\r\nZ3vb7fz0Ee12TnZ7AYQV05EE2tCV7fwu0p/fTNtBgrDsh6MUBiLWx/A1UWvY\r\n7hVT9cvqqsvzTvyPlxWrmUg0P2LvSdSao4zvnuSA+lozK1sI6fVnTScbKVbC\r\nFE9hOKop/jC8WJE7JpCM73ZsdST/XQ96kADukcfTTOiv2eDIelM1MfNbsuhy\r\nZGCy1LGCEVtGXlL+CC5iPgx9w8ZIqornyO+Sv1F3p17Qv/sp25x5pQlFeq1R\r\nZoUtK5Uo6T8RicouEeHW4/iytthuJ1jBqe9o7eQzRQOW6M5vTSFJxXvKp7f7\r\ncAft2o8qLfsLMhfPlmtnzqx7Zazd85WhOUKz28iVX2RoPgEuOrgA14njWO7X\r\nlFSrZ51ibpNgfo8r5nZMOgVrya66ZQfnMKfwmZTpQx0w/qA2pZjeQ85zMDU8\r\nV27IAQJohfncFApgT6qOwhLFy/XiGp+P8aDnKqShOAQORjb6QsA5Z2ufOJZ0\r\nazcTasK9Gv3X9sM6sNcBBM0yneJ3oa0SQsRK1oDg+hgVM2bFOP4A+Vn9KFbp\r\nlZQqQd9M6Si2I+XftFlDkHg41vt18nrnA0s=\r\n=SbmT\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"15d960e8182e5ee80ad2a9e7eae294e5f2c7efc8","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.194","@apollosproject/apollo-server-env-mock":"^2.46.194"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.194_1648705969786_0.7290244260719521","host":"s3://npm-registry-packages"}},"2.46.195":{"name":"@apollosproject/data-connector-rock","version":"2.46.195","_id":"@apollosproject/data-connector-rock@2.46.195","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"49c6e321a1d3c76097462833c85530548b8a5442","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.195.tgz","fileCount":158,"integrity":"sha512-3q7JcWFxVgJ2+e80ULfLccVN4p0+JmlMji8y2y0bSmnS1W1ldL5BW51nANwNhg1KcLCsoNSYn4Ky9lgQyIfe0Q==","signatures":[{"sig":"MEUCIQDctvRiP+MgM1pX2P6Yj2V17Xd5LuViBl8i8UEPqls4oAIgJFAEePaEWwpGhZe5wpQ9DcDdtMQlUkT4QZO6MM5GHcM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1129434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRUJaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp23A/9HG7lcGUOIuBez/07vS3VpO84V+2gb4LcUH+ljWSiODRDKdMl\r\nqnjQEIsS+9NudVCekt6MMec0tu1Kf2KZGI037pOfNfpld9L+E+8E6wf7HTIC\r\ncQiSIkas1AId2NGH/asXseUT5Lm2T1ywCRr3oV2D+hwpRerCTncnDDbsEU0k\r\nZNXhHa3EGDJLbIG7DA4+7ESolT2tQ7cFdiNQ94rx76DFT1l4+Et+bnqQy7Gf\r\neFcqwGUQFdcTgdbi9A6WdciLxNdnd0ekltCL6Qbe+C5CTrdwoHu2zmtrTWPN\r\nJ3i2SGJjKHtWutdtv9KQyUCSqfgH4uMu73Kdfoftf3DqWeAfKQ37om6NFII0\r\noLJV5NWiNb2rhRfTdCE7BlMmO+6Q/sEI7Yq/tvVHsaUrNA/j/MrKeBQJNj7o\r\n3qsjL/DtoYGlp7c073qA1S4+eOM3s0g4b4LUfhvyxtlIh/f3MWt511Eb3R8l\r\nFFllngO3d9liDArmmtM02wN74fkRgS5QLAJyyvFzQlisYKtMpCSr1J4LmwS9\r\nBQ4i87AWfsFOR+nQLagv/nvpmxw/G977rYBNxNaJMHkif2/HM7Vo4FylMBO1\r\n4nDVvxHGV2v+NBhqGsoJ4wpn4qGfZXxui185Dr4Pf04FCx6r79gWJnhv9Cuh\r\nqRLLNA4iOFnMzbxLoI9wr8xiGQiBCW8zMpU=\r\n=yD4i\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"dd119184bfcfa9a063ba8e869d65e703149b49cc","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.195","@apollosproject/apollo-server-env-mock":"^2.46.195"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.195_1648706138509_0.18093489288489217","host":"s3://npm-registry-packages"}},"2.46.196":{"name":"@apollosproject/data-connector-rock","version":"2.46.196","_id":"@apollosproject/data-connector-rock@2.46.196","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f23c314eb66ea86d4fd0216ff8f3293590f4b8ec","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.196.tgz","fileCount":158,"integrity":"sha512-/mcVcPDsnKAPNvdAqNMQH7m518G25i7pXCWrDLkAoml0352oXpc5KSwRXlTVZ2PVO0SZU2jqG11otmkx5uUCdg==","signatures":[{"sig":"MEUCIFLmb4sKOCGVaLT2g5UNxWYctHgYGRju0B03UjrHCFX5AiEA6BqjhL+F0YmuItSiT2C0Fz44WMzmHmBg9ca+RBzcMQw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1129622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRUMVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJJg/+Na9yU1TO0QkI8MUR+CciqapH6w03xWAutI6omYgErY9xBXp5\r\nYyNyuir3MBiet13eDzS5e7zEH/bGaWGNa5OrTD5yCiDet+njiua+qL1qyXGf\r\n9bCfQJIBbclNKmLEa1p5c1Vh/kW9cDkb1h9xPxSkZTIVnm2sNZkghTByz7gI\r\nxmrCnBLKpJJqtfWfYqeSkBAfjpGTrQ+dt2Ug0oIZNPC1nf02TJCaM/QytcLP\r\nm8+D2x1PbMMKcludR7gTuEDhS3iMkpCaioE9+uXncDnKqne8qtWZYuNSzFJS\r\n4n114iuuduPSR9B51we6aXpsJI53TtwdvfwxKuSrI1T22JWUC1azyqJVeVhd\r\n7JB8uF11UjAsY5eMo0whXB79DKYrHLgZG1a/8c1Fpd6CIu3LoSgb6EXYQiFW\r\ngvQtKEgKNUrYn/9n7cYsuDV+Xl395iyUkjwAR6bfcPLQePKGmCY2Sm5ofZq7\r\nNyVpeo9oM6irrm69cWxZ90JMxZuy01DfYj3CqtWLUVbSJhpWyv/Tjx/mxqOk\r\nf/qKVziUPjxOInmTphKrDTUGXDUPm7Vgx5JBfwsKUkDG7dyp0F7K0WI1ROFt\r\ndsfqITQGSO5vrQF+0ZWn0dSgW8+oVefRnUTZmGTvKTdUeBmF6zi/IviRPSg6\r\nvG2iGLq+ZBn+3c0bd5YEeCCsY9hggQ0bp+E=\r\n=0I4M\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d7b64afbb231f230124b1ebd32766e2ebf8fc176","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.196","@apollosproject/apollo-server-env-mock":"^2.46.196"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.196_1648706325435_0.9957697245727992","host":"s3://npm-registry-packages"}},"2.46.197":{"name":"@apollosproject/data-connector-rock","version":"2.46.197","_id":"@apollosproject/data-connector-rock@2.46.197","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"1da3d9e27622a186b98f9f945981fd25bd5e4c5b","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.197.tgz","fileCount":158,"integrity":"sha512-jiXAhNoBn18pqJXpqYHjWaMo4BsKH8Nt+epX1Y7UJUEXJwpSSbo7yJMPLEGHAOipjmyC/+FTZnkHv9Ucb/mXbg==","signatures":[{"sig":"MEUCIQC+CsqrJFxGrah1IjC8Cs5jPdXY8kNd93udOZMKb/GVJwIgBmXKbGYYZXGyRcPd9siqPQcHaHkKYBpPy8aoZuiBgcs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1129810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRUPLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpoeA/9G0/Lt0R+5XLlJ6LHD5fCryZpTaXuUol6XWqjbidVQ4/gGD0M\r\nOBWp5xU1ofkFru12ubfg5b2fIAkNr5AslaTDW4lGjKJ0yp5LaK7ylYgDO49a\r\n5JHZYQlYdP2E8WlMKueyMO2zcFVwkFwUtfH049WtaYhwGIjw4eSdBl7aYfnU\r\nONv50BY8mVQrETgbFGBiniZ2loPC0Hdp73DMlA6a/xQA2/TYWooYGylJvaLI\r\nko6HR1vgEaKVCnYU1tyXFlbGQ+Br2z8LZJxXTDh5Sq4N460AHUnFN/aTKnc4\r\nkz02C5Nez5bDhhi/DbYCU94cuWYN2OB1ckvPoeXRz2/rCUhmO5lZgPqg5puX\r\nqoXnV8KQF0Uahg1ZAFMTGk72rQwZ3+VQ6AnnWp5om7WH898QymTMiukq3v0Y\r\npp19H0OX/eu75eUX98e8++5+uRyi5R6ni4gWA0sldFKNKw3lO1e2UhMk6AJq\r\nGMmpeU3uk+GuRJf76YvKgMxPP2YswNJ+XDCalHloC1DCNV/Z5qbsZI/cLHR0\r\nlMrReTwF/Uw0ICEtf8ghxMeDrc1q/hm688sof/2Y0K5Z0MPPbGwv7JOHemy3\r\nBqm/Iod0EJnT6WCOf+IFiMHtDiui8+9AyOVUi3X6c6oFIbPcF2OxGrm+bxJK\r\nyN7vjXz28WrgqvPRSh8HWG1TuctEPFkp4NQ=\r\n=UCOC\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"17ebd7c5630f1cd8074909f74083a395cc1fda49","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.197","@apollosproject/apollo-server-env-mock":"^2.46.197"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.197_1648706506761_0.9379350570581062","host":"s3://npm-registry-packages"}},"2.46.198":{"name":"@apollosproject/data-connector-rock","version":"2.46.198","_id":"@apollosproject/data-connector-rock@2.46.198","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"42995c3ac9d90c03c4d3b5895c6e36138a5c82d9","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.46.198.tgz","fileCount":158,"integrity":"sha512-tLy+kuJ/X1A6gTHagvgVFygLTBxpuOd2R15wXPsLTA7x69ZPgWspwx3RZ2I5TisRZeNCL4HElB23KhIj1cLoKw==","signatures":[{"sig":"MEUCIEGswKurjSJTAK+5dFc9By8Uu3mPKGLsoZARe920ylLIAiEAjb24ZafcW7rNw1Ix6xxgoAGP4Huoa3U1/W/cLZqUJQc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1129998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRUTBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrrPA/+NBi2e5/hA3/xLDOn0UwMVrefINq1y/M07TQBy/6XJQjboTdc\r\ncHsttmIn4CGjvrsFNcfVIh2RWQxZNQToaYxv27OjlNFbQww0elT+l8gb//nA\r\n+P/KPcpKLYmcng7okSar29hv1SDXvH+SKl1OaI2xOmf4KxpyEnrcCd9jZ9xN\r\nXw71zKfZxe5xQ/19Z+y/uYuh0F5oK6CfZmEPecdmg0q9LHDSoR2Kxbcuerrq\r\nzIPoTMDq9kh4hMjLRqNimEvW7PZdx7y6ATTgrFqKN2DZvxyFG7Mq8tkiQO5P\r\nPN32BaVFIZhl1VE4QGoERfQfdHoNoPisVq+s7QVPoTyQjZ500qmaMq6c1sQW\r\n/6W3hO8mAyPmsBuDeEf7gZHQdcDJcN4GTmg+dGdI+HFpT46EvSHu80zJcWUK\r\n41t6jTurDbmJhx0iHlZO6a1iDhu3wonTVlUA8rg1VVlLkY/P+8ebW21MPqLj\r\nsXY5IYtcHDDgjzmGnrTnK0p8MiXXr2gaMsd5G0EPpIW4je1fsQR+bXZ6jCfy\r\nJoaqUXd3BqXydmf8M3ypJFfjpl4f3tQO0rqaNoDKSbVj4Rp0DguLX6UGrSjl\r\nngiG01eR0/I3EP4s8GGr0kOr3CQ5Ag0wMDK0WQ+I8/1GKKXNZCWu770FwI4o\r\nE3Lkz/MABJTK8nAyyXjKEpq14kPDAbKr90I=\r\n=ubzv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"c601675711969aea9c21d88c5ef2c5731e044911","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.46.198","@apollosproject/apollo-server-env-mock":"^2.46.198"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.46.198_1648706753590_0.34518420021894647","host":"s3://npm-registry-packages"}},"2.47.0":{"name":"@apollosproject/data-connector-rock","version":"2.47.0","_id":"@apollosproject/data-connector-rock@2.47.0","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ffa98282a8116be3d7930a0c3fd8e748525b34ff","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.47.0.tgz","fileCount":158,"integrity":"sha512-jMvHck2/JtA84Es6isoJB3DkN6OazurknNqJaSkLHLqxAbgCs2DmTDhWfHZS81NGXrI/zWD0e4dK54D2iRXDMQ==","signatures":[{"sig":"MEUCIEUDtbJvcO5x9QKsiA5AaYuqdTRmwoQKZmhrp3DwIc8JAiEA+mOo7RgncR8tjRk0wOxG+pvsiTBufJ0ve+ltP+bXk54=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1130175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiS1gYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZiw//b0pnfAvJhsvWc9HJ3eXEwf9splheEB0+zLFIyolQuZKykUAy\r\nghonFBWnaGaIrUMqQ13avJSgDXRdDL3pXnJJxOdBkXMGkphB75cS4YVG5n59\r\nLxoi+eVV+dUBumWQlaJoAFZj9JCeA1hIaQ2uFUuwyBDHFKXyztfxhUp1l3t4\r\nWWUb6kuGIVZznsNfRG6OhmdTbr63eWGxgBWDnq+NVS9sGhTdq2S4uMsaK6B3\r\nkj1zlzvvqA6OEfB8evEQCah+0suQsi1voluIYU20wW7KZSdufLILqh9bnOax\r\npghG+UT3ad8ejtxpSopWCbT9DfYEdToBEKPsP8D9yRV2+xJbGYDmJEZNm2ci\r\na4hNO2In9AZ+qSLeVVUQZXoaMKqHsxVsiROBEMSDigzHz/ShUttkt+9nkDMW\r\n45/fgbEuSPKN+idSbiCUvvqdTP9OHRalWvefAK+lwRa/gCxyHqTxv5ONdzjt\r\noK7vobXSwAlKEW/z+D3QCYV8NHbWzlzCn4cLfY52u1lCjaYa5al6NVCcrVNZ\r\nSpQLnhhB6rLVQGbVV+J4NxzLUYw062APdRxuv6PNVr8coE5DeZbubpW8cEMf\r\nzkYMYD08SsHKlhQ8//KZ0khT+lLw/gCN5FOcKkZlG1n9mmBO7Ny4D5UH/rpb\r\nolR0HriCWOmGEuVxDC3X67YPmx0vKGW92cw=\r\n=/b3f\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"427bd1a733a4800f308f0ae87d0b61ad2275f819","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.47.0","@apollosproject/apollo-server-env-mock":"^2.47.0"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.47.0_1649104920451_0.18183210855662968","host":"s3://npm-registry-packages"}},"2.47.1":{"name":"@apollosproject/data-connector-rock","version":"2.47.1","_id":"@apollosproject/data-connector-rock@2.47.1","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"aa401dd863321e328c4cb7dc02ee7f90e79eca04","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.47.1.tgz","fileCount":158,"integrity":"sha512-yv8pWJDXr0f9mfXL7YhePf97M2mdMBNI5QKy6E2uNv63AJh959ihF0WfvfQXasGu9h5sIQCEKSIRbC1+F3kNRg==","signatures":[{"sig":"MEUCIQCmREHzCUFhfmNzmoxEcXUyORlqMQXqq/1uHOF6dQ4DegIgDtOtwdHLD7iKohySi1GQ74AXkhtv5LcVmd83KfIx5dg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1130357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTKWYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrm+w//RvFd3VYpAdhJ5lHcHwONBCHRJmc39G6VKYdBlwZSM7kYZQlm\r\ny5/f+Ju64uDd4k+gGnsmdAKtqcYxU+rSGW5y9GQBp5KjWIHlAJRbNgh2sU6w\r\ny3WEcxdPeuvvYVXheD+TuHHnjyYjyBy0k7Jm8HFFe/Z+02H4WR5+BTFh/f0Y\r\ny64sXEygew6GYRO7ZN4EKpeuRS6GEMImglXLbrIwWnRUPZkf3jjLOeWHuCm+\r\nK3TC76JID5WO3k8J02zJJMBAoF7Ha0sEISg0DGLiEy+xJjx4r8XlMApouP3W\r\nU1rd3JAF7sLKirbGcgEBBjlo192ZP1AnQZS3oj7UvmzOa9YKT3D24M/1cv7g\r\nD26VtN+CywBBSvtjWJHP8hkBFnK44D0qigX1ZgX3JWYoac5SZEz1hd1vq/Of\r\nFJhaN0E8jKWc4AikVgfSvT3fzxZsP3RN7bBjG2p4Y/Bwv4NakUotsjwUhNPY\r\nlPB4zfBLlKkF9Poev2WIuyUNp6zUiqBIynwCoLpEV40jOUJq4bNdxrX8Ek4j\r\nZ/yJKiOr+HxBs/HGidu4kzskFgUvPtrOUxaR7+1jjo6Rmwnl16dqtAeWGV3L\r\nK2YhFA3zWNT3FyuVjgBM/brlUetq0o2aNoc8s2sSqix3rPkTlwdymPuYcRO1\r\nt4g84/3JOqRPyUjB3CPKj4TVr2uo2/fBJ2k=\r\n=+pQL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"d5ca95d54444537d3f21d3f76f68859c05e7bd72","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.47.1","@apollosproject/apollo-server-env-mock":"^2.47.1"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.47.1_1649190296240_0.35941842880768204","host":"s3://npm-registry-packages"}},"2.47.2":{"name":"@apollosproject/data-connector-rock","version":"2.47.2","_id":"@apollosproject/data-connector-rock@2.47.2","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"ccc105ab6c36cefb52fc5dc5e9b02c49120efe70","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.47.2.tgz","fileCount":158,"integrity":"sha512-dmdNzICI2l903tX9jD5bmRAmXxf+kpRpPNyBGuNG8h/CMDMi9FpH4kCYdC5ds1u5P6RM2JCvn99R5tXsvf9i9A==","signatures":[{"sig":"MEUCIQCvoR0m82btW/pzPY5vxdhcwJcdlecUL/zQX6aqWynn1AIgOUcTOklW+GB9nPD27WUpR5Hu9LExokjGarA/Lbw/M9E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1130539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVEvRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrw8w/9FMCxBZxkTwKcPca9E6GPQhC727xSfaWpX6Fd1Lrz0RBKyriD\r\n8BdmgwK95HCPpyX+wU9xxp8beQ19yDcgw4+Psj/7WExxIBCF+Z6ruYxlHalQ\r\nxxUxUvuidDjXEbPToMOizuWpX9tCqJEOKV4uru+1HymjQhi8z0Z85D6d/6Ni\r\nasrgrkvIl1amLgembUyrsUhWqMr7Gx4a4AdIkl9+/hiFyNi4DsxBhIXN/1b4\r\nRkAaN4fP9kdPUYOcp0NH48O5pIUUvjdInMcYx9znuHxnVQblZwk8MiAyg3xZ\r\n4vTdsx+lTdFJuhMSJwCE8NuIDPCHZ5QK7prWkSRXufWv3wc/GSEYUpds0zuD\r\ny6S/FvwE0t73TXas/xbUErZijz7OcGCPd4wX6ve1zHmNSt6bZUh2/cV2Og4E\r\nKpQkCOUr0xN4O4aKBiXxknjie1W/Yt/jYIOr9lI6bFEa20aQIzxv4TV9N/t1\r\nm/95uMBKORZxpxdNFcHkVbNA7k1LwgCelgBl/F7Abm847Ck5iYcsvp3JM/Aq\r\nIf2QzmyT3Gr99gNA38Dcd2LnijSId9116HP7QPJj9CJupL/F36dxDKqWn8gN\r\njCTLRgfwiHG6BRGOvHcKtvMNtmJQPL1KxG7wz7F6Dk+lNjgWLYN+SLc11Qdv\r\nFjOrQycf3syCGVwFf92JhmR3WycYh3H6eec=\r\n=QKHx\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"e4978d07bb64614660bd0ba39ae4eb4fc4dce289","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.47.2","@apollosproject/apollo-server-env-mock":"^2.47.2"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.47.2_1649691601018_0.2718032431603896","host":"s3://npm-registry-packages"}},"2.47.3":{"name":"@apollosproject/data-connector-rock","version":"2.47.3","_id":"@apollosproject/data-connector-rock@2.47.3","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"38c097fec0cafeeef6e754e26682173976719883","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.47.3.tgz","fileCount":158,"integrity":"sha512-9r3h6rgoUbs9lLS1NFx7PtwyUKQPgnfCMH/CbWrWtJZyxqnqFYJQL/lDdm1NMWs1EkH+19zcRJyjKQ/i3ZEQOw==","signatures":[{"sig":"MEQCIDSpAnZqW5GNYKSf2Q4g4YDhcyWKb9UtpZj7ZbQO8ZrKAiBHk2ZlTlUuOEZFFK1sI2MG1ErIZK4cTTYwqzw6RyFsrQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1130721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifABGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKOw//cH3/kFLhZEpKmHieetk808Tb9YQ7g7QCJFn44mUluc3R5Sxl\r\nRgiU/8u/9GdOUHCccDiY8tE7Oqrurt2iNnQMCIy2wQcZYRfWZuKfAI0+mI+G\r\nVltPsaOFwlP5RIQlmO5JQkHJpaK7wEsGZw9k9Bt/U08wCeW9uwRWlu197WDj\r\nbKaRdBs7twlwgC+qrJjlERkM+IEeXg1r6TT58IQynWVc4TkvKPyX786T80gN\r\nvxyLlClNS0a+2U+sl4hWZSL0YWdofMZiNlP7owXFyIJdh/qEneJszyYKzjNn\r\nwzepBVPTOfVdOA6Wood/Y9J6hxvx5Q/4W4gSGsXmqCsoGY4UQ805yvqd2wvx\r\n6ExZkkyMtL7VPRHgblweiGDhypPNEDnaTam12g07e8GxgXBbcwPxtCyXaNRT\r\n+p2+Nxu7KlmXLW0GVatLGJG7p1te+dlyMuHAtjV5jG82EWvaDHp18mcir4aL\r\n24KHdoB1WtYvzzhF1zGbGw9L9+yalyGA4pHeBKijmfO2xJ5CN52bDZpLvIh7\r\nTqqUyz769dIFCtXLOh4jSDEHWqpKF96uLlzddnYGArrmQ3fU2RfOm2ag7LU1\r\nMPf+VvYq2Qr0k2znMfwsp3f/cw5cnfF9RSwrt2NEefEGjpKr/vkAjcY2niqz\r\nvfu7fGNNPyHPyz2YEAA+5cBjqSWl+a/WTOU=\r\n=J2Bl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"fc237fc60a4636ab94dc6fb9cdf03eeef1371014","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.1+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.47.3","@apollosproject/apollo-server-env-mock":"^2.47.3"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.47.3_1652293702420_0.5813335280106311","host":"s3://npm-registry-packages"}},"2.47.4":{"name":"@apollosproject/data-connector-rock","version":"2.47.4","_id":"@apollosproject/data-connector-rock@2.47.4","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"29e51ecfe3fb6898436cb21d31335a18b1243a00","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.47.4.tgz","fileCount":158,"integrity":"sha512-B8ZgiH52TYrYudQEXLQaGoHf5aesiJr6cKKH7Rc3d8YlS6O5Hg06dw1ubevq5IOk/LFcba1N38VLJl0vHeLOLQ==","signatures":[{"sig":"MEUCIG3Jo/sxw1Iikdq1i/qTpPROazkvUVYbS1iXL+wAehHhAiEAnMo57mzN/nKs6VeR4acfo/br7EBcwWF8SbO3dQCSbxc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1130903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioUtCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr25g//chKDPFoJsBBCeArp8IB0fNS1TYRuYRdcZjf9S5LumtIbPefK\r\n+as3ty0BBTV5IrU1Z1MhUkfe71euHe5P001FRLbrx0hfFXhBC7Jt8COova/6\r\nh3pxRAhCwAEa5uCkUZbUfBlfO/WmDwdmUTVpKII+cl2h5RhocR7LQ2Pi/r5x\r\n/HOVy6b9dMuB/aOTaMKk8PUHcrtd+CjP7FTc6SBBLseNgXkeXRgTjtwWZqoK\r\npr45xky48e3Wey7x0GN15zLb6ZL5735qSmo2TU844IvuWcxeJtix43zK41u/\r\nBuIVMmwYSNjrEFp5BBM8kVK1QDuv6ffvJNCnbptseTabpkLtnEIQtVFgtPaB\r\ntdRkKcJOWn60o8X2OocZeq8F1DxnApndFQxp2YFz1Yf2EkyIZmiecdH5nME0\r\nzQ1cqavsGz2cpOGCCwKtjSHtnrVyhlHRY1J70fvOylzPIkIoCVoy6+Wv6gVr\r\njYrldq4h+pWsME1AHgBSj8FSYgsJsnqzKIRHdsp8h1DBjQQ6cg+x0RMqNAYE\r\nLDZHCWZZWjnWAnQqDKDsziONy18Q1PcAColT+4pJXzjGsO2vJMZDtv9O3uvx\r\nWFL/SaHFsRqrHyrnuVw1WC8SB58YBWCZycxbWowaj58D6W0lVbTteImkwG9T\r\nwJwaYTN9HzUXxfSciMHm7hfIe/aZ4hii7vI=\r\n=QMU5\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"6b5320dd89d0a1a28538717c369f7b7cc6e8dfee","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.47.4","@apollosproject/apollo-server-env-mock":"^2.47.4"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.47.4_1654737730686_0.5066374612554101","host":"s3://npm-registry-packages"}},"2.47.5":{"name":"@apollosproject/data-connector-rock","version":"2.47.5","_id":"@apollosproject/data-connector-rock@2.47.5","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"f9fa974dd95ba01826cbd5bb72c5f05c1cc647af","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.47.5.tgz","fileCount":158,"integrity":"sha512-/GKORrg/p1TIetdLzMnIyVMHngLC1TUGTGxBCbK1KckgCz8ig0EPerMHbpgRrKDygxgFgst6lC0aWAB5lHtd/Q==","signatures":[{"sig":"MEUCIQC806YCCjIOkZ2ILBoGjwSCLBSSF5ruKjbYi2A02xZQTQIgU/od4PBv8NVIH6hGoK5QpFuBfIhrXT3KTwOVKrf9yag=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1131085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJio37DACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolFA//TQiBLNnIjotKaDucimwNInC4IONmWM41mWdS8k+DvUeeWIlN\r\ns23pKQ6UBGvoxkHjZDDXQ2LCB95LsScLDHeR3bRVS8Fd03TpXNusM4yJzf8X\r\nrJ4YUB0rSl+ZDkRLQzvFtwNla8AF3Q0C/NbdZLbj5lD9+rboUopb/qsimYds\r\nWaCSja9jT4qAg9wMaAFUuB7q96rbbvGW76M+ITbfH7v3lX5MAfzaut2v6VbM\r\nUyQxn/ng0gAVBCt6VVgM0UwLogSgAAcT6qjXMpoGyYDgMxbkOVhgngwi3vte\r\ngSOSDWHgoep2jpERlNnVNxKVt9wlVmHKdZa+1EAxXro+uX0DSOC76GeXLZsM\r\nfHIb3jwWnsu9HCohTPxKOfuT0uFCwup3ohy9QJLY9wd+tYsXy1rPxdVDxID+\r\nnaVyyWxn2xgxNpDDslwQfnhLSO9iwC0n9VKtVeYPHU7SgjgHBOWi15NdKFL8\r\npEEvWD/Ojod+yJK7oqgP71o2JhHCSTF7L2TapNcDUvyWjS9z9vrwcEqBLOUv\r\nyamfuIgGORs1ttsNeBmPSUOQzxTvG4L0kYJrz3Ae2Ntj0DyXx+S2Ct71QhXA\r\ngcBSvnZaUC7AAK3igNwwccUQAnwF7HWVdLuz1dC9ZlvCdUNR3REHN/9PD2nx\r\naL+0rfpyXveaQW1c5Pj71veKAD3RneklQnQ=\r\n=y+yT\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"6e3aac319270138bcc2e1ac5b0f0a866c16ab62f","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.47.5","@apollosproject/apollo-server-env-mock":"^2.47.5"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.47.5_1654881987516_0.6608955984953988","host":"s3://npm-registry-packages"}},"2.47.6":{"name":"@apollosproject/data-connector-rock","version":"2.47.6","_id":"@apollosproject/data-connector-rock@2.47.6","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"c96d4c79671cf9b11fafa952c563ea8fff9d336f","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.47.6.tgz","fileCount":158,"integrity":"sha512-EhhVfrshEmcFlE1K4EU8r6gBz4ye0+m/OVwOcxTmw+H428Rr5xD/0W2c31P+PSB7ghELXNAO0lkbbagMC80aBw==","signatures":[{"sig":"MEYCIQDdoydwoFfVx86/xiaxfJGZSZKEvSfM/VIr+Fneu46jKAIhAKGVtuLQVELJiiVSx1h9rDU7vL3q8r9UK+So5o80Z4wM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1131267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixuVnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLsQ//ckePujN3AmkZUJSJbNNFJy2VL6Z40fHfBeezSILDNpg/nXZD\r\neXDbl4PMf52o+gapAAsmskdgnkpUPCcOhDs6PKErq6jwHIRmySoR+fVEpAk0\r\n4g+QqCigSsLsUklgd1mdng6uEFxjIMqgd7rXnKiN3cHD4tcs0JBQvnUPqQu5\r\n0hUxVIgrAV8UmF96tTYoPNxrhzrzw2UGo2sROil/3ugAwyqynAaHAJnoMqRw\r\n9nQzPL9LBW3lb45pUsM5SqoJo6I4WRph1Vi1MwdQK7qiRwC1Pxxoc7E/5sIF\r\nT5LLsmc2UxQIXDrMFwgoFAXC+Xd4eN+XnC9jX0O6TfNbMeme53jj3vgOMbSB\r\nAAT7bu1pgY+Rb8cLURounaSqfIfPi3CKidk7U6u0ZwOHPJ1Zrbk1yuz38QZb\r\nbCAqMvZQeVPN4jlccL9i6NcXRk2Lf5e22iZetTHo+eXsvwkS2vXHpqMKKY7I\r\nK/r4IMoYDeBPY6QsVT6NhDlVE7Qz/VArIXtFxXki46XoslA2T9I77ZPjB+F3\r\n6R3RMsR5ycEq+ad0JXNuoT9n3cvurLaq+6JloI/wsRaKpJHDYJtm19/xX8Vz\r\nRC9w3uekpGSCZi5Wwl9KmI0S1OxC1Te51s7LGKhn3ORBozK6tMkSSNFTjhDx\r\n9Vu3+dk5n8c7OHyzMGYFZ+o/0WT9c8TzNEM=\r\n=/YhG\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"a003460491c6701bc0c5180dc27f0fe27a37c9ce","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.19.3+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.19.3","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.47.6","@apollosproject/apollo-server-env-mock":"^2.47.6"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.47.6_1657202022900_0.09962659638435167","host":"s3://npm-registry-packages"}},"2.47.7":{"name":"@apollosproject/data-connector-rock","version":"2.47.7","_id":"@apollosproject/data-connector-rock@2.47.7","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"2ff78439735601ca475043f680d9e03cf4d4ba81","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.47.7.tgz","fileCount":158,"integrity":"sha512-ln5QLkkJ3lOjvBID8aqDEFmmXKaBYwCLLC/+QrOVuY7+0fLxMS7Ywxo0GnEEu3Yry7VWqibmUM/Iw13OhUNx7g==","signatures":[{"sig":"MEUCIQCsXxSWAGqr2ve5Qq+RaFgMPdu2Pb4qiZaUbGuN++Ln9QIgC82p6HE/wjfXuAFiUmHUOkGy5W9Qs7qAg7jMfrwyYAs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1131449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3/unACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpwUw/8CPJC70ffiIUXfaON1UfiI6t3wPXZrUhCuXHDR/ukXxB6Y4F2\r\nJ0RjqUb+rWIct7AGj6SflKHW1qpP6TFHZgY4FCOx5msCcMIuZLd0P+kKHAgD\r\nCYaI2PINaVFIBpl+8GswcK5Fq3wfxtZfuLMdEAmRkXW1MG79APtzW721OxSK\r\nxVVIrD41BehasYiT7a+3w+MjRc2FQHvnn9CDyB66hD4bXZNV7eZyKMxkCnJk\r\niTzR/1jLTMYiWaYRY84RRXp8U1c2SvbuMnH323P5eqDjBBTd5kK58ID3WV98\r\nNRxcZVrzKdvuymzGqaU2/aEEZu0c0JOmN8GsTUZn4YbhZgUJ3rSWR2jEuDp1\r\n+DzwRkpz2qSsISCrYZRCLPAFuf3YiskFf+vfBQLuPwDaJn4zGCPIfig1550p\r\nV0PPTgCjx2cdJvK9oe4WyNRTiUL477qgG2lGxwFOiPWM9h552OSQizvFQBu8\r\nWhg+gX+wPtsak5Pk7F7++WrUAQFjqsT0wojPKQwZP9lFyyKUQEKZW545ml2j\r\n0ttRfXes504NnnpdQRIiIzsqbGJPZB4OQmQYvy4kcEJ/YZC8EQz0cAfza5o1\r\niJp+yQwSNKfjk2FKBB3Dym5WQ42cQWHS376ueUK4OohNH/mTJIc3sCeGu3HC\r\n2rKqjZZD/1KqRo0NA12glSjw9NEqYGNfkjc=\r\n=mEr6\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"8d384fc93c44177d51a39a1d7150534180c0ef5d","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"didevshop","email":"npm@differential.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.20.0+x64 (linux)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"14.20.0","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.47.7","@apollosproject/apollo-server-env-mock":"^2.47.7"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.47.7_1658846118733_0.4978919092547751","host":"s3://npm-registry-packages"}},"2.47.9":{"name":"@apollosproject/data-connector-rock","version":"2.47.9","_id":"@apollosproject/data-connector-rock@2.47.9","maintainers":[{"name":"yungvincenzo","email":"vince@classyh.at"},{"name":"conrad_vanl","email":"hi@convan.me"},{"name":"redreceipt","email":"micneeley14@gmail.com"},{"name":"didevshop","email":"npm@differential.com"}],"homepage":"https://github.com/apollosproject/apollos-apps#readme","bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"dist":{"shasum":"171ee4bb8a2df1f9d152f4b9d51c420cdecc2656","tarball":"https://registry.npmjs.org/@apollosproject/data-connector-rock/-/data-connector-rock-2.47.9.tgz","fileCount":158,"integrity":"sha512-/mOJg8Aj6k5hv/yMtuJtfOSkiZ8MmvHWXN+2eu8wdVHN/eaK9rtgINIKOW0DCla6psp5CrwdytnqSl6tMxOivA==","signatures":[{"sig":"MEUCIQDZRGWnINrCR8ly5skQ1r0rU9ySqJcGG9WXynF8u5s9xAIgYXnnNRSXPEF6lK6vv1G79wea8AuIGelzI6V6zw/0hzs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1131813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLGlRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqhhg/9GxNJ1PC/R5Vsl7+iCxa2OXgrjRWX61n4f/jw0L5mHZwW6/PU\r\nV51NKO8tUSt5INJ7FyfjJsgyiztO0SBTLMrzgfwn7uNxVGSTBodF6P5/nDPH\r\nmgNii6n21g73LjQc4tt5oUetseVUwCSKNSFYErZpgNeqnPhtIgR0nu+n9QHK\r\nmSRJsPxiKbFwrnDwH9vnV3O4n+7G7MUaWddLtAGBVP9nrg2/oy61kgQSXkQm\r\nIHvrjiVv653kr6jkMbb7x/l7PKIQwMd5TOT0ata42aGOvtwDWergEp+dqfIm\r\nRMQC2Zr+x45nfG9lKkFgLod8wxTN36PH+ts68RMj+DcR4iopEkX1jgL6rv9T\r\nAqnIAHxqcB5EMBOZtq8QEs2yNey5Ec9wGQdTECehP4pfQW0+VZUxqpSR3shN\r\nUD+uwKJ7o+FLikUM6OTskrniRPFD/+sPrcCi0NQMFpyjDhxbhYCyEu3R3YXd\r\nAj+E1y368URpqnxbXNL0FN2zfMe04XWz5GZx/WTDso+++pFPtXrM5JqGRl28\r\nMW7Lo59Z4I2l/236dMozSmapr//wYRzAkB2MaugAmXd+xgCyuS7DhC4WyBI1\r\nX9bg7EnS/KOp+Lu0FKfF6E8DvuT7q+u1EyGkeNXA6WeknALDbplEV+yRq+nt\r\ntg3IyXgfdjDBbHUEjb5v/mmhHg6KRbez41s=\r\n=rlcy\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testMatch":["<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}","<rootDir>/src/**/?(*.)(spec|test|tests).{js,jsx,mjs}"],"setupFiles":["jest-date-mock"],"collectCoverage":true,"testEnvironment":"node","coverageReporters":["json","lcovonly","clover"],"collectCoverageFrom":["src/**/*.{js,jsx}"]},"main":"lib/index.js","readme":"# `@apollosproject/data-connector-rock`\n\nProvides a connector to Rock for the following parts of the app\n\n- Auth\n- ContentItems\n- ContentChannels\n- Family\n- Followings\n- Interactions\n- People\n- PersonalDevices\n- RockConstants\n- Shareable\n- Template\n- Campus\n\n## Dependants / Dependencies\n\nNone, right now. This module is 100% standalone. However, modules within the `data-connector` might depend on each other. For example,\n\n- `People` and `Family` modules rely on the `Auth` module.\n- `Followings` and `Interactions` relies on `RockConstants`.\n\n## Usage\n\nIn your `src/data/index`,\n\n```\nimport {\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n} from '@apollosproject/data-connector-rock';\nimport * as Theme from './theme';\n\n...\n\nconst data = {\n  ...\n  Followings,\n  Interactions,\n  RockConstants,\n  Family,\n  Person,\n  ContentItem,\n  ContentChannel,\n  Sharable,\n  Auth,\n  PersonalDevice,\n  Template,\n  Campus,\n  ...\n}\n```\n\nThe naming of each of the modules is important.\n\n## Overriding\n\nOverriding can be performed in a number of ways, depending on your goals when overriding. There are a few specific types of overriding default behavior that I will cover below.\n\n### Adding _new_ fields to the schema.\n\nAdding new fields to the schema is a three part process. The process differs depending on if you're adding a new root `query` or if you're changing an existing type. Only the process for overriding a root query will be covered, but the process for adding a field to a type is very similar. Take note that these changes are _not_ specific to the `data-connector-rock` module, but you may find yourself overriding this module more than other modules.\n\n#### 1. Create a new module.\n\nInside the `src/data/` directory of the API, create a new folder named after your new model. For this example, will pretend we are adding a new query to find ContentItems that have groups attached, so we will create a folder named `group-content-item` and a file called `index.js` within that folder. For now, that file will look something like this.\n\n```\nimport { gql } from '@apollo/client';\nimport { ContentItem } from '@apollosproject/data-connector-rock';\n\nconst ContentItemDataSource = ContentItem.dataSource;\n\nconst schema = gql``;\nconst resolver = {};\nconst dataSource = ContentItemDataSource;\n```\n\nEvery new module should export any/all of these three variables. The naming is important, the export schema should always be `schema`, resolver should be `resolver`, and the dataSource class should be `dataSource`. You don't need to export all three if you aren't defining all three.\n\n#### 2. Extend the schema for your new query\n\nThanks to new syntax in the GraphQL schema langauge, adding a new query is really easy. Inside the file you already created, make the following changes\n\n```\nconst schema = gql`\nextend type Query {\n  contentItemsWithGroups: [ContentItem]\n}\n`;\n```\n\n#### 3. Add a resolver for your new query\n\nNow you need to add a field to the root resolver object to actually fetch your data. You'll need to do something like:\n\n```\nconst resolver = {\n  Query: {\n    contentItemsWithGroups: (root, args, { dataSources: { GroupContentItem } }) => GroupContentItem.getContentItemsWithGroups(),\n  }\n}\n```\n\n#### 4. Define your data source.\n\nFinally, you'll want to extend the existing ContentItem dataSource, and add your new method to it. The body below is just pseudo-code, and is not guaranteed to work.\n\n```\nclass GroupContentItem extends ContentItemDataSource {\n  // because I am extending the ContentItem's data source, I have access to all the methods defined on that class.\n\n  getContentItemsWithGroups() {\n    return this.request().filter('GroupId ne Null').get();\n  }\n}\n\nexport { GroupContentItem as dataSource };\n\n```\n\n#### 5. Including your new Module.\n\nFinally, back in `src/data/index.js` go ahead and import and include your new module.\n\n```\n// The import name is _very_ important. That will be the name of your dataSource.\nimport * as GroupContentItem from './group-content-item'\n\nconst data = {\n  ...\n  GroupContentItem,\n  ...\n}\n```\n\nNow your schema will have access to your new `contentItemsWithGroups` query. Congrats!\n\n### Changing the behavior of existing fields.\n\nSometimes you may want to change the behavior of existing fields. For this example, we will override the firstName field of person so it always displays as all capital letters.\n\n#### 1. Create a new module.\n\nAs before, this first thing you should do is create a new module, create a file/folder called `apollos-person/index.js`\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\n\nconst resolver = {};\n```\n\n#### 2. Define your overide.\n\nWe have a helper to enable safely overriding. You can import if from `@apollos/server-core`.\n\n```\nimport { gql } from '@apollo/client';\nimport { People } from '@apollosproject/data-connector-rock';\nimport { resolverMerge } from '@apollosproject/server-core';\n\nconst resolver = resolverMerge({\n  Person: {\n    firstName: ({ firstName }) => firstName.toUpperCase()\n  }\n}, People);\n\n// make sure to export your resolver as resolver.\n\nexport { resolver };\n```\n\n#### 3. Import your new module.\n\nNaming this time isn't important because we don't have a data source.\n\n```\nimport * as ApollosPerson from './apollos-person'\n\nconst data = {\n  ...\n  // make sure you put your override after the original person module.\n  ApollosPerson,\n}\n```\n\n#### Adding a new ContentItemType\n\nAdding a new ContentItemType is a common operation, and we have some configuration tools to make it easier. Once you define your new ContentItem type's schema by extending the `ContentItem` GraphQL interface, add a new line to your `config.yml` in the RockMapppings -> ContentItem section. For example, if we knew that all of our GroupContentItem's referenced above had a content channel id of 27, we could add this to our config.yml in the RockMappings section.\n\n```\n    GroupContentItem:\n      EntityType: ContentChannelItem\n      ContentChannelTypeId: [27]\n```\n\nIf determining the `ContentItem` type is more complex than something like` ContentChannelTypeId`, you'll need to override the `__resolveType` function on the `ContentItem` resolver.\n\n### F.A.Q\n\n#### Q: How do I figure out what methods are on X data source?\n\nLook at the code :D. It's easier than you would imagine to read, really!\n\n#### Q: Okay, I looked at the code. What is this `request()..` thing I keep seeing.\n\nThat's a module called RequestBuilder. You can find more info about it in `@apollosproject/rock-apollo-data-source`.\n\n#### Q: I have another question that's not answered here.\n\nThat's okay :) Open an issue with your question and we'll do our best to answer it.\n","engines":{"node":">=14"},"gitHead":"a47ced4d09c147f24c98807d2ea58fba577663fc","scripts":{"lint":"eslint ./src --ext .js","test":"TZ=UTC jest","build":"NODE_ENV=production rm -rf ./lib && mkdir -p lib && babel ./src -d ./lib -s"},"_npmUser":{"name":"redreceipt","email":"micneeley14@gmail.com"},"repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"Provides a connector to Rock for the following parts of the app","directories":{},"_nodeVersion":"16.13.1","dependencies":{"jest":"^25.1.0","hypher":"^0.2.5","lodash":"^4.17.11","moment":"^2.22.2","natural":"^0.6.2","form-data":"^4.0.0","jsonwebtoken":"^8.5.1","sanitize-html":"^2.3.2","moment-timezone":"^0.5.23","hyphenation.en-us":"^0.2.1","awesome-phonenumber":"^2.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","graphql":"14.7.0","apollo-server":"^2.11.0","jest-date-mock":"^1.0.8","apollo-server-env":"^2.3.0","@apollosproject/babel-preset-apollos":"^2.47.9","@apollosproject/apollo-server-env-mock":"^2.47.9"},"peerDependencies":{"@apollosproject/config":"*","@apollosproject/data-schema":">=2.26.0","@apollosproject/server-core":"*","@apollosproject/rock-apollo-data-source":"*"},"_npmOperationalInternal":{"tmp":"tmp/data-connector-rock_2.47.9_1663854929583_0.43312207350554965","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-12-13T16:52:47.970Z","modified":"2026-01-30T18:39:11.656Z","0.8.0-alpha.4":"2018-12-13T16:52:48.250Z","0.8.0-alpha.5":"2018-12-14T18:13:31.947Z","0.8.0-alpha.6":"2018-12-20T15:26:21.404Z","0.8.0-alpha.7":"2019-01-18T16:15:07.998Z","0.8.0-alpha.9":"2019-02-28T14:33:29.112Z","0.8.0":"2019-03-06T22:47:46.069Z","0.8.1":"2019-03-26T00:19:04.672Z","0.8.2":"2019-04-17T20:31:29.895Z","0.8.3":"2019-04-25T21:17:43.758Z","0.8.4":"2019-05-02T20:55:12.339Z","0.8.5":"2019-05-08T17:04:26.660Z","0.8.6-alpha.8":"2019-05-14T14:49:30.416Z","0.8.6":"2019-05-14T15:38:02.917Z","0.8.6-alpha.9":"2019-05-14T19:52:27.698Z","0.8.7-alpha.8":"2019-05-15T16:10:14.248Z","0.8.7-alpha.2":"2019-05-15T18:28:31.905Z","0.8.7-alpha.4":"2019-05-15T22:44:11.998Z","0.8.7-alpha.10":"2019-05-20T20:08:18.409Z","0.8.7-alpha.15":"2019-05-23T19:46:17.095Z","0.8.7-alpha.19":"2019-05-28T20:24:15.404Z","0.8.7-alpha.31":"2019-06-04T14:45:01.715Z","0.8.7":"2019-06-04T17:22:38.053Z","0.8.7-alpha.32":"2019-06-04T18:19:56.748Z","1.0.0-beta.0":"2019-06-07T18:12:49.373Z","0.8.7-alpha.35":"2019-06-07T20:05:46.211Z","1.0.0-alpha.13":"2019-06-26T12:19:32.786Z","1.0.0-alpha.14":"2019-06-26T13:11:51.716Z","1.0.0-alpha.15":"2019-06-26T14:40:06.054Z","1.0.0-alpha.18":"2019-06-27T13:13:13.026Z","1.0.0-alpha.19":"2019-06-27T19:58:49.597Z","1.0.0":"2019-06-28T01:39:38.017Z","1.0.1-alpha.0":"2019-06-28T14:51:55.507Z","1.0.1-alpha.1":"2019-06-30T18:07:14.300Z","1.0.1-alpha.2":"2019-06-30T18:41:51.470Z","1.0.1-alpha.5":"2019-07-03T13:20:06.145Z","1.0.1-alpha.8":"2019-07-10T18:14:07.476Z","1.0.1-alpha.19":"2019-07-16T15:33:38.098Z","1.0.1-1.1.0-beta.0.0":"2019-07-16T18:08:53.446Z","1.1.0-beta.0":"2019-07-16T18:12:11.630Z","1.1.0-alpha.1":"2019-07-17T17:54:24.737Z","1.1.0-alpha.4":"2019-07-18T15:22:16.085Z","1.1.0-alpha.8":"2019-07-22T13:44:42.820Z","1.1.0-alpha.16":"2019-07-25T13:13:15.505Z","1.1.0-alpha.18":"2019-07-25T17:09:12.789Z","1.1.0-beta.1":"2019-07-29T12:42:16.169Z","1.1.0-alpha.24":"2019-07-29T14:19:16.842Z","1.1.0-beta.2":"2019-07-29T18:32:50.050Z","1.1.0-alpha.29":"2019-07-29T19:42:06.555Z","1.1.0-alpha.2":"2019-07-31T17:49:49.144Z","1.1.0-alpha.6":"2019-08-01T20:36:18.003Z","1.1.0-alpha.7":"2019-08-02T13:36:08.421Z","1.1.0-beta.3":"2019-08-05T13:23:17.694Z","1.1.0-alpha.0":"2019-08-06T19:46:15.873Z","1.1.0-alpha.9":"2019-08-12T16:16:17.169Z","1.1.0-alpha.10":"2019-08-12T20:37:11.324Z","1.1.0":"2019-08-14T13:12:36.829Z","1.1.1-alpha.1":"2019-08-26T14:31:54.518Z","1.1.1-alpha.2":"2019-08-27T13:43:44.402Z","1.1.1-alpha.4":"2019-08-28T17:11:21.379Z","1.1.1-alpha.18":"2019-09-10T16:25:06.645Z","1.1.1-alpha.20":"2019-09-10T18:51:41.182Z","1.1.1-alpha.29":"2019-09-18T17:26:31.808Z","1.1.1-alpha.33":"2019-09-23T18:59:59.783Z","1.1.1-alpha.35":"2019-09-24T00:50:17.641Z","1.2.0-beta.0":"2019-09-25T14:10:37.489Z","1.2.0-alpha.0":"2019-09-30T19:00:00.542Z","1.2.0-alpha.1":"2019-09-30T20:19:33.946Z","1.2.0-alpha.2":"2019-10-01T13:51:12.060Z","1.2.0-alpha.5":"2019-10-01T19:54:12.541Z","1.2.0-beta.1":"2019-10-02T13:39:08.126Z","1.2.0-alpha.6":"2019-10-02T13:51:17.397Z","1.2.0-alpha.4":"2019-10-07T13:23:47.238Z","1.2.0-beta.2":"2019-10-07T15:13:43.402Z","1.2.0-alpha.7":"2019-10-07T15:31:59.697Z","1.2.0-beta.3":"2019-10-10T14:08:34.697Z","1.2.0-alpha.8":"2019-10-10T14:36:53.186Z","1.2.0-beta.4":"2019-10-14T12:31:40.048Z","1.2.0-alpha.3":"2019-10-14T13:09:05.137Z","1.2.0-beta.5":"2019-10-18T16:21:33.500Z","1.2.0-beta.6":"2019-10-21T17:15:59.204Z","1.2.0-beta.7":"2019-10-23T19:50:04.246Z","1.2.0-alpha.10":"2019-10-30T15:17:04.545Z","1.2.0-alpha.11":"2019-10-30T17:57:05.520Z","1.2.0-alpha.12":"2019-10-31T13:35:08.934Z","1.2.0-alpha.13":"2019-10-31T15:22:06.588Z","1.2.0":"2019-10-31T17:57:56.320Z","1.2.1-alpha.4":"2019-11-04T20:48:06.972Z","1.2.1-alpha.5":"2019-11-04T21:32:29.608Z","1.2.1":"2019-11-05T15:39:11.218Z","1.2.2-alpha.0":"2019-11-05T23:18:30.568Z","1.2.2-alpha.2":"2019-11-06T17:44:17.989Z","1.2.2":"2019-11-06T20:46:24.806Z","1.2.2-alpha.3":"2019-11-07T15:07:03.163Z","1.2.3-alpha.4":"2019-11-07T20:14:01.058Z","1.2.3":"2019-11-12T17:42:16.597Z","1.2.3-alpha.10":"2019-11-12T19:02:50.332Z","1.2.4-alpha.0":"2019-11-15T01:14:49.183Z","1.2.4-alpha.4":"2019-11-18T20:42:02.946Z","1.2.4-alpha.5":"2019-11-18T21:26:48.444Z","1.2.4-alpha.6":"2019-11-18T22:06:26.633Z","1.2.4-alpha.11":"2019-11-20T02:21:07.466Z","1.2.4-alpha.13":"2019-11-20T18:10:15.563Z","1.2.4":"2019-11-20T22:59:28.357Z","1.2.4-alpha.18":"2019-11-21T00:37:10.101Z","1.2.5-alpha.1":"2019-12-02T19:59:17.373Z","1.2.5-alpha.2":"2019-12-03T14:53:03.026Z","1.2.5-alpha.9":"2019-12-06T19:57:29.204Z","1.2.5":"2019-12-10T19:19:14.005Z","1.2.5-alpha.12":"2019-12-13T14:51:47.070Z","1.2.6-alpha.8":"2019-12-20T16:05:46.912Z","1.2.6-alpha.16":"2020-01-14T23:34:04.137Z","1.3.0-beta.0":"2020-01-16T15:30:48.215Z","1.2.6-alpha.22":"2020-01-16T16:41:28.198Z","1.3.0-beta.1":"2020-01-16T21:01:17.587Z","1.3.0-alpha.0":"2020-01-17T16:27:54.386Z","1.3.0-alpha.4":"2020-01-21T21:00:26.163Z","1.3.0-alpha.9":"2020-01-23T20:50:17.287Z","1.3.0-alpha.11":"2020-01-27T15:02:05.184Z","1.3.0-alpha.12":"2020-01-27T18:57:08.951Z","1.3.0-alpha.13":"2020-01-27T19:28:45.611Z","1.3.0-beta.2":"2020-01-28T18:52:23.260Z","1.3.0-beta.3":"2020-01-28T20:23:14.536Z","1.3.0-beta.4":"2020-01-29T13:27:57.567Z","1.3.0-alpha.14":"2020-02-05T18:24:35.913Z","1.3.0-alpha.17":"2020-02-06T18:20:46.848Z","1.3.0-beta.5":"2020-02-06T20:11:31.569Z","1.3.0-alpha.19":"2020-02-06T21:21:43.856Z","1.3.0-alpha.1":"2020-02-12T19:30:53.011Z","1.3.0-beta.6":"2020-02-19T16:14:46.296Z","1.3.0":"2020-03-05T18:08:31.987Z","1.3.0-alpha.21":"2020-03-11T15:54:22.352Z","1.3.0-alpha.22":"2020-03-11T19:36:19.295Z","1.3.0-alpha.23":"2020-03-13T18:49:56.785Z","1.3.0-alpha.24":"2020-03-17T04:37:05.020Z","1.3.0-alpha.30":"2020-03-20T16:31:26.048Z","1.3.0-alpha.31":"2020-03-20T17:44:00.602Z","1.3.0-alpha.33":"2020-03-27T13:27:00.428Z","1.3.0-alpha.34":"2020-03-27T15:01:17.120Z","1.3.0-alpha.36":"2020-03-31T20:13:50.958Z","1.3.0-alpha.38":"2020-04-02T03:54:34.444Z","1.3.0-alpha.39":"2020-04-02T04:13:33.940Z","1.3.0-alpha.41":"2020-04-02T16:09:46.921Z","1.3.1-beta.0":"2020-04-06T17:40:43.096Z","1.3.1":"2020-04-13T15:00:54.358Z","1.3.2-1.4.0-beta.0.0":"2020-04-15T12:54:40.655Z","1.4.0-beta.0":"2020-04-15T12:58:57.038Z","1.4.0-beta.1":"2020-04-17T20:41:27.650Z","1.4.0-beta.2":"2020-04-27T17:37:23.183Z","1.3.2":"2020-04-28T16:59:12.555Z","1.4.0":"2020-05-04T15:34:27.804Z","1.4.1-alpha.3":"2020-05-07T18:06:36.965Z","1.4.1-alpha.7":"2020-05-07T20:05:04.255Z","1.4.1-alpha.10":"2020-05-12T16:10:47.159Z","1.4.1":"2020-06-02T18:54:06.559Z","1.4.1-alpha.16":"2020-06-02T20:23:28.054Z","1.4.2":"2020-06-05T15:25:32.571Z","1.4.1-alpha.17":"2020-06-05T15:31:12.606Z","1.4.1-alpha.22":"2020-06-09T02:49:09.601Z","1.4.1-alpha.24":"2020-06-11T03:49:00.584Z","1.4.1-alpha.26":"2020-06-16T19:07:40.383Z","1.4.1-alpha.27":"2020-06-17T18:36:57.776Z","1.4.1-alpha.28":"2020-06-22T15:33:26.344Z","1.4.1-alpha.29":"2020-06-22T17:47:37.431Z","1.4.3":"2020-06-22T21:00:08.207Z","1.4.1-alpha.30":"2020-06-22T21:19:05.851Z","1.4.4-alpha.0":"2020-06-23T19:01:05.558Z","1.4.4-alpha.6":"2020-07-08T04:01:20.823Z","1.4.4-alpha.8":"2020-07-22T20:30:01.801Z","1.4.4-alpha.11":"2020-07-23T13:35:21.298Z","1.4.4-alpha.18":"2020-07-29T18:57:05.373Z","1.4.4-alpha.19":"2020-07-30T20:08:00.460Z","1.4.4-alpha.25":"2020-07-31T15:38:38.956Z","1.5.0-beta.0":"2020-08-03T14:51:41.547Z","1.5.0":"2020-08-18T18:00:20.410Z","1.4.4-alpha.35":"2020-08-18T19:23:06.159Z","1.4.4-alpha.37":"2020-08-18T21:06:46.129Z","1.5.1-alpha.3":"2020-08-26T15:04:20.155Z","1.5.1-alpha.5":"2020-08-31T21:49:05.618Z","1.5.1-alpha.6":"2020-09-03T19:39:20.362Z","1.5.1-alpha.31":"2020-09-17T14:47:37.967Z","1.5.1-alpha.35":"2020-09-18T15:41:39.269Z","1.5.1-alpha.39":"2020-09-21T16:39:56.611Z","1.6.0-beta.0":"2020-09-21T22:16:43.366Z","1.6.0-alpha.0":"2020-09-22T13:06:15.129Z","1.6.0-alpha.9":"2020-09-28T16:44:10.089Z","1.6.0-alpha.11":"2020-09-29T15:00:47.969Z","1.6.0-beta.1":"2020-09-30T14:23:51.498Z","1.6.0-alpha.6":"2020-10-09T17:59:05.604Z","1.6.0":"2020-10-09T18:15:30.614Z","1.6.1-alpha.1":"2020-10-12T20:19:50.165Z","1.6.1-alpha.3":"2020-10-13T18:43:35.151Z","1.6.1-alpha.4":"2020-10-14T13:27:37.560Z","1.6.1-alpha.8":"2020-10-15T17:44:12.967Z","1.6.1-alpha.9":"2020-10-15T18:40:18.910Z","1.6.1-alpha.14":"2020-10-19T20:18:08.155Z","1.7.0-beta.0":"2020-10-19T20:44:06.887Z","1.6.1-alpha.18":"2020-10-19T20:49:06.097Z","1.6.1-alpha.19":"2020-10-20T17:21:03.121Z","1.7.0-beta.1":"2020-10-23T14:11:25.747Z","1.7.0-alpha.2":"2020-10-26T15:08:20.391Z","1.7.0-alpha.4":"2020-10-26T20:07:53.449Z","1.7.0-beta.2":"2020-10-27T13:38:05.468Z","2.0.0-alpha.2":"2020-10-28T14:24:08.158Z","1.7.0-alpha.5":"2020-11-04T14:32:25.160Z","1.7.0-alpha.6":"2020-11-04T16:32:36.814Z","2.0.0-alpha.3":"2020-11-06T13:42:29.165Z","1.7.0-alpha.7":"2020-11-06T14:20:18.194Z","1.7.0-beta.3":"2020-11-09T13:51:08.900Z","1.7.0-alpha.1":"2020-11-16T19:34:57.491Z","1.7.0":"2020-11-18T19:47:46.325Z","2.0.0-alpha.4":"2020-11-23T17:21:15.736Z","2.0.0-alpha.5":"2020-11-23T19:33:14.425Z","2.0.0-alpha.6":"2020-11-25T16:09:06.855Z","2.0.0-alpha.7":"2020-11-25T19:39:45.769Z","2.0.0-alpha.8":"2020-11-25T19:40:39.844Z","2.0.0-alpha.9":"2020-11-30T19:05:45.407Z","2.0.0-alpha.10":"2020-11-30T20:23:34.498Z","2.0.0-alpha.11":"2020-12-08T15:28:00.904Z","2.0.0-alpha.12":"2020-12-09T13:46:01.913Z","1.7.1-alpha.3":"2020-12-10T16:02:35.506Z","1.7.1-alpha.4":"2020-12-10T16:18:13.700Z","2.0.0-alpha.13":"2020-12-11T14:41:50.399Z","1.7.1-alpha.5":"2020-12-11T15:30:27.796Z","2.0.0-alpha.14":"2020-12-11T20:54:58.465Z","2.0.0-alpha.15":"2020-12-14T16:54:55.079Z","1.7.1-alpha.6":"2020-12-14T22:02:03.503Z","1.7.1-alpha.8":"2020-12-15T14:10:16.869Z","1.7.1-alpha.10":"2020-12-17T15:54:23.876Z","1.8.0-beta.0":"2021-01-06T17:13:36.495Z","2.0.0-alpha.17":"2021-01-07T14:35:08.778Z","2.0.0-beta.0":"2021-01-07T16:42:55.066Z","2.0.0-alpha.0":"2021-01-07T16:46:18.016Z","2.0.0-alpha.1":"2021-01-20T17:07:16.405Z","2.0.0-beta.1":"2021-01-22T21:26:36.735Z","2.0.0-beta.2":"2021-01-27T18:57:53.154Z","2.0.0-2.0.0-alpha.16.0":"2021-01-27T20:37:06.487Z","1.8.0-alpha.8":"2021-02-03T14:42:30.088Z","2.0.0-beta.3":"2021-02-03T14:47:52.222Z","2.0.0-beta.4":"2021-02-03T16:12:37.290Z","1.8.0-alpha.11":"2021-02-03T16:30:27.542Z","2.0.0":"2021-02-03T20:25:18.711Z","2.0.1-alpha.0":"2021-02-03T21:08:08.930Z","2.0.1-canary.8":"2021-02-09T19:50:06.992Z","2.0.1-canary.12":"2021-02-11T13:19:54.899Z","2.0.1-canary.15":"2021-02-11T21:15:13.135Z","2.0.1-canary.0":"2021-02-12T17:41:00.473Z","2.0.1-canary.4":"2021-02-15T18:53:34.425Z","2.0.1-canary.6":"2021-02-15T19:42:44.805Z","2.1.0":"2021-02-26T17:22:47.791Z","2.1.1":"2021-02-26T17:26:47.189Z","2.1.2-canary.3":"2021-03-02T18:56:10.851Z","2.1.2-canary.6":"2021-03-03T16:58:39.503Z","2.2.0":"2021-03-04T18:28:50.726Z","2.2.1-canary.4":"2021-03-08T13:49:49.627Z","2.2.1-canary.5":"2021-03-09T14:13:45.620Z","2.2.1-canary.7":"2021-03-10T19:43:38.738Z","2.2.1-canary.8":"2021-03-10T20:32:47.059Z","2.2.1-canary.9":"2021-03-10T21:36:52.883Z","2.2.1-canary.10":"2021-03-11T15:32:17.369Z","2.2.1-canary.12":"2021-03-11T18:14:51.527Z","2.3.0":"2021-03-11T19:13:06.860Z","2.3.1-canary.0":"2021-03-11T19:55:32.248Z","2.3.1":"2021-03-11T20:27:08.228Z","2.3.2-canary.4":"2021-03-16T15:08:39.549Z","2.4.0":"2021-03-18T00:23:48.506Z","2.4.1-canary.4":"2021-03-21T01:57:13.161Z","2.4.1-canary.6":"2021-03-22T17:12:59.764Z","2.5.0":"2021-03-22T18:59:55.586Z","2.6.0":"2021-03-24T20:00:09.721Z","2.6.1-canary.6":"2021-03-25T17:13:37.207Z","2.7.0":"2021-03-25T17:37:35.494Z","2.7.1-canary.0":"2021-03-25T17:39:22.389Z","2.8.0":"2021-03-29T12:27:57.538Z","2.8.1-canary.0":"2021-03-29T12:29:49.973Z","2.8.1-canary.2":"2021-03-29T14:55:07.579Z","2.9.0":"2021-03-30T12:15:59.462Z","2.9.1-canary.0":"2021-03-30T12:17:46.826Z","2.9.1-canary.1":"2021-03-30T15:48:37.461Z","2.9.1-canary.3":"2021-03-31T15:19:12.822Z","2.9.1-canary.4":"2021-03-31T15:42:04.996Z","2.9.1-canary.8":"2021-04-05T14:21:52.591Z","2.9.1-canary.14":"2021-04-06T14:38:11.743Z","2.10.0":"2021-04-06T14:44:52.369Z","2.10.1-canary.1":"2021-04-06T15:57:24.759Z","2.11.0":"2021-04-12T17:34:53.743Z","2.11.1-canary.6":"2021-04-14T15:46:09.002Z","2.11.1-canary.8":"2021-04-14T16:46:37.053Z","2.11.1-canary.11":"2021-04-19T16:00:53.437Z","2.11.1-canary.12":"2021-04-19T17:10:59.447Z","2.11.1-canary.13":"2021-04-20T14:11:59.929Z","2.11.1-canary.16":"2021-04-21T16:42:09.918Z","2.12.0":"2021-04-22T18:55:41.454Z","2.12.1-canary.1":"2021-04-23T00:56:49.510Z","2.13.0":"2021-04-23T13:43:12.294Z","2.13.1":"2021-04-28T13:55:46.025Z","2.13.2-canary.2":"2021-05-03T13:31:29.481Z","2.13.2-canary.5":"2021-05-04T19:46:48.377Z","2.13.2-canary.6":"2021-05-05T15:27:55.011Z","2.13.2-canary.7":"2021-05-06T16:07:27.262Z","2.13.2-canary.8":"2021-05-06T16:26:46.640Z","2.13.2-canary.17":"2021-05-10T15:03:07.206Z","2.13.2-canary.23":"2021-05-14T12:20:55.354Z","2.14.0":"2021-05-14T15:37:40.087Z","2.14.1-canary.4":"2021-05-18T18:08:44.721Z","2.15.0":"2021-05-19T14:05:09.535Z","2.16.0":"2021-05-20T14:12:04.837Z","2.16.1-canary.5":"2021-05-24T18:05:28.955Z","2.17.0":"2021-05-24T18:41:30.042Z","2.17.1-canary.1":"2021-05-25T18:31:20.281Z","2.17.1-canary.2":"2021-05-25T20:33:13.698Z","2.18.0":"2021-05-27T18:22:50.089Z","2.18.1-canary.2":"2021-06-01T15:24:56.475Z","2.18.1":"2021-06-01T17:56:38.508Z","2.18.2-canary.3":"2021-06-04T14:26:41.948Z","2.19.0":"2021-06-07T13:51:07.358Z","2.19.1-canary.10":"2021-06-14T11:57:55.696Z","2.20.0":"2021-06-14T12:44:14.119Z","1.8.0":"2021-06-16T13:02:51.892Z","2.21.0":"2021-06-16T20:51:11.142Z","2.21.1":"2021-06-17T15:46:22.706Z","2.21.2-canary.1":"2021-06-17T19:28:11.242Z","2.21.2":"2021-06-18T17:52:54.112Z","2.22.0":"2021-06-23T18:28:22.401Z","2.23.0":"2021-06-24T18:03:28.802Z","2.23.1":"2021-06-24T18:53:25.873Z","2.24.0":"2021-06-28T14:20:50.216Z","2.25.0":"2021-06-30T16:25:11.753Z","2.25.1-canary.8":"2021-07-02T19:37:29.501Z","2.26.0":"2021-07-09T18:13:13.965Z","2.26.1-canary.1":"2021-07-10T00:51:29.177Z","2.26.1-canary.2":"2021-07-12T15:42:42.427Z","2.26.1-canary.3":"2021-07-12T21:06:32.604Z","2.26.1-canary.6":"2021-07-19T17:10:25.334Z","2.27.0":"2021-07-19T17:11:14.423Z","2.27.1":"2021-07-20T13:22:23.430Z","2.27.2":"2021-07-20T19:41:03.425Z","2.27.3-canary.6":"2021-07-27T20:55:42.418Z","2.27.3-canary.7":"2021-07-27T21:18:27.065Z","2.28.0":"2021-08-04T14:51:47.294Z","2.28.1-canary.0":"2021-08-04T14:53:22.735Z","2.28.1-canary.2":"2021-08-05T17:11:16.601Z","2.29.0":"2021-08-05T18:31:43.332Z","2.29.1-canary.0":"2021-08-05T18:33:25.409Z","2.29.1":"2021-08-06T14:16:47.660Z","2.29.2-canary.0":"2021-08-06T14:18:36.883Z","2.29.2":"2021-08-06T15:37:48.516Z","2.29.3-canary.0":"2021-08-06T15:39:24.846Z","2.29.3-canary.1":"2021-08-06T18:46:09.658Z","2.29.3":"2021-08-11T14:51:20.498Z","2.29.4-canary.0":"2021-08-11T14:53:10.512Z","2.29.4-canary.17":"2021-08-17T02:55:29.653Z","2.30.0":"2021-08-17T14:09:20.096Z","2.30.1-canary.6":"2021-08-20T15:33:00.954Z","2.30.1-canary.13":"2021-08-25T16:59:40.757Z","2.31.0":"2021-08-26T20:08:11.676Z","2.31.1-canary.5":"2021-08-31T18:12:42.481Z","2.32.0":"2021-09-03T19:27:31.425Z","2.32.1":"2021-09-07T15:48:52.184Z","2.32.2-canary.1":"2021-09-09T15:56:42.759Z","2.32.2":"2021-09-09T17:41:55.596Z","2.32.3-canary.0":"2021-09-10T14:09:58.629Z","2.32.3-canary.1":"2021-09-11T02:37:52.116Z","2.32.3-canary.3":"2021-09-14T14:42:40.595Z","2.32.3-canary.4":"2021-09-15T12:54:01.707Z","2.33.0":"2021-09-15T15:31:35.201Z","2.33.1-canary.1":"2021-09-15T21:07:53.626Z","2.33.1":"2021-09-15T21:24:59.791Z","2.33.2":"2021-09-17T17:42:35.860Z","2.33.3":"2021-09-22T14:31:35.346Z","2.33.4":"2021-09-27T13:37:48.835Z","2.33.5-canary.3":"2021-09-29T14:53:33.313Z","2.33.5-canary.8":"2021-10-01T16:51:02.192Z","2.34.0":"2021-10-01T18:36:19.899Z","2.34.1-canary.2":"2021-10-07T18:33:09.083Z","2.35.0":"2021-10-12T13:40:27.683Z","2.36.0":"2021-10-21T20:31:42.310Z","2.36.1":"2021-10-22T21:02:40.421Z","2.36.2":"2021-10-28T00:48:55.626Z","2.36.3":"2021-10-29T13:36:19.450Z","2.37.0":"2021-11-12T17:20:22.932Z","2.38.0":"2021-11-15T16:52:08.590Z","2.38.1-canary.1":"2021-11-15T21:35:13.377Z","2.39.0":"2021-11-22T19:40:55.997Z","2.39.1-canary.0":"2021-11-24T17:52:13.358Z","2.39.1-canary.4":"2021-11-30T16:59:17.488Z","2.39.1-canary.8":"2021-12-03T19:22:17.387Z","2.39.1-canary.17":"2021-12-06T18:41:37.236Z","2.40.0":"2021-12-07T01:55:18.467Z","2.40.1-canary.4":"2021-12-08T20:50:43.651Z","2.40.1-canary.5":"2021-12-10T16:57:27.945Z","2.41.0":"2021-12-10T17:02:51.094Z","2.41.1-canary.1":"2021-12-17T18:41:17.719Z","2.41.1-canary.2":"2021-12-17T20:45:40.156Z","2.41.1-canary.3":"2021-12-20T16:34:19.014Z","2.41.1-canary.5":"2021-12-22T19:16:25.623Z","2.42.0":"2022-01-11T16:32:55.944Z","2.42.1-canary.7":"2022-01-18T19:30:11.843Z","3.0.0-canary.11":"2022-01-20T15:07:04.994Z","3.0.0-canary.12":"2022-01-21T15:55:04.453Z","3.0.0-canary.17":"2022-01-22T00:13:34.791Z","2.42.1-canary.9":"2022-01-24T14:39:44.706Z","2.42.1-canary.18":"2022-01-27T19:48:24.377Z","2.43.0":"2022-01-27T23:06:34.995Z","2.43.1":"2022-02-01T22:43:37.913Z","3.0.0-canary.36":"2022-02-02T15:16:15.793Z","2.43.2-canary.6":"2022-02-03T18:18:48.711Z","2.43.2-canary.13":"2022-02-08T20:25:55.189Z","2.43.2-canary.16":"2022-02-16T14:24:02.468Z","2.44.0":"2022-03-03T17:35:32.272Z","2.44.1":"2022-03-03T22:03:48.916Z","2.44.2":"2022-03-04T16:46:18.092Z","2.44.3":"2022-03-14T14:35:54.289Z","2.44.4":"2022-03-15T23:10:43.507Z","2.45.0":"2022-03-22T19:53:00.078Z","2.45.1":"2022-03-29T13:32:39.248Z","2.46.0":"2022-03-29T18:29:25.421Z","2.46.1":"2022-03-30T15:10:49.223Z","2.46.2":"2022-03-30T19:37:12.294Z","2.46.3":"2022-03-30T19:40:11.153Z","2.46.4":"2022-03-30T19:43:48.859Z","2.46.5":"2022-03-30T19:46:54.851Z","2.46.6":"2022-03-30T19:50:28.448Z","2.46.7":"2022-03-30T19:53:11.843Z","2.46.8":"2022-03-30T19:55:50.013Z","2.46.9":"2022-03-30T19:58:44.479Z","2.46.10":"2022-03-30T20:01:42.023Z","2.46.11":"2022-03-30T20:04:11.598Z","2.46.12":"2022-03-30T20:07:12.819Z","2.46.13":"2022-03-30T20:10:32.236Z","2.46.14":"2022-03-30T20:13:32.273Z","2.46.15":"2022-03-30T20:16:33.990Z","2.46.16":"2022-03-30T20:19:28.470Z","2.46.17":"2022-03-30T20:23:19.246Z","2.46.18":"2022-03-30T20:26:04.929Z","2.46.19":"2022-03-30T20:28:56.506Z","2.46.20":"2022-03-30T20:32:25.726Z","2.46.21":"2022-03-30T20:36:33.672Z","2.46.22":"2022-03-30T20:39:27.518Z","2.46.23":"2022-03-30T20:43:03.375Z","2.46.24":"2022-03-30T20:45:44.621Z","2.46.25":"2022-03-30T20:48:50.371Z","2.46.26":"2022-03-30T20:52:08.491Z","2.46.27":"2022-03-30T20:54:57.768Z","2.46.28":"2022-03-30T20:58:52.692Z","2.46.29":"2022-03-30T21:01:33.644Z","2.46.30":"2022-03-30T21:05:01.316Z","2.46.31":"2022-03-30T21:08:16.963Z","2.46.32":"2022-03-30T21:10:56.663Z","2.46.33":"2022-03-30T21:14:03.510Z","2.46.34":"2022-03-30T21:17:43.337Z","2.46.35":"2022-03-30T21:20:49.137Z","2.46.36":"2022-03-30T21:23:42.025Z","2.46.37":"2022-03-30T21:27:26.553Z","2.46.38":"2022-03-30T21:30:02.019Z","2.46.39":"2022-03-30T21:34:03.267Z","2.46.40":"2022-03-30T21:37:56.786Z","2.46.41":"2022-03-30T21:40:53.311Z","2.46.42":"2022-03-30T21:44:00.173Z","2.46.43":"2022-03-30T21:47:11.086Z","2.46.44":"2022-03-30T21:51:37.219Z","2.46.45":"2022-03-30T21:55:26.555Z","2.46.46":"2022-03-30T21:58:01.126Z","2.46.47":"2022-03-30T22:01:50.759Z","2.46.48":"2022-03-30T22:04:16.342Z","2.46.49":"2022-03-30T22:07:59.810Z","2.46.50":"2022-03-30T22:11:31.942Z","2.46.51":"2022-03-30T22:14:04.480Z","2.46.52":"2022-03-30T22:17:36.964Z","2.46.53":"2022-03-30T22:20:19.341Z","2.46.54":"2022-03-30T22:23:58.636Z","2.46.55":"2022-03-30T22:27:24.763Z","2.46.56":"2022-03-30T22:30:34.706Z","2.46.57":"2022-03-30T22:33:59.958Z","2.46.58":"2022-03-30T22:36:32.681Z","2.46.59":"2022-03-30T22:40:24.094Z","2.46.60":"2022-03-30T22:43:25.517Z","2.46.61":"2022-03-30T22:46:20.456Z","2.46.62":"2022-03-30T22:48:55.600Z","2.46.63":"2022-03-30T22:51:36.764Z","2.46.64":"2022-03-30T22:54:29.590Z","2.46.65":"2022-03-30T22:57:03.963Z","2.46.66":"2022-03-30T22:59:42.962Z","2.46.67":"2022-03-30T23:02:59.158Z","2.46.68":"2022-03-30T23:06:20.842Z","2.46.69":"2022-03-30T23:10:31.442Z","2.46.70":"2022-03-30T23:14:02.886Z","2.46.71":"2022-03-30T23:16:49.491Z","2.46.72":"2022-03-30T23:20:01.339Z","2.46.73":"2022-03-30T23:23:47.072Z","2.46.74":"2022-03-30T23:27:13.821Z","2.46.75":"2022-03-30T23:30:01.250Z","2.46.76":"2022-03-30T23:33:56.432Z","2.46.77":"2022-03-30T23:37:05.666Z","2.46.78":"2022-03-30T23:39:42.742Z","2.46.79":"2022-03-30T23:42:43.573Z","2.46.80":"2022-03-30T23:46:40.459Z","2.46.81":"2022-03-30T23:50:26.211Z","2.46.82":"2022-03-30T23:54:01.012Z","2.46.83":"2022-03-30T23:57:11.933Z","2.46.84":"2022-03-30T23:59:44.814Z","2.46.85":"2022-03-31T00:03:32.125Z","2.46.86":"2022-03-31T00:06:06.028Z","2.46.87":"2022-03-31T00:10:22.797Z","2.46.88":"2022-03-31T00:14:03.069Z","2.46.89":"2022-03-31T00:17:32.798Z","2.46.90":"2022-03-31T00:21:38.699Z","2.46.91":"2022-03-31T00:25:30.632Z","2.46.92":"2022-03-31T00:29:17.346Z","2.46.93":"2022-03-31T00:32:11.939Z","2.46.94":"2022-03-31T00:35:56.044Z","2.46.95":"2022-03-31T00:39:42.776Z","2.46.96":"2022-03-31T00:42:40.440Z","2.46.97":"2022-03-31T00:46:40.860Z","2.46.98":"2022-03-31T00:49:50.358Z","2.46.99":"2022-03-31T00:53:00.646Z","2.46.100":"2022-03-31T00:55:48.444Z","2.46.101":"2022-03-31T00:59:16.406Z","2.46.102":"2022-03-31T01:02:57.211Z","2.46.103":"2022-03-31T01:05:56.104Z","2.46.104":"2022-03-31T01:09:33.706Z","2.46.105":"2022-03-31T01:12:57.323Z","2.46.106":"2022-03-31T01:16:31.898Z","2.46.107":"2022-03-31T01:19:39.949Z","2.46.108":"2022-03-31T01:22:49.295Z","2.46.109":"2022-03-31T01:26:08.601Z","2.46.110":"2022-03-31T01:29:21.362Z","2.46.111":"2022-03-31T01:32:16.455Z","2.46.112":"2022-03-31T01:36:04.581Z","2.46.113":"2022-03-31T01:39:25.308Z","2.46.114":"2022-03-31T01:42:01.700Z","2.46.115":"2022-03-31T01:45:48.547Z","2.46.116":"2022-03-31T01:49:15.987Z","2.46.117":"2022-03-31T01:53:03.275Z","2.46.118":"2022-03-31T01:56:32.159Z","2.46.119":"2022-03-31T01:59:32.948Z","2.46.120":"2022-03-31T02:02:10.127Z","2.46.121":"2022-03-31T02:05:00.424Z","2.46.122":"2022-03-31T02:07:45.439Z","2.46.123":"2022-03-31T02:10:27.098Z","2.46.124":"2022-03-31T02:13:11.842Z","2.46.125":"2022-03-31T02:17:06.464Z","2.46.126":"2022-03-31T02:20:16.959Z","2.46.127":"2022-03-31T02:23:38.474Z","2.46.128":"2022-03-31T02:26:50.849Z","2.46.129":"2022-03-31T02:30:41.446Z","2.46.130":"2022-03-31T02:33:53.853Z","2.46.131":"2022-03-31T02:36:31.775Z","2.46.132":"2022-03-31T02:39:55.492Z","2.46.133":"2022-03-31T02:42:31.981Z","2.46.134":"2022-03-31T02:46:57.637Z","2.46.135":"2022-03-31T02:49:12.389Z","2.46.136":"2022-03-31T02:52:39.700Z","2.46.137":"2022-03-31T02:55:37.798Z","2.46.138":"2022-03-31T02:58:15.570Z","2.46.139":"2022-03-31T03:00:54.025Z","2.46.140":"2022-03-31T03:04:21.546Z","2.46.141":"2022-03-31T03:06:50.137Z","2.46.142":"2022-03-31T03:10:47.364Z","2.46.143":"2022-03-31T03:14:02.355Z","2.46.144":"2022-03-31T03:16:37.892Z","2.46.145":"2022-03-31T03:20:26.285Z","2.46.146":"2022-03-31T03:23:54.108Z","2.46.147":"2022-03-31T03:27:26.679Z","2.46.148":"2022-03-31T03:30:22.467Z","2.46.149":"2022-03-31T03:33:32.750Z","2.46.150":"2022-03-31T03:36:34.481Z","2.46.151":"2022-03-31T03:40:28.682Z","2.46.152":"2022-03-31T03:44:05.134Z","2.46.153":"2022-03-31T03:46:44.664Z","2.46.154":"2022-03-31T03:49:27.566Z","2.46.155":"2022-03-31T03:52:13.119Z","2.46.156":"2022-03-31T03:55:14.021Z","2.46.157":"2022-03-31T03:59:13.593Z","2.46.158":"2022-03-31T04:02:42.110Z","2.46.159":"2022-03-31T04:05:21.707Z","2.46.160":"2022-03-31T04:09:18.376Z","2.46.161":"2022-03-31T04:11:54.049Z","2.46.162":"2022-03-31T04:14:34.052Z","2.46.163":"2022-03-31T04:17:46.848Z","2.46.164":"2022-03-31T04:21:08.409Z","2.46.165":"2022-03-31T04:23:43.445Z","2.46.166":"2022-03-31T04:26:31.628Z","2.46.167":"2022-03-31T04:29:13.993Z","2.46.168":"2022-03-31T04:32:40.518Z","2.46.169":"2022-03-31T04:35:16.881Z","2.46.170":"2022-03-31T04:38:16.317Z","2.46.171":"2022-03-31T04:41:02.638Z","2.46.172":"2022-03-31T04:45:11.466Z","2.46.173":"2022-03-31T04:48:11.286Z","2.46.174":"2022-03-31T04:51:38.260Z","2.46.175":"2022-03-31T04:54:44.961Z","2.46.176":"2022-03-31T04:57:45.484Z","2.46.177":"2022-03-31T05:00:38.244Z","2.46.178":"2022-03-31T05:03:43.188Z","2.46.179":"2022-03-31T05:07:25.456Z","2.46.180":"2022-03-31T05:11:20.661Z","2.46.181":"2022-03-31T05:14:18.728Z","2.46.182":"2022-03-31T05:17:29.173Z","2.46.183":"2022-03-31T05:19:53.214Z","2.46.184":"2022-03-31T05:22:28.426Z","2.46.185":"2022-03-31T05:25:07.045Z","2.46.186":"2022-03-31T05:27:50.851Z","2.46.187":"2022-03-31T05:31:34.327Z","2.46.188":"2022-03-31T05:34:03.722Z","2.46.189":"2022-03-31T05:36:59.836Z","2.46.190":"2022-03-31T05:39:50.697Z","2.46.191":"2022-03-31T05:42:25.993Z","2.46.192":"2022-03-31T05:45:09.142Z","2.46.193":"2022-03-31T05:49:07.833Z","2.46.194":"2022-03-31T05:52:49.964Z","2.46.195":"2022-03-31T05:55:38.688Z","2.46.196":"2022-03-31T05:58:45.664Z","2.46.197":"2022-03-31T06:01:46.999Z","2.46.198":"2022-03-31T06:05:53.798Z","2.47.0":"2022-04-04T20:42:00.714Z","2.47.1":"2022-04-05T20:24:56.461Z","2.47.2":"2022-04-11T15:40:01.205Z","2.47.3":"2022-05-11T18:28:22.748Z","2.47.4":"2022-06-09T01:22:10.879Z","2.47.5":"2022-06-10T17:26:27.763Z","2.47.6":"2022-07-07T13:53:43.133Z","2.47.7":"2022-07-26T14:35:18.986Z","2.47.9":"2022-09-22T13:55:29.738Z"},"bugs":{"url":"https://github.com/apollosproject/apollos-apps/issues"},"homepage":"https://github.com/apollosproject/apollos-apps#readme","repository":{"url":"git://github.com/apollosproject/apollos-apps.git","type":"git"},"description":"Provides a connector to Rock for the following parts of the app","maintainers":[{"email":"vince@classyh.at","name":"yungvincenzo"},{"email":"hi@convan.me","name":"conrad_vanl"},{"email":"micneeley14@gmail.com","name":"redreceipt"},{"email":"npm@differential.com","name":"didevshop"},{"email":"nick@differential.com","name":"nick-di"},{"email":"apps@apollos.app","name":"apollosadmin"},{"email":"nathan@differential.com","name":"nathanlewis.differential"}],"readme":"","readmeFilename":""}