Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Throw on duplicate derived model names #421

Merged

Conversation

unclecheese
Copy link

Resolves: #403

@unclecheese unclecheese force-pushed the pulls/master/duplicate-models branch from ba3de50 to 8d436ce Compare December 20, 2021 22:27
@unclecheese unclecheese merged commit f45be54 into silverstripe:master Dec 20, 2021
@kinglozzer
Copy link
Member

I get an infinite loop somewhere when running a (web) dev/build?flush after this change - I’ve narrowed it down to this PR.

I do have a duplicate derived name, which I was working around with this:

SilverStripe\GraphQL\Schema\Schema:
  schemas:
    admin:
      config:
        modelConfig:
          DataObject:
            type_mapping:
              App\Model\Page: AppPage

I tried removing that, but I still get an infinite loop rather than a warning about duplicate names 😞

@unclecheese
Copy link
Author

Can you move that type_mapping to the main schema config, eg config.yml and use "typeMapping" instead?

@kinglozzer
Copy link
Member

kinglozzer commented Dec 23, 2021 via email

@kinglozzer
Copy link
Member

Okay that does fix it:

SilverStripe\GraphQL\Schema\Schema:
  schemas:
    admin:
      config:
        typeMapping:
          App\Model\Page: AppPage

I’ll create an issue for the infinite loop thing. Thanks and Merry Christmas @unclecheese 🎄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants