-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
parse-community/docs
#772Labels
type:docsOnly change in the docs or READMEOnly change in the docs or README
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
If a change is made to a ParseGraphQLConfiguration using setGraphQLConfig(), and then the change is removed, the original (default) ParseGraphQLConfiguration does not return automatically. It must be reset by the developer.
Steps to reproduce
- Create a Parse Server instance and add a custom
graphQLConfigsimilar to the example below. - Note that the GraphQL Playground Docs tab shows that the
getandfindquery aliases for theItemclass are in use. - Remove the custom
graphQLConfigrelated code from the Parse Server instance and refresh the GraphQL Playground page. - Note that the GraphQL Playground Docs tab continues to show that the
getandfindquery aliases for theItemclass are in use. - Instead of removing the
graphQLConfigrelated code as mentioned in step#3, change it to this (forces a reset of the previously-changed configuration settings):
const graphQLConfig = {
classConfigs: [],
};- Note that the GraphQL Playground Docs tab now show that the
getandfindqueries for theItemclass has returned to the defaultitemanditemsquery names, respectively.
Parse Server Instance Example:
const parseServer = new ParseServer({
databaseURI: 'mongodb://localhost:27017/test',
appId: 'APPLICATION_ID',
masterKey: 'MASTER_KEY',
serverURL: 'http://localhost:1337/parse',
});
const parseGraphQLServer = new ParseGraphQLServer(
parseServer,
{
graphQLPath: '/graphql',
playgroundPath: '/playground'
},
);
const graphQLConfig = {
classConfigs: [
{
className: 'Item',
query: {
getAlias: 'getItem',
findAlias: 'findItems',
},
},
],
};
const setParseGraphQLConfig = async () => {
await parseGraphQLServer.setGraphQLConfig(graphQLConfig);
};
setParseGraphQLConfig();
app.use('/parse', parseServer.app);
parseGraphQLServer.applyGraphQL(app);Actual Outcome
The graphQLConfig settings do not automatically return to their default settings after removing custom changes.
Expected Outcome
The graphQLConfig settings should revert to their default settings automatically if no custom changes are applied.
Environment
Server
- Parse Server version:
4.3.0 - Operating system:
Windows 10 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
localhost
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
4.2.8 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
MongoDB Atlas
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
GraphQL - SDK version:
N/A
Logs
Metadata
Metadata
Assignees
Labels
type:docsOnly change in the docs or READMEOnly change in the docs or README